Hallo

I wonder if I could add a regexp rule to my virtual_alias_maps so I could 
realize wildcard addresses, like:

somew...@mydomain.tld > fr...@mydomain.tld

At the moment I have:

virtual_alias_maps = 
mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf

and with RegEx I would write:

virtual_alias_maps = 
mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf,regexp:/etc/postfix/aliases_regex.cf

as I can read in:

https://superuser.com/questions/353488/regex-multiple-catch-all-setup-in-postfix

In: /etc/postfix/aliases_regex.cf

I would put then:

/^.*@mydomain.tld$/     fr...@mydomain.tld

Would that be correct?
I don’t want to just test it, it is a productive mailserver.

Thanks, frank

— 

My postfix config files:

/etc/postfix/mysql-virtual-alias-maps.cf

user = myuser
password = mypassword
hosts = 127.0.0.1
dbname = mymailserverdb
query = SELECT destination FROM view_aliases WHERE email='%s'


/etc/postfix/mysql-email2email.cf

user = myuser
password = mypassword
hosts = 127.0.0.1
dbname = mymailserverdb
query = SELECT email FROM view_users WHERE email='%s'

Postfix Version: 3.3.0-1ubuntu0.3 on Ubuntu 18.04.05 LTS


Reply via email to