sSMTP and gmail
According to its
man-page, ssmtp is a “send-only sendmail emulator”, hence
allowing your machine to send, say, status reports via mail without the need
for sendmail or any other MTA.
ssmtp is simple to use, simple to install and works very well. I use it on my file-server: Without further ado, several scripts and programs (such as smartmoontools) can now send me their reports directly to a given mail address.
FreeBSD users just
/usr/ports/mail/ssmtp and do the usual
make install clean. Afterwards, this is how your
ssmtp.conf (located in
/usr/local/etc/ssmtp/) should look like:
email@example.com mailhub=smtp.gmail.com:587 rewriteDomain=example.net hostname=mail.example.net FromLineOverride=YES UseSTARTTLS=YES AuthUser=your\_gmail\firstname.lastname@example.org AuthPass=swordfish
No, my password is not “swordfish”. The above settings work very well for my
gmail account, providing an easy and secure way to get status reports. To let
the script send you mails, just add a
MAILTOemail@example.com statement to your
crontab, for example.