Help with Greylisting regex please?


I am struggling with regex syntax for mail greylisting and I don’t find the online help very useful.
Can you please help?

What is the difference between those two below (assuming they are correct…)?

^mail\d+\.somedomain\.com$ and ^mail.*\.somedomain\.com$

My aim is to whitelist any mail server that matches For example or

Thank you



I’m using the same format as in your second example to accomplish the same that you want to do. And I think \d represents a digit and \d+ one or more digits… but i’m not an expert :wink:

Leffe (Blueforce)

To test regular expressions below use “grep -e” from the command line. If you see the hostname echo’ed the regex worked.
For example:

echo ‘’ | grep -e ‘^mail\S*$’

or in case it is not .com but say

echo ‘’ | grep -e ‘^mail\S*.somedomain.\S*$’

Take a look at but test out on the command line as above.