* Rob Tanner <[email protected]> wrote: > I get email forwarded to me from a FAX server that I need to process and > then forward to a different server. The ³to² email address is always in the > form of <FAXnumber>@send.fax. The FAX number could be the phone number for > any FAX machine in the country and only the �[email protected]² is a constant. > Right now, I¹ve set up an alias that looks like ³*.send.fax > ³/opt/local/adm/aliasFilters/FAX.filter faxfilter² which seems like it > should work. When I point alias_maps to that file, and include the > send.fax domain in mydestination, the message bounces because it doesn¹t > recognize the user (which is simply one of an infinite possible phone > numbers). When I move the send.fax domain to relay_domains and point > virtual_alias_maps to the alias file, Postfix happily forward the message on > to the regilar mail server, substituting the file path for the ³to² address. > In no case does the message ever get delivered to the program. > > Can someone please tell me what I need to do to get this to work right? I¹m > running this in a separate instance of Postfix, so no matter what I do, I > won¹t screw up the main mail system.
Set up "fax.send" in virtual_alias_domains. In a PCRE map referenced by "virtual_alias_maps", add an entry like: /(.*)@fax.send/ [email protected],${1}final.mailserver This will redirect the message to <faxnumber>@final.mailserver and to the alias "localfax" (given that you substitue "my.domain" with a domain which is part of mydestination). In /etc/aliases, add localfax: |/path/to/program and issue "newaliases". Cheers Stefan
