HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   New to Linux/RedHat, struggling with sendmail (http://www.howtoforge.com/forums/showthread.php?t=29543)

malco23 16th December 2008 17:37

New to Linux/RedHat, struggling with sendmail
 
After searching the forums and other places on the web and trying various suggestions that I read for others, I have decided to post my problem, having had no luck in fixing it on my own so far.

I have a new web server running redhat enterprise 5.0. I'm using Drupal CMS, not that it matters, but I noticed the mail function was not working, so I started investigating. We host our own server, and use an external DNS for the web. The server name is testwebserver.lr.edu, and is registered with our external DNS. Port 25 is open. Using the following script and substituting a variety of email addresses, I get a browser message saying "Message successfully sent!" although no mail is being received on the other end:

<?php
$to = "anyname@domain.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>

The printout out from my maillog says:

Dec 16 11:54:44 testwebserver sendmail[29224]: mBGGsiKM029224: to=malco@pobox.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30523, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBGGsigB029225 Message accepted for delivery)
Dec 16 11:54:44 testwebserver sendmail[29227]: mBGGsigB029225: to=<malco@pobox.com>, ctladdr=<apache@testwebserver.lr.edu> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120728, relay=mx-pa-11.pobox.com. [208.72.237.33], dsn=4.0.0, stat=Deferred: Connection refused by mx-pa-11.pobox.com.
Dec 16 11:54:44 testwebserver sendmail[29223]: mBGGsi25029221: to=<malco@pobox.com>, ctladdr=<apache@testwebserver.lr.edu> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120597, relay=mx-pa-15.pobox.com. [208.72.237.18], dsn=4.0.0, stat=Deferred: Connection refused by mx-pa-15.pobox.com.
Dec 16 11:56:44 testwebserver sendmail[29219]: mBGGsdUt029217: to=<broyhill@lr.edu>, ctladdr=<apache@testwebserver.lr.edu> (48/48), delay=00:02:05, xdelay=00:02:00, mailer=esmtp, pri=120597, relay=lr.edu. [10.201.1.12], dsn=4.0.0, stat=Deferred: Connection timed out with lr.edu.
Dec 16 12:13:58 testwebserver sendmail[29288]: mBGHDwQk029288: from=apache, size=56, class=0, nrcpts=1, msgid=<200812161713.mBGHDwQk029288@testwebserver.l r.edu>, relay=apache@localhost
Dec 16 12:13:59 testwebserver sendmail[29289]: mBGHDxdg029289: from=<apache@testwebserver.lr.edu>, size=334, class=0, nrcpts=1, msgid=<200812161713.mBGHDwQk029288@testwebserver.l r.edu>, proto=ESMTP, daemon=MTA, relay=testwebserver.lr.edu [127.0.0.1]
Dec 16 12:13:59 testwebserver sendmail[29288]: mBGHDwQk029288: to=broyhillg@gmail.com, ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30056, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (mBGHDxdg029289 Message accepted for delivery)
Dec 16 12:13:59 testwebserver sendmail[29291]: mBGHDxdg029289: to=<broyhillg@gmail.com>, ctladdr=<apache@testwebserver.lr.edu> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120334, relay=gsmtp147.google.com. [209.85.147.27], dsn=4.0.0, stat=Deferred: Connection refused by gsmtp147.google.com.

Also, the printout from my mailq reveals:

-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
mBGGo7S4029181 8 Tue Dec 16 11:50 <root@testwebserver.lr.edu>
(Deferred: Connection refused by gsmtp147.google.com.)
<broyhillg@gmail.com>
mBGHDxdg029289 18 Tue Dec 16 12:13 <apache@testwebserver.lr.edu>
(Deferred: Connection refused by gsmtp147.google.com.)
<broyhillg@gmail.com>
mBGHFCUu029296 18 Tue Dec 16 12:15 <apache@testwebserver.lr.edu>
(Deferred: Connection refused by gsmtp147.google.com.)
<broyhillg@gmail.com>
mBGGsi25029221 92 Tue Dec 16 11:54 <apache@testwebserver.lr.edu>
(Deferred: Connection refused by mx-pa-15.pobox.com.)
<malco@pobox.com>
mBGGsdUt029217 92 Tue Dec 16 11:54 <apache@testwebserver.lr.edu>
(Deferred: Connection timed out with lr.edu.)
<broyhill@lr.edu>
mBGGqECC029193 97 Tue Dec 16 11:52 <apache@testwebserver.lr.edu>
(Deferred: Connection refused by aspmx2.googlemail.com.)
<webmaster@lrc.edu>
mBGGsigB029225 223 Tue Dec 16 11:54 <apache@testwebserver.lr.edu>
(Deferred: Connection refused by mx-pa-11.pobox.com.)
<malco@pobox.com>
Total requests: 7


OK -- where do I go from here? Many thanks. I am learning Linux the hard way, i.e., bought a book and teaching myself along with Google. No one in my company has a clue about this, including our server admin!!

thanks again

marpada 17th December 2008 02:37

First make sure that you don't have outgoing port 25 filetered by telneting remove mail servers to port 25, i.e.

$ telnet mx-pa-11.pobox.com 25
$ telnet gsmtp147.google.com 25

Also check that your IP isn't in a black list and has a reverse DNS record:

http://www.mxtoolbox.com/blacklists.aspx
http://postmaster.aol.com/tools/rdns.html
________
JAGUAR XKSS SPECIFICATIONS
________
Green crack


All times are GMT +2. The time now is 08:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.