Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 17th December 2008, 03:37
marpada marpada is offline
Senior Member
 
Join Date: Sep 2008
Posts: 139
Thanks: 2
Thanked 14 Times in 14 Posts
 
Default

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

Last edited by marpada; 13th May 2011 at 02:59.
Reply With Quote
Reply

Bookmarks

Tags
redhat, sendmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Problem hiren_patel Installation/Configuration 13 7th January 2009 09:58
One Feature i need to know how to do in postfix to move from sendmail ZeroDni Server Operation 0 26th October 2007 22:03
Sendmail: "Relaying denied. Proper authentication required." oskare100 Server Operation 0 2nd October 2007 18:31
I by accident let webmin install sendmail ...? comedit Installation/Configuration 6 2nd June 2006 16:30
sendmail 8.13.6 on FC2 server with SASL/STARTTLS Anne H Server Operation 5 4th April 2006 22:19


All times are GMT +2. The time now is 21:45.


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