I'm up against a problem with Postfix in that I want to rewrite address
headers in certain messages but I can't get it to do it the way I want.
An example would be a message sent to an address such as "1234567 at fax".
I want to have the To header rewritten as "1234567<fax at domain.com>" (so
that the fax number is preserved for the fax server to detect) and the
message routed to "fax at domain.com". So, in main.cf I add the line:
canonical_maps = /etc/postfix/canonical_maps
and in canonical_maps:
/^(\d+)@fax$/ $1<fax at domain.com>
and reload Postfix. The result is that the message gets rerouted as
intended, and a new X-Original-To header is added showing the original
address, _but_ the To header ends up with just "fax at domain.com", losing
the fax number.
Can any Postfix expert out there tell me how I can get this working, please?
Thanks a lot.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!