All;
I've made progress with this problem. By adding virtual_alias_maps =
regexp:/etc/postfix/virtual_users at the bottom of main.cf and adding the
regexps below, and running "postmap /etc/postfix/virtual_users ", the two
catch-alls work fine, but the "longer" matches do not and ultimately they
get delivered to the catch-all address. I'm almost there. What am I missing?
Thanks in advance;
Frank
>> From: Frank DiGennaro [ <mailto:[email protected]>
mailto:[email protected]]
>> Sent: Monday, October 5, 2020 1:34 PM
>> To: '[email protected]' < <mailto:[email protected]>
[email protected]>
>> Subject: Forward email based on Regexps
>>
>> Hello;
>> I'm pretty new to postfix but I'm really glad that I finally made the
switch from sendmail. Postfix is just so much easier to use. This is my
scenario. I need to route emails based on regexps and I know how to write
them but I'm not exactly sure where in the configs to put them. For example,
I want to do this
>>
>> /^To: [0-9]{10,11}@faxserver.acmewidgets.net/ faxadmin # The
user part is a fax number
>> /^To: [0-9]{10,11}@acmewidgets.net/ faxadmin #
The user part is a fax number
>> /^To: <mailto:.*@acmewidgets.net/> .*@acmewidgets.net/
admin # Catch-all for the domain acmewidgets.com
>> /^To: <mailto:.*@foo.com/> .*@foo.com/
fooadmin # Catch-all for the domain foo.com
>>
>> But I'm not sure these belong. Any insight at all would be greatly
appreciated.
>> Thanks;
>> Frank