The simplest solution I've found is to install the ssmtp package.
I've packaged this on the OBS for all platforms except Debian and
Ubuntu fdistros - If someone would like to get them building let me
know and I'll add them as a maintainer.
This use case is quite specific, and is just what ssmtp targets:
"extremely simple MTA to get mail off the system to a mail hub",.
The bonus is this allows you to send mail to a gmail account without
any third parties, or configuring you local machine as....? (well its
beyond me what I'd need to do)
I haven't yet worked out howto pass username and password other than
via /etc/ssmtp/ssmtp.conf
I'd appreciate it anyone has additional tips or can point to a simpler
set-up.....?
#
# Begin bash session as ordinary user
#
su
MY_REPO=http://download.opensuse.org/repositories/home:mvyver/openSUSE_11.0
zypper addrepo --check $MY_REPO "mvyver Repository"
zypper install --repo $MY_REPO ssmtp
GMAIL_USER=......
GMAIL_PSWD=......
cat <<EOD>/etc/ssmtp/ssmtp.conf
root=$GMAIL_USER@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=smtp.gmail.com:587
AuthUser=$GMAIL_USER
AuthPass=$GMAIL_PSWD
UseSTARTTLS=YES
FromLineOverride=YES # optional
EOD
cat <<EOD>/etc/ssmtp/revaliases
root:$GMAIL_USER@gmail.com:smtp.gmail.com:587
EOD
exit
#
# As ordinary user:
#
GMAIL_USER=......
GMAIL_PSWD=......
mail -v -s "Testing SSMTP" $GMAIL_USER@gmail.com <