Eu encontrei outra boa ferramenta MSMTP para minha exigência enviando e-mails usando smtp externo ou gmail smtp. Como sugerido acima, quando eu configurei ssmtp i recebendo todos os e-mails que é junked para mim como cron mails & correios gerados por munin-cron & outras aplicações.
Passos da Configuração MSMTP O MSMTP pode ler todos os parâmetros necessários na linha de comando.
touch ~/.msmtprc
chmod 0600 ~/.msmtprc
vim ~/.msmtprc
# Use an external SMTP server with insecure authentication.
# (manually choose an insecure authentication method.)
# Note that the password contains blanks.
defaults
######################################################################
# A sample configuration using Gmail
######################################################################
# account name is "gmail".
# You can select this account by using "-a gmail" in your command line.
account gmail
host smtp.gmail.com
tls on
tls_certcheck off
port 587
auth login
from [email protected]
user somebody
password somesecret
######################################################################
# A sample configuration using other normal ESMTP account
######################################################################
# account name is "someplace".
# You can select this account by using "-a someplace" in your command line.
account someplace
host smtp.someplace.com
from [email protected]
auth login
user someone
password somesecret
# If you don't use any "-a" parameter in your command line,
# the default account "someplace" will be used.
account default: someplace
Test
cat <<EOF | msmtp -a gmail [email protected]
Subject: test
This is a test!
EOF