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 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: sales@whatever.com (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

1 Answer 1

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

 
discard

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