0

I followed the steps in http://www.linuxha.com/other/sendmail/gmail.html to setup gmail in send mail. But when I try to send mail I got the authentication failure message.

—– Transcript of session follows —– … while talking to smtp.gmail.com:

AUTH dialogue <<< 535-5.7.1 Username and Password not accepted. Learn more at <<>> MAIL From: SIZE=538 AUTH= <<< 530-5.5.1 Authentication Required. Learn more at <<< 530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 i7sm28108408qap.12 554 5.0.0 Service unavailable

Here its my main part of my sendmail.mc

FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl

EXPOSED_USER(`root')dnl
FEATURE(`authinfo',`hash /etc/mail/authinfo')dnl

LOCAL_DOMAIN(`cookie.uucp')dnl
define(`SMART_HOST',`smtp.gmail.com')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')
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

define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs')dnl
define(`confCACERT_PATH', `CERT_DIR')dnl
define(`confCACERT', `CERT_DIR/CAcert.pem')dnl
define(`confSERVER_CERT', `CERT_DIR/mycert.pem')dnl
define(`confSERVER_KEY', `CERT_DIR/mykey.pem')dnl
define(`confCLIENT_CERT', `CERT_DIR/mycert.pem')dnl
define(`confCLIENT_KEY', `CERT_DIR/mykey.pem')dnl

FEATURE(masquerade_envelope)dnl

FEATURE(masquerade_entire_domain)dnl

MASQUERADE_AS(`gmail.com') dnl
2
  • That code above doesn't seem to have any authentication information, that is what the Gmail server is complaining about.
    – Tim
    Dec 29, 2011 at 14:48
  • @Tim /etc/mail/authinfo file have the gmail login information..
    – Arul
    Dec 29, 2011 at 15:47

1 Answer 1

1

Do you have the correct (gmail) username and password settings in client-info? If yes, is sendmail able to read this file? Have you built your new sendmail.cf after editing sendmail.mc? Have you restarted sendmail afterwards?

4
  • Yes I have correct username and password in /etc/mail/authinfo. I can login with this info in browser. I build successfully sendmail.cf using "make all install restart" After done everything sendmail is successfully restarted.
    – Arul
    Dec 29, 2011 at 15:48
  • Permissions like I said. Is sendmail able to read the external files? Look for warnings in the log files.
    – adamo
    Dec 30, 2011 at 7:32
  • Yes It can read external file.. sendmail 14165 root 3u IPv4 517170 TCP *:smtp (LISTEN) Its started by root user.. -rw------- 1 root root 180 Dec 29 06:40 authinfo That authentication file have read and write access for root user
    – Arul
    Jan 2, 2012 at 9:05
  • Now is working.. A small typo in my password.. :( Thanks to all
    – Arul
    Jan 2, 2012 at 11:39

Not the answer you're looking for? Browse other questions tagged .