Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to send mail via PHP's mail() function, but it hangs the script. I tried using sendmail on command line (CentOS 5.8) as was suggested in many posts I've read but it also hangs. This is what im putting in:

sendmail -v myemail@mail.com < message.txt

which says:

myemail@mail.com... Connecting to [127.0.0.1] via relay...

and that's it. It hangs there.

Here are the last 2000 lines of logs from /var/log/maillog: logs

I'm clueless as to how to continue debugging this issue, please advise.

share|improve this question
    
What do your logs say? /var/log/syslog, /var/log/mail.log, /var/log/mail.err ? –  Lucas Kauffman Jul 30 '12 at 9:33
3  
Ok, let's tackle the elephant in the room... Have you configured a mail server/relay on your machine? –  Bart De Vos Jul 30 '12 at 9:43
    
Are you on a virtual machine? If so can you post the output of iptables -L ? –  adamo Jul 30 '12 at 10:07
    
@BartDeVos no, I don't know how to do that or what that means. adamo I'm not on a virtual machine. Added logs to the question –  MeLight Jul 30 '12 at 10:48

1 Answer 1

up vote 0 down vote accepted

I've uninstalled sendmail and postfix and then installed postfix again. That fixed it for for me.

I did this:

$ yum remove sendmail
$ yum remove postfix
$ yum install postfix
$ service postfix start
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.