Send Mail
Some basic sendmail on Ubuntu configuration information:
found here http://stackoverflow.com/questions/10359437/sendmail-how-to-configure-sendmail-on-ubuntu
Initially you will need to install sendmail:
$ sudo apt-get install sendmail
Then you need to run the configuration:
$ sudo sendmailconfig
For reference, the files that are updated during configuration are located at the following (in case you want to update them manually):
/etc/mail/sendmail.conf /etc/cron.d/sendmail /etc/mail/sendmail.mc
You can test sendmail to see if it is properly configured and setup by typing the following into the command line:
$ echo "My test email being sent from sendmail" | /usr/sbin/sendmail myemail@domain.com
The following will allow you to add smtp relay to sendmail:
#Change to your mail config directory:
cd /etc/mail
#Make a auth subdirectory
mkdir auth
chmod 700 auth
#Create a file with your auth information to the smtp server
cd auth
touch client-info
#In the file, put the following, matching up to your smtp server:
AuthInfo:your.isp.net "U:root" "I:user" "P:password"
#Generate the Authentication database, make both files readable only by root
makemap hash client-info < client-info
chmod 600 client-info
cd ..
#Add the following lines to sendmail.mc. Make sure you update your smtp server
define('SMART_HOST','your.isp.net')dnl
define('confAUTH_MECHANISMS', 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE('authinfo','hash /etc/mail/auth/client-info')dnl
#Invoke creation sendmail.cf
m4 sendmail.mc > sendmail.cf
#Restart the sendmail daemon
service sendmail restart
Make sure you are doing these commands as sudo. Quicktip: You can create a 'sudo session' by typing 'sudo -s', then enter the sudor password
Commandline email
http://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/