Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want postfix to send out all email via noreply@mydomain.com

My main.cf looks like

sender_canonical_maps = regexp:/etc/postfix/canonical
local_header_rewrite_clients = static:all

and my canonical file looks like

/domain.local/ noreply@mydomain.com

Anybody know why this isn't working? I have already tried restarting the server.

I am not sure what the /domain.local/ part does, as the content was motivated by a blog post.

share|improve this question
Are you sure all your outgoing emails look like user@domain.local? Check /var/log/mail or /var/log/maillog file. –  Laurentiu Roescu Nov 20 '12 at 7:07
@LaurentiuRoescu I don't know what /domain.local/ means. A lot of my outgoing emails looks like uname321@yahoo.com . Basically I need to change the FROM field to be noreply@mydomain.com –  Mikhail Nov 20 '12 at 20:25

1 Answer 1

up vote 1 down vote accepted

domain.local is the pattern. When pattern matches an email address it is replaced with noreply@domain.com.

If you want everything replaced you can use .* as the pattern.

share|improve this answer

Your Answer


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.