PHP mail() stopped working, sendmail error

Discussion in 'Site & Server Administration' started by VideoWhisper.com, Dec 19, 2014.

  1. #1
    Error logs from cPanel shows these messages when trying to email using php mail() .
    var_dump(error_get_last()) returns NULL

    tail /var/log/maillog shows:

    Any idea?
     
    VideoWhisper.com, Dec 19, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    That looks like a logging-error - does the email actually get sent?
     
    PoPSiCLe, Dec 20, 2014 IP
  3. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #3
    How big is your log file? A little search shows others that had similar problems with solutions ranging from taking care of a huge log file to a file permission issue.
     
    billzo, Dec 20, 2014 IP
  4. VideoWhisper.com

    VideoWhisper.com Well-Known Member

    Messages:
    330
    Likes Received:
    6
    Best Answers:
    2
    Trophy Points:
    113
    Digital Goods:
    2
    #4
    What log file?

    ls -l /var/log/maillog
    -rw------- 1 root root 766100 Dec 27 04:20 /var/log/maillog

    ls -l /var/log/messages
    -rw------- 1 root root 15940517 Dec 27 04:20 /var/log/messages
     
    VideoWhisper.com, Dec 27, 2014 IP
  5. VideoWhisper.com

    VideoWhisper.com Well-Known Member

    Messages:
    330
    Likes Received:
    6
    Best Answers:
    2
    Trophy Points:
    113
    Digital Goods:
    2
    #5
    This fixed it:
    chmod 4755 /usr/sbin/exim
     
    VideoWhisper.com, Dec 27, 2014 IP