0

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 [email protected] using smtp_generic_maps without a problem.

Unfortunately if I email somewhere like gmail the email is coming from "root ([email protected])". What would be the best way to manipulate root to something like "User Name"?

2 Answers 2

1

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.

-2

Postfix us getting 'root' from /etc/passwd. Type vipw and change the 5th field.

1
  • Changing the root entry in /etc/passwd does not sound like the best idea. Especially since the email is not even intended to be send with root as the sender adderss.
    – kasperd
    Jun 13, 2015 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .