Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    123

    Default PHP mail() not relaying

    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. #2
    Member
    Join Date
    Jul 2005
    Location
    Sticky On Internet
    Posts
    555

    Default 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
    Learn atleast A word Daily

    7+1 Dedicated Boxes with cPanel...

  3. #3
    Member
    Join Date
    Sep 2003
    Location
    San Antonio
    Posts
    33

    Default

    yeah, go into tweak settings. I bet "nobody" has been forbidden from sending mail for security purposes.

  4. #4
    Member
    Join Date
    Oct 2004
    Posts
    123

    Default

    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. #5
    Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    675

    Default

    tail -f /var/log/exim_mainlog

    watch the logs output when you're trying to send to an external address.

    phpsuexec is no longer being developed as far as I know.

    http://www.webhostgear.com/forums/showthread.php?t=16
    Upload Guardian 2.0 - Sign up for our early beta
    ServerProgress - Server security, consulting and assistance

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Quote Originally Posted by ramprage
    phpsuexec is no longer being developed as far as I know.
    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
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  7. #7
    Member
    Join Date
    Oct 2004
    Posts
    123

    Default

    Quote Originally Posted by ramprage
    tail -f /var/log/exim_mainlog

    watch the logs output when you're trying to send to an external address.

    phpsuexec is no longer being developed as far as I know.

    http://www.webhostgear.com/forums/showthread.php?t=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. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Relaying via PHP
    By jman1764 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-16-2006, 05:04 AM
  2. Relaying Mail from One Ip
    By psychodreams in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 11-12-2005, 09:03 AM
  3. Mail Relaying
    By sigep739 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-07-2004, 02:43 AM
  4. mail relaying or not...
    By wrightee in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-29-2004, 01:24 AM
  5. Mail Relaying
    By loststryk in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-05-2003, 11:35 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube