Upgrade Postfix MySQL map syntax to use the new query param
In the main.cf file there is an option like this:
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
This 7 years old file https://git.ispconfig.org/ispconfig/ispconfig3/blob/master/install/tpl/mysql-virtual_sender.cf.master still use the old syntax that changes since Postfix 2.2.
This link http://www.postfix.org/MYSQL_README.html says:
For Postfix 2.2 and later The SQL query template:
query = SELECT forw_addr FROM mxaliases WHERE alias='%s' AND status='paid'
For Postfix releases prior to 2.2.
select_field = forw_addr table = mxaliases where_field = alias additional_conditions = AND status = 'paid'
As we can see, the query option seems to be more flexible, since we can use like
operator. This will allow sender restrictions in the mail_access table to be partial email name, or domain only.
Today ISPConfig manuals says we can add whitelist / blacklist using only @domain.com, or full address. But only full address works since the old version uses equal
operator