View Single Post
  #1  
Old 16th December 2008, 18:37
malco23 malco23 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links