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
[email protected]
but it does not. postmap -q
[email protected] returns nothing.
This works:
[email protected] [email protected]
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.