Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web server (CentOS 5) that I need to be able to send mail from using PHP mail() function.

I have the PHP mail() function working properly. The Sendmail configuration is what I need to tweak.

I need to configure sendmail on the server to send "From" "".

I know, if you go to the sendmail FAQ, it will say "We discuss this in detail in the MASQUERADING AND RELAYING ( ) section" but I've been through that section over and over and over and still my mail log shows something like this:

Aug 4 15:11:11 tdbb sendmail[30582]: n73Mngeq028343:, ctladdr=apache@tdbb.localdomain (48/48), delay=20:21:29, xdelay=00:00:01, mailer=esmtp, pri=2129764, [], dsn=2.0.0, stat=Sent (Ok: queued as 6120181E4C)

I would rather it said:

Aug 4 15:11:11 tdbb sendmail[30582]: n73Mngeq028343:, (48/48), delay=20:21:29, xdelay=00:00:01, mailer=esmtp, pri=2129764, [], dsn=2.0.0, stat=Sent (Ok: queued as 6120181E4C)

Note the ctladdr part.

Here is what I've done:

In /etc/mail/

I have enabled the line:




Other than those two lines, I don't think I've changed anything from the default configuration.

Of course, I go to /etc/mail and run 'make', 'make restart' when I'm finished with the configuration file.

share|improve this question
up vote 1 down vote accepted

Ensure those settings have changed the file. I have had to battle sendmail configurations before and it takes some patience and understanding. I usually m4 the files for it to regenerate the cf file then restart the sendmail service.

Try these as well:


Those usually work for me. Good luck.

share|improve this answer
Thanks but I've got these set and they're not working for me. :( I'll keep playing and post results if I get it working. – JR Lawhorne Aug 4 '09 at 22:07
After some jogging of files, I think this is working properly now. Along the way, I also found an option to put the FROM address in the /etc/php.ini file as an argument to sendmail. (-f) Then, you also have to make sure you disable the warnings if they show up in your log as per:… – JR Lawhorne Aug 5 '09 at 4:08

Your Answer


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.