nail is very cool. Think mailx meets SMTP auth w/ SSL.
We are making the jump to Google Apps for your Domain and I needed a way for Nagios to send alerts out our Google Apps account. Here’s how I got nail speaking to my Google Apps Account, but it will work just fine with your plain ol’ GMail account as well:
sudo aptitude install nail ca-certificates
Then add the following to the ~/.mailrc of the user that needs it (it my case nagios)
set smtp-use-starttls
set pop-use-starttls
set smtp-auth=login
set smtp=smtp.gmail.com:587
set pop=pop.gmail.com:996
set from=USER@DOMAIN
set smtp-auth-user=USER@DOMAIN
set smtp-auth-password=PASSWORD
and now for a test to run as that user:
nail -s 'Testing123' bobsyouruncle@aol.com ...
Leave a reply