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.

PHP mail() not relaying

Discussion in 'E-mail Discussions' started by apc1, Oct 3, 2005.

  1. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I have several customers using the PHP mail() and it is not relaying messages to external mailboxes. It does appear, from initial observations that it is sending mail to accounts actually on the server.

    Any idea how to fix this?

    Thanks.
     
  2. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    Re:

    Hi,
    make sure you use a valid smtp username and password if you've dis-allowed nobody's mail from Root WHM.
    you should also enable "phpsuexec ".

    if this doesn't helps, look into log for more details.

    see ya,
    mohit
     
  3. section31

    section31 Active Member

    Joined:
    Sep 3, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio
    yeah, go into tweak settings. I bet "nobody" has been forbidden from sending mail for security purposes.
     
  4. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    "Nobody" is allowed to send mail to remote addresses.

    I once compiled Apache for phpsuexec but it caused alot of major issues for alot of sites such as causing .htaccess not to work and several other things that caused the affected sites to not load.

    Anyway WHM says:

    Prevent the user 'nobody' from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)

    Which implies that phpsuexec is not required.

    Any other suggestions please?

    Thank you.
     
  5. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I had heard that it had been picked up again, but haven't been able to find any evidence. cPAnel have said that they will continue to support it, though, while it still works with apache. Shame the php developers can't take real world web hosting security into account :)
     
  7. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Thanks; I did this and the message did not appear in the Exim queue which is what I have been observing before.

    Messages are being delivered locally to accounts on the server, but not being relayed to Exim it seems.

    Any further ideas?

    Thanks.
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That doesn't make sense. You should see the email being relayed in exim_mainlog, if you don't then it's not reaching exim and your problem lies elsewhere. If it is being logged in exim_mainlog then you need to follow the email delivery process in it and post it here if you don't understand it.
     
Loading...

Share This Page