Php scripts does not send e-mail (This is *URGENT*)

zex

Well-Known Member
Aug 12, 2001
98
0
306
cPanel Access Level
Root Administrator
I have one urgent problem and I willbe gratefull to all people who helps me with this one:
Problem is next: Php scripts does not send e-mail, they dont report any error so i suspect that the problem is somwhere in connection of exim and php scripts becouse i found in exim_mainlog this error (2001-12-29 12:03:19 16KHGp-0006Xy-00 <= [email protected] U=www-data P=local S=438) and after that (2001-12-29 16:55:06 SMTP command timeout on connection from localhost [127.0.0.1])

does somebody have some idea how to debug this problem and find what excatly caused this error to ocure.
Tnx.
 

zex

Well-Known Member
Aug 12, 2001
98
0
306
cPanel Access Level
Root Administrator
Litle update to this..
after few hours of tracing and playing and changing php.ini i find out that if I run sample script from shell, everything works fine mail is sended, but if i run that script trough apache by calling it from web no mail.... :cool:
 

xnull

Well-Known Member
Sep 9, 2001
156
0
316
We had this problem for 2 weeks, where sendmail and smtp would not send mail from anything on the server, including perl/php scripts.

I\'m not sure what fixed the problem, but Burst finally did something to resolve it. Then suddenly tons of I guess backlogged emails sent out to people and we received a lot of old ones too (probably not all of them though).
 

feanor

Well-Known Member
Aug 13, 2001
836
0
316
Howz the permissions on the sendmail binary? (/usr/sbin/sendmail).....

SUID included any longer? You\'ll need that for the functionality you are talking about, it might have fallen apart briefly.
 

zex

Well-Known Member
Aug 12, 2001
98
0
306
cPanel Access Level
Root Administrator
-rwsr-xr-x 1 root root 13967 Dec 22 17:15 /usr/sbin/sendmail*

sendmail binary is suid, in /usr/local/lib/php.ini is defined sendmail_path = /usr/sbin/sendmail -t -i
So i\'m out of ideas what may be wrong with this.
 

zex

Well-Known Member
Aug 12, 2001
98
0
306
cPanel Access Level
Root Administrator
Solution:
Somehow i have file /usr/sbin/sendmail wich is NOT symlink on /usr/sbin/exim. Is some other binary wich call\'s /usr/sbin/exim.
I remove it and create symlink to /usr/sbin/exim and everything works fine now.