Help with Mail Greylisting

Hello,

I can whitelist fixed hostnames (or IPs) but I am having problem to create a regular expression.
In specific I want to whitelist email coming from outlook.com servers.
One of the servers is mail-am1on0121.outbound.protection.outlook.com so I want to whitelist everything that comes from a hostname that matches this > *.outbound.protection.outlook.com

I tried using ^mail-*.outbound.protection.outlook.com$ (and selected the regular expression tickbox) however it does not work.
What am I doing wrong?

Any help is much appreciated.
Thank you

Howdy,

Take a look at the “Whitelisting” section in the postgrey man page for some examples.

However, within regular expressions, an “*” character refers to 0 or more of the previous expression.

So to create a wildcard, you would want to use “.*”, rather than just “*”. It can also be helpful (but not necessary) to escape . characters that aren’t meant to be wildcards.

In all, that would look something like:

mail-.*\.outbound\.protection\.outlook\.com