October 21, 2010

"DSN: Service unavailable" when relaying email through Red Hat Linux


I wrote a simple JSP that relays mail off of the same server the code is hosted on. The /var/log/maillog file showed the following error:

Oct 21 19:41:17 oradev sendmail[7681]: o9LNpH03007681: from=<automatedemail@car.somefakedomain.org>, size=385, class=0, nrcpts=1, msgid=<15307386.1287705077663.JavaMail.root@oradev.com>, proto=ESMTP, daemon=MTA, relay=localhost []
Oct 21 19:41:19 oradev sendmail[7683]: o9LNpH03007681: to=<test@ipnweb.org>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=120385, relay=aspmx.l.google.com. [], dsn=5.0.0, stat=Service unavailable
Oct 21 19:41:19 oradev sendmail[7683]: o9LNpH03007681: o9LNpJ03007683: DSN: Service unavailable
Even though the 'to' email address is valid, the 'from' email address was intentionally spoofed (i.e., the 'from' address is not a real address).


1. Make sure that the domain name of the 'from' email address is a valid mail server, otherwise it might be rejected.

Obviously make sure that your DNS is configured correctly and that both the 'to' and 'from' servers are accessible.

Rerunning the scenario now works, and /var/log/maillog shows:
Oct 21 19:50:50 oradev sendmail[7678]: o9LNoouZ007678: from=<automatedemail@somerealdomain.org>, size=375, class=0, nrcpts=1, msgid=<1269514.1287705050212.JavaMail.root@oradev.com>, proto=ESMTP, daemon=MTA, relay=localhost []
Oct 21 19:50:51 oradev sendmail[7680]: o9LNoouZ007678: to=<test@ipnweb.org&gt;, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120375, relay=alt1.aspmx.l.google.com. [], dsn=2.0.0, stat=Sent (OK 1287705051 u36si4103378weq.17)
Applicable Versions:

Red Hat AS 4 Update 4


  1. Since 1948, OMEGA in series with its reliable rolex replica performance and extraordinary design internationally. replica watches uk This series is the predecessor of the British Army special waterproof watch during World War ii. rolex replica watches In 1948, OMEGA launched the first in the series. The watch is equipped with a different version of the OMEGA 28.10 mm automatic movement, and equipped with small seconds disc or central second hand instructions, also simultaneously launched the observatory certification version watch.

  2. Look At This this post hop over to these guys discover here internet look at these guys