New to Linux/RedHat, struggling with sendmail

Discussion in 'Server Operation' started by malco23, Dec 16, 2008.

  1. malco23

    malco23 New Member

    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 = "[email protected]";
    $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=[email protected], 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=<[email protected]>, ctladdr=<[email protected]> (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=<[email protected]>, ctladdr=<[email protected]> (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=<[email protected]>, ctladdr=<[email protected]> (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=<[email protected]>, relay=apache@localhost
    Dec 16 12:13:59 testwebserver sendmail[29289]: mBGHDxdg029289: from=<[email protected]>, size=334, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=testwebserver.lr.edu [127.0.0.1]
    Dec 16 12:13:59 testwebserver sendmail[29288]: mBGHDwQk029288: to=[email protected], 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=<[email protected]>, ctladdr=<[email protected]> (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 <[email protected]>
    (Deferred: Connection refused by gsmtp147.google.com.)
    <[email protected]>
    mBGHDxdg029289 18 Tue Dec 16 12:13 <[email protected]>
    (Deferred: Connection refused by gsmtp147.google.com.)
    <[email protected]>
    mBGHFCUu029296 18 Tue Dec 16 12:15 <[email protected]>
    (Deferred: Connection refused by gsmtp147.google.com.)
    <[email protected]>
    mBGGsi25029221 92 Tue Dec 16 11:54 <[email protected]>
    (Deferred: Connection refused by mx-pa-15.pobox.com.)
    <[email protected]>
    mBGGsdUt029217 92 Tue Dec 16 11:54 <[email protected]>
    (Deferred: Connection timed out with lr.edu.)
    <[email protected]>
    mBGGqECC029193 97 Tue Dec 16 11:52 <[email protected]>
    (Deferred: Connection refused by aspmx2.googlemail.com.)
    <[email protected]>
    mBGGsigB029225 223 Tue Dec 16 11:54 <[email protected]>
    (Deferred: Connection refused by mx-pa-11.pobox.com.)
    <[email protected]>
    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
     
  2. marpada

    marpada New Member

    Last edited: May 13, 2011

Share This Page