Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have server A with an IP address only and a dummy FQDN (on the basis all machines should have a FQDN): All mail is relayed through another server elsewhere, which works fine.

On server A, Postfix rewrites the sender address with smtp_generic_maps = hash:/etc/postfix/generic. According to the Rewrite manual at, this should rewrite all outgoing external mail's Sender address:

$ cat /etc/postfix/generic

but it does not. postmap -q returns nothing.

This works:

It seems as though it is doing regex matching even though I specify type hash:. Clearly I am misunderstanding the manual.

I don't want to use regex or pcre expressions because there are only a couple of users (root and two others) and I don't want the overhead.

I can specify the users exactly and it works. But, I would like to know what I am misunderstanding for future reference.


share|improve this question

It works. According to the manual

But your postmap command is faulty. It should read:

postmap -q hash:/etc/postfix/generic
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.