Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl

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

define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')
define(`confAUTH_OPTIONS', `A p')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



MASQUERADE_AS(`gmail.com') dnl
share|improve this question

closed as not a real question by Ward, Skyhawk, Holocryptic, voretaq7, Chris S Jan 23 '12 at 18:14

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

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

1 Answer 1

up vote 0 down vote accepted

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?

share|improve this answer
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 '11 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 '11 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 '12 at 9:05
Now is working.. A small typo in my password.. :( Thanks to all –  Arul Jan 2 '12 at 11:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.