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 just moved to a new server, we're using postfix now instead of sendmail. The issue is that mail sent from PHP using the mail command (which interfaces with /usr/sbin/sendmail/) shows up in the clients inbox, and the 'friendly' name shown is Apache. Which is obviously confusing to an end user, causing them to wonder why they are being emailed by a native american indian tribe.

Postfix (sendmail wrapper) is taking whatever you put in the -f parameter, and tacking on the Linux user who called the program. So the from line in the header winds up looking like this:

From: (Apache)

Causing the client to use whats in the parenthesis as the 'friendly name'.

I could manually set the from header in php, but i'd rather just stop postfix from doing that, because i'd have to edit php code in a hundreds of places.

share|improve this question

My understanding of your issue is that the "GCOS" field of the password entry for the apache user is being sent. Do you really need a "friendly name" as you call it? If not, have you thought of removing the GCOS name from the apache password entry? Then there should be no "friendly" name attached to these email notes.

share|improve this answer
Wow, that was the last place i thought the issue would be. I just edited my passwd file and cleared the "GCOS" field, works as expected now. thanks! – profitphp Aug 30 '10 at 23:37

Your Answer


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