do anyone know how to alter the mail-from of a postfix mail server?

Example, I have a postfix mail server which sends mail for the domain example.org.

When a linux user, whose account is user.example.org (mapped in postfix/virtual to user@example.org), try to send an email, its mail from is user.example.org@host.example.org.

HELO hostname:  server.hostname.org
Source IP:      one ip here
mail-from:      user.example.org@server.hostname.org

Problems:

user.example.org instead of just user.

server.hostname.org instead of just example.org.

Desired mail-from: user@example.org.

This is causing me problems with SPF records for example (example.org differs from server.hostname.org)... any idea of what can be the problem?

Thanks in advance, Simon.

link|improve this question

74% accept rate
feedback

2 Answers

up vote 0 down vote accepted

I dont think you can have per user HELO hostname without having a separate instance of postfix for each user.

for info on how to mangle message contents see header_checks(5) manpage http://www.postfix.org/header_checks.5.html

link|improve this answer
feedback

See address masquerading in the postfix manual.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.