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.

I have server A with an IP address only and a dummy FQDN (on the basis all machines should have a FQDN): pants.net.invalid. 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 http://www.postfix.org/ADDRESS_REWRITING_README.html#remote, this should rewrite all outgoing external mail's Sender address:

$ cat /etc/postfix/generic
@pants.net.invalid     nick+pants@my.other.server.net

but it does not. postmap -q nick@pants.net.invalid returns nothing.

This works:

nick@pants.net.invalid     nick+pants@my.other.server.net

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.

Thanks.

share|improve this question

1 Answer 1

It works. According to the manual http://www.postfix.org/generic.5.html

But your postmap command is faulty. It should read:

postmap -q nick@pants.net.invalid hash:/etc/postfix/generic
share|improve this answer

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.