The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Outgoing Email Problem

Discussion in 'E-mail Discussions' started by webvision, Mar 9, 2009.

  1. webvision

    webvision Member

    Joined:
    Jun 21, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    hi i have a huge problem with outgoing email and after trying everything i found online, I'm stuck.

    Receiving emails works perfectly fine as well as sending through outlook smtp.
    The only thing that doesn't work is sending email via webmail (roundcude, squirrelmail)

    I disabled csf, checked smtp_block to 0

    /usr/local/cpnale/base/3rdparty/squirrelmail/config/config.php
    is empty so i cannot do anything!?

    also here's my exim_mainlog for the test email i tried to send:
    2009-03-09 20:59:39 H=(sj1.hostname.com) [127.0.0.1] Warning: Sender rate 4.2 / 1h
    2009-03-09 20:59:39 1LgqJn-0006H0-D3 <= webmaster@domain.com H=(sj1.hostname.com) [127.0.0.1] P=esmtpa A=fixed_login:webmaster@domain.com S=802 id=55426.68.39.0.47.1236646779.squirrel@sj1.hostname.com
    2009-03-09 20:59:40 1LgqJn-0006H0-D3 => destinationemail@gmail.com R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [209.85.217.63]
    2009-03-09 20:59:40 1LgqJn-0006H0-D3 Completed

    Anyone have any tips or suggestions?
    How can i trace an email and see the output.. the cpanel troubleshooter or trace email is useless

    Thank you
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    First line - indicates your server did a lookup for the gmail MX, found one, and is attempting delivery.

    Second line - In bold, you see Completed. This indicates that the mail was indeed sent successfully from your server to Google - and that Google accepted it. Your outbound mail (in that log at least) works fine.

    If it isn't in the Inbox of destinationemail@gmail.ccom, then check the Spam folder. It's in one of the two unless it is being filtered into some other folder or deleted by some message rule on Google. But Google did indeed accept responsibility for delivering it to their customer.

    If the email ended up in the spam folder on Gmail, then you need to investigate whether the IP that your server uses when sending mail is on any RBLs (realtime blacklists). And you need to make sure it has a valid reverse DNS entry. But the logfile shows it was delivered - bottom line.

    Mike
     
  3. brojatech

    brojatech Registered

    Joined:
    Feb 27, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I am also have the same issue.

    I have narrowed it down to possibly a user issue. I wrote a script that sends a test email. I ran it from the command line (# php -f testscript.php) as a different user, and it sends with no problems. I try to run the same script from a browser (user: nobody i am guessing), and it fails.

    I have searched all over and cannot find a fix. Any assistance is greatly appreciated. I am hoping that if i go to sleep and quit thinking about it, the resolution will come in the form of a wonderful dream! ;-) Or maybe a response to the post!

    Thanks in advance,

    Aaron

    --- When logged into roundcube or squirrelmail it sends and receives with no issues. The problem only exists when sending email from browser ---

    (replaced actual host with <host.com>, and the "TO" address is valid)
    Log file:

    2009-03-09 22:50:11 cwd=/home/username/public_html/includes/common 2 args: /usr/sbin/sendmail -t
    2009-03-09 22:50:11 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1Lgs2l-0008B4-Ik
    2009-03-09 22:50:11 1Lgs2l-0008B5-Iv <= <> R=1Lgs2l-0008B4-Ik U=mailnull P=local S=1452 T="Mail failure - malformed recipient address"
    2009-03-09 22:50:11 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1Lgs2l-0008B5-Iv
    2009-03-09 22:50:15 1Lgs2l-0008B5-Iv ** nobodymail@host.com <nobody@host.com> R=lookuphost T=remote_smtp: SMTP error from remote mail server after RCPT TO:<nobodymail@host.com>: host aspmx.l.google.com [209.85.217.21]: 550-5.1.1 The email account that you tried to reach does not exist. Please\n550-5.1.1 try double-checking the recipient's email address for typos\n550-5.1.1 or unnecessary spaces. Learn more at\n550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 25si3735320gxk.94
    2009-03-09 22:50:15 1Lgs2l-0008B5-Iv Frozen (delivery error message)
     
    #3 brojatech, Mar 9, 2009
    Last edited: Mar 9, 2009
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Based upon your logfile it is sending, so that's a good thing. Google sees it, rejects it. The question is why.

    My guess would be that the FROM: address is not actually a valid email address on the server and that Google uses sender verification to verify that the sender exists before it accepts mail.

    Make double sure that both the sender address and recipient address in your PHP script are _valid_ email addresses. If you still get errors, go one step further and make sure that the FROM: address is not an address that starts with nobody@ .

    Gmail folks are pretty smart - I wouldn't suspect that they would reject that email and give that reason if it didn't have something to do with it being a badly formed email address. But who knows. So try this and see what happens.

    Mike
     
  5. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Hmm, looking closer at your mail log, Exim is telling you that the problem is a malformed address even before it attempts to send it to Google.

    2009-03-09 22:50:11 1Lgs2l-0008B5-Iv <= <> R=1Lgs2l-0008B4-Ik U=mailnull P=local S=1452 T="Mail failure - malformed recipient address"

    So despite the fact that you think everything looks fine, make sure you are setting the recipient address in your PHP with the proper syntax that the PHP function requires.

    Mike
     
  6. brojatech

    brojatech Registered

    Joined:
    Feb 27, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your quick responses. I will take a look at this today and will again verify the email addresses.
     
  7. brojatech

    brojatech Registered

    Joined:
    Feb 27, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    **UPDATE**
    Found part of the issue. I had multiple email addresses in the php script ex.
    mail("user@domain.com; user2@domain.com", $subject, $message, $headers);
    when i only sent to one address it flowed correctly.

    This example worked perfectly on another host before I got my dedicated server. I will just modify my script to loop through an array.

    Thanks for the assistance.

    -Aaron
     
    #7 brojatech, Mar 10, 2009
    Last edited: Mar 10, 2009
Loading...

Share This Page