Web Tips
Sharing our knowledge of CFML & jQuery and many other web development tips.
Sharing our knowledge of CFML & jQuery and many other web development tips.
UPDATE: Please disregard all that is below (I was talking out my arse). All was good for some time and then I began getting this error again. After some extensive google searching, I found a lot of articles that indicated that using localhost.localdomain for host would cause the mail to be rejected. I changed my hosts file (keeping localhost.localdomain localhost of course) and rebooted. Still didn’t have much luck so I installed sendmail from scratch again using the following instructions from howtoforge and all was good.
http://www.howtoforge.com/configuring-sendmail-to-act-as-a-smarthost-and-to-rewrite-from-address
Again DO NOT USE THE DESTRUCTIONS BELOW
I noticed last week that my emails were not being delivered properly. After taking a look at when the issue started, I realized that it was about the same time I updated my box.
My email was being returned with the reason: 550 Banned rcpt apache@localhost.localdomain. There was also another error 554 5.0.0 Service unavailable. Both of these errors on their own were not to helpful. I asked a friend (the one who sold me the box) to help and he gave me some good advice, but I was unable to resolve the issue and several Google searches didn’t reveal any solution.
I checked the maillog in /var/log/ and found that the mail was being sent internally, but I have to use my ISP mail server to actually deliver the messages and this was not happening. The error I found in the mail log that helped was “stat=Deferred: Temporary AUTH failure”. I was able to find the resolution to the issue right on the Sendmail.org site.
I use my sendmail as a client and up until last week I never had any issue with the setup I was using. I am still not sure if I began having an issue with sendmail because it was updated or if it was just my ISP found the security issue with the way I was using it, but eithr way, it stopped working correctly.
Here is the error:
----- The following addresses had permanent fatal errors -----
<apache@localhost.localdomain>
(reason: 550 Banned rcpt apache@localhost.localdomain *@localhost.localdomain)
----- Transcript of session follows -----
... while talking to mail.cableone.net.:
>>> RCPT To:<apache@localhost.localdomain>
<<< 550 Banned rcpt apache@localhost.localdomain *@localhost.localdomain
550 5.1.1 <apache@localhost.localdomain>... User unknown
Final-Recipient: RFC822; apache@localhost.localdomain
Action: failed
Status: 5.1.1
Remote-MTA: DNS; mail.cableone.net
Diagnostic-Code: SMTP; 550 Banned rcpt apache@localhost.localdomain *@localhost.localdomain
Last-Attempt-Date: Mon, 18 Aug 2008 21:45:23 -0500
---------- Forwarded message ----------
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <apache@localhost.localdomain>
Date: Mon, 18 Aug 2008 20:45:31 -0500
Subject: Returned mail: see transcript for details
----- The following addresses had permanent fatal errors -----
<support@cityofdilworth.com>
(reason: 550 Banned from (apache@localhost.localdomain) (*@localhost.localdomain))
----- Transcript of session follows -----
... while talking to mail.cableone.net.:
>>> MAIL From:<apache@localhost.localdomain> SIZE=1521
<<< 550 Banned from (apache@localhost.localdomain) (*@localhost.localdomain)
554 5.0.0 Service unavailable
Final-Recipient: RFC822; support@cityofdilworth.com
Action: failed
Status: 5.0.0
Diagnostic-Code: SMTP; 550 Banned from (apache@localhost.localdomain) (*@localhost.localdomain)
Last-Attempt-Date: Mon, 18 Aug 2008 20:45:31 -0500
---------- Forwarded message ----------
To resolve the issue, simply follow the instructions to setup SMTP AUTH that were provided by Benji Fisher. To start, log onto your machine as root.
(sendmail.mc and sendmail.cf) are located, usually /etc/mail/auth/):# mkdir auth
# chmod 700 authauth/client-info):AuthInfo:your.isp.net "U:root" "I:user" "P:password"
filling in your ISP’s mail server, your user name, and your password. (Note: Earthlink, and perhaps other ISP’s, requires your full e-mail address as a user name.)
root:# cd auth
# makemap hash client-info < client-info
# chmod 600 client-info*
# cd ..sendmail.mc file, filling in your ISP’s mail server:define(`SMART_HOST',`your.isp.net')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnlsendmail.cf:# m4 sendmail.mc > sendmail.cf# service sendmail restart or # /etc/init.d/sendmail restartThat should take care of the issue!
Humm… interesting,
Some great advice,
Thanks for sharing,
Keep up the good work