whitelist problem

informant

Renowned Member
Jan 31, 2012
828
11
83
Hi all, i add in administrator - user whitelist: *@domain.de in whitelist for all eMail Adresses of this domain and than in list for this domain as exsample *@*.dhl.com, but this dont work, if i receive on email account contact@domain.de a email of dhl it comes as spam detected. normal it was set to whitelist in proxmox. any ideas?
regards
 
Last edited:
The asterisk is not a valid regex character, but rather a shell expander known from MS DOS times.
If you want to use any character, you must allow any character [ . ] any number of times [ * ].
.*@.*\.domain\.de
The dot must be escaped [ \. ] so that it does not stand for any character [ . ].
However, in my opinion, the probability of incorrect filtering if you leave it as 'any character' is low if the domain is long enough.
.*@.*.domain.de

I don't see any advantage over filtering for .*domain\.de or even .*domain.de instead.

If you want to learn regex (you should!), you need PCRE, because Spamassassin is a Perl Programm.
ERE are similar (but less complete), BRE are quite different (and ugly in my opinion), but you should know the differences between BRE and ERE and also know, where to use what.
 
Last edited:
The asterisk is not a valid regex character, but rather a shell expander known from MS DOS times.
If you want to use any character, you must allow any character [ . ] any number of times [ * ].
.*@.*\.domain\.de
The dot must be escaped [ \. ] so that it does not stand for any character [ . ].
However, in my opinion, the probability of incorrect filtering if you leave it as 'any character' is low if the domain is long enough.
.*@.*.domain.de

I don't see any advantage over filtering for .*domain\.de or even .*domain.de instead.

If you want to learn regex (you should!), you need PCRE, because Spamassassin is a Perl Programm.
ERE are similar (but less complete), BRE are quite different (and ugly in my opinion), but you should know the differences between BRE and ERE and also know, where to use what.
sorry but proxmox mail gateway show in specs and manual not regex only *@domain.tld and *.domain.tld and ... where is information that i must use coding regex here? and what you mean with asterisk, pmg is not asterisk.
 
sorry but proxmox mail gateway show in specs and manual not regex only *@domain.tld and *.domain.tld and ... where is information that i must use coding regex here? and what you mean with asterisk, pmg is not asterisk.
Asterisk is the english word for the star-symbol [ * ].
As far as i know:

If you chose "add domain" or "add email" you cannot use any wildcard (asterisk symbol) at all. You can only enter text "as is", character by character.

If you chose "regular expression" [regex, "Regulärer Ausdruck" in german], you can use 'wildcards', but they have to be in PCRE Regex style (because PCRE origin from Perl and Spam Assassin is written in Perl language)

How do i know. I don't know. "self explaining" is not what you wanted to hear, i think?

So, choose Regular Expression and enter the domain as told before.


Edit: https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmg_mailfilter_who
It's in the manual: "Enter a single E-Mail Adress" or "Enter the domain part of an email adress". There is no asterisk (wildcard) and it is explained, that a wildcard is NOT supported (it is emphrasized that it only matches a single e-Mail/Domain).

You have to use Regex, if you want to match multiple domains at once. It is not that complex: https://www.debuggex.com/cheatsheet/regex/pcre

And you can even play games with regex to learn: https://regexcrossword.com
 
Last edited:
regex are no problem for me, in last time i dont need it in pmg :) i would change and test again.

*@*\.dhl.\com dont work and [*]@[*]\.dhl\.com don work to every error without \ it works in pgm is also not the problem what i have here in filter
regards
 
Last edited: