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.

Is it possible to rewrite in postfix the local user that is sending email from the shell. I'm able to masquerade root@localhost to user@example.com using smtp_generic_maps without a problem.

Unfortunately if I email somewhere like gmail the email is coming from "root (user@example.com)". What would be the best way to manipulate root to something like "User Name"?

share|improve this question
add comment

1 Answer

It depends on how you "send mail from the shell."

You're looking at a message From: header, which is part of the e-mail message, and hence not of interest to an MTA like postfix.

When using sendmail(1), set a proper sender address in the RFC822 message you pass to it.

FOr details on how to provide a proper sender address in your chosen mail program, consult its documentation.

share|improve this answer
add comment

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.