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 sendmail disabled?

Discussion in 'E-mail Discussions' started by [JZ], Jan 14, 2006.

  1. [JZ]

    [JZ] Member

    Joined:
    Nov 4, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    Hope someone can help.

    Have a new setup of WHM/cPanel running on Fedora Core 4.
    Is sendmail disabled by default and do i have to do a installation?
    As PHP will not send out any mails.

    Looking into phpinfo i see...
    sendmail_path /usr/sbin/sendmail -t -i
    listed.

    But i have been told that if there is any error with sendmail the '-t -i' will be displayed.

    Any help would be appreciated.

    Thanks.
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Please make sure the option >> 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.

    is not selected
     
  3. [JZ]

    [JZ] Member

    Joined:
    Nov 4, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the quick reply.

    I have tried this before and the problem still persists. :confused:

    Any other ideas?

    Thanks.
     
  4. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    :)
    Check your logs to see if there is any indications as to this issue.
    For realtime when trying to send a mail use
    tail -f /var/log/exim_mainlog
    HTH
    :)
     
  5. [JZ]

    [JZ] Member

    Joined:
    Nov 4, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Well this is what i see...

    Code:
    imapd[17790]: Logout user=??? domain=??? host=localhost [127.0.0.1]     
    cpanelpop[17801]: Connection from host=127.0.0.1 to ip=127.0.0.1
    cpanelpop[17801]: Session Closed host=127.0.0.1 ip=**.*.***.*** user=root realuser= totalxfer=54
    spamd[3684]: spamd: connection from localhost [127.0.0.1] at port 36258
    spamd[3684]: spamd: setuid to root succeeded
    spamd[3684]: spamd: still running as root: user not specified with -u, not found, or set to root, falling bac$
    spamd[3684]: spamd: processing message <GTUBE1.1010101@example.net> for root:99
    spamd[3684]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/site_perl/5.8.7/Mail/SpamAssassin$
    spamd[3684]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.beast.wick$
    spamd[3684]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfil$
    spamd[3684]: Can't call method "finish" on an undefined value at /usr/lib/perl5/site_perl/5.8.7/Mail/SpamAssa$
    spamd[3684]: spamd: identified spam (1000.0/5.0) for root:99 in 0.0 seconds, 834 bytes.            
    spamd[3684]: spamd: result: Y 999 - GTUBE,NO_RECEIVED,NO_RELAYS scantime=0.0,size=834,user=root,uid=99,requir$
    spamd[3635]: prefork: child states: II
    
    Something to do with permissions and spam assassin?
    Don't think this is causing the problem. :confused:
     
    #5 [JZ], Jan 14, 2006
    Last edited: Jan 14, 2006
  6. [JZ]

    [JZ] Member

    Joined:
    Nov 4, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Have disabled spam assassin and no longer get the above.
    Only pop connections are recorded, nothing localhost related when using php sendmail.
    exim_log shows no errors with localhost mail.
     
    #6 [JZ], Jan 14, 2006
    Last edited: Jan 14, 2006
  7. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Looks to me like your lock file can't be written to or created in your tmp directory. Verify and reset permissions on both the directory and the lock file and see if you can enable SA again.

    Edit: Actually, now that I look at it again it's trying to create the directory called '.spamassassin' in your root dir. Try manually creating it for SA and run it again...
     
    #7 mctDarren, Jan 14, 2006
    Last edited: Jan 14, 2006
  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
    If you're still having the problem, check for the file /etc/eximmailtrap anf if it exists delete it and then edit /var/cpanel/cpanel.config and set eximmailtrap=0
     
  9. [JZ]

    [JZ] Member

    Joined:
    Nov 4, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much chirpy, you have managed to stop me pulling out my hair! :D

    spamassassin is still playing up after resetting permissions, have yet again disabled it for now.
     
Loading...

Share This Page