spamfilter users form don't allow amavis catchall pattern
What is happening and what is wrong with that?
In the web interface, in spamfilter users form, if in the email pattern i write the amavis catchall "@." pattern (see https://docs.iredmail.org/amavisd.sql.db.html#lookup_sql_dsn) it is modified on save and replaced by "@"
What should happen instead?
It should allow to store the catchall pattern
environment
Server OS: debian
Server OS version: buster
ISPConfig version: 3.1.15p2
proposed fix
I think we can check if $domain is the amavis pattern "@." to the second line of the method "_idn_encode_decode" on the file "interface/lib/classes/functions.inc.php" like this
private function _idn_encode_decode($domain, $encode = true) {
if($domain == '') return '';
if($domain == '@.') return $domain; //amavis catchall pattern
if(preg_match('/^[0-9\.]+$/', $domain)) return $domain; // may be an ip address - anyway does not need to bee encoded