On 6 Mar 2006, at 14:34, Tony Groves wrote:
> 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?
I suggest you use fax+number at domain.com - that way you don't have to
worry about the address and comment parts of the To: line being
separated. If the domain.com mail receivers accept + as a delimiter
(as many do), fax+anything at domain.com will be treated the same as
fax at domain.com.
Hope this helps,
Colm
--
Colm Buckley / colm at tuatha.org / +353 87 2469146 / www.colm.buckley.name
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!