eu tive o mesmo problema. Finalmente fiz isso com várias configurações.
/etc/mail/sendmail.mc
define('SMART_HOST','smtp.yourdomain.com')dnl
define('confAUTH_OPTIONS','A')dnl
FEATURE('authinfo','hash -o /etc/mail/authinfo.db')dnl
MASQUERADE_AS('yourdomain.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN('yourdomain.com.')dnl
FEATURE('relay_based_on_MX')dnl
FEATURE('genericstable')dnl
GENERICS_DOMAIN('localhost.localdomain')dnl
/etc/mail/authinfo (660 permissions)
Authinfo:yourdomain.com "U:yoursmtpuserid" "P:yourpassword" "M:PLAIN"
Authinfo: "U:yoursmtpuserid" "P:yourpassword" "M:PLAIN"
>makemap hash /etc/mail/authinfo < /etc/mail/authinfo
/etc/mail/access (660 permissions)
connect:localhost.localdomain RELAY
connect:localhost RELAY
connect:127.0.0.1 RELAY
>makemap hash /etc/mail/access < /etc/mail/access
/etc/genericstable
root [email protected]
>makemap hash /etc/mail/genericstable < /etc/mail/genericstable
/etc/named.conf
options{
listen-on port 53 {127.0.0.1;};
};
>cp -f /etc/named.conf /var/named/chroot/etc/
/etc/resolve.conf
nameserver 127.0.0.1
nameserver youriplocal
domain localdomain
>chkconfig -> named on
-> saslauthd on
-> sendmail on
>service named restart
>service saslauthd restart
>service sendmail restart
Para testá-lo, você pode executar:
sendmail -Am -t -v to:emaildestination from:youremail
Espero que funcione para você.