Neste ponto, abandonei a idéia de usar meu host como retransmissão do sendmail e passei a usar o Gmail.
Encontrei vários sites que ajudaram a configurá-lo. Eu testei isso no Ubuntu e no CentOS ... Espero que possa ser de alguma ajuda para alguém.
apt-get update
vi /etc/hostname
# Enter valid FQDN name
apt-get install sendmail sendmail-cf sasl2-bin
cd /etc/mail
mkdir certs
chmod 700 certs/
cd certs/
openssl dsaparam 1024 -out dsa1024.pem
openssl req -x509 -nodes -days 3650 -newkey dsa:dsa1024.pem -out /etc/mail/certs/mycert.pem -
keyout /etc/mail/certs/mykey.pem
# Enter "US" for Country Name (Can leave everything else blank)
openssl req -x509 -new -days 3650 -key /etc/mail/certs/mykey.pem -out
/etc/mail/certs/mycert.pem
# Enter "US" for Country Name (Can leave everything else blank)
ln -s /etc/mail/certs/mycert.pem /etc/mail/certs/CAcert.pem
chmod 600 /etc/mail/certs/*
cd ..
mkdir auth
chmod 700 auth/
vi auth/client-info
conteúdo:
AuthInfo:smtp.gmail.com "U:root" "I:<emailAddress>@gmail.com" "P:password"
AuthInfo: "U:root" "I:<emailAddress>@gmail.com" "P:password"
então,
makemap -r hash /etc/mail/auth/client-info.db < /etc/mail/auth/client-info
vi sendmail.mc
Acima de "MAILER (local) dnl" Adicionar:
dnl #
dnl # SSL Settings
define('CERT_DIR', 'MAIL_SETTINGS_DIR''certs')
define('confCACERT_PATH', 'CERT_DIR')
define('confCACERT', 'CERT_DIR/CAcert.pem')
define('confSERVER_CERT', 'CERT_DIR/mycert.pem')
define('confSERVER_KEY', 'CERT_DIR/mykey.pem')
define('confCLIENT_CERT', 'CERT_DIR/mycert.pem')
define('confCLIENT_KEY', 'CERT_DIR/mykey.pem')
dnl #
dnl # GMAIL FORWARDING
define('SMART_HOST','smtp.gmail.com')dnl
define('RELAY_MAILER_ARGS', 'TCP $h 587')dnl
define('ESMTP_MAILER_ARGS', 'TCP $h 587')dnl
define('confAUTH_OPTIONS', 'A p')dnl
TRUST_AUTH_MECH('EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define('confAUTH_MECHANISMS', 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE('authinfo','hash -o /etc/mail/auth/client-info.db')dnl
depois,
m4 sendmail.mc > sendmail.cf
service sendmail stop
service sendmail start
(echo subject: test; echo ) | /usr/sbin/sendmail -v -i -Am -- [email protected]