I want to be able to say:
If the headers do NOT contain Special-String then Discard
in an email filter. Regex is I'm sure the way to go:
Filter ... Any Header .. that ... matches regex ... ???? Destination ... Discard
but I'm not familiar with designing regex expressions. Can anyone help?
EDIT: Actually, thinking this through, what I want to say is "if NONE of the headers contain Special-String..."
The application is this: mail is passed through an antispam device before it arrives at the CPanel server. The device adds a certain header to mail that it processes. However, some spammers ignore the MX record and mail direct to the main domain IP, hence bypassing the antispam device. I want to ensure that only mail that:
a) Was sent from the antispam device, or
b) Originates on the same server the domain is hosted on
gets accepted.
Ideas welcome!
If the headers do NOT contain Special-String then Discard
in an email filter. Regex is I'm sure the way to go:
Filter ... Any Header .. that ... matches regex ... ???? Destination ... Discard
but I'm not familiar with designing regex expressions. Can anyone help?
EDIT: Actually, thinking this through, what I want to say is "if NONE of the headers contain Special-String..."
The application is this: mail is passed through an antispam device before it arrives at the CPanel server. The device adds a certain header to mail that it processes. However, some spammers ignore the MX record and mail direct to the main domain IP, hence bypassing the antispam device. I want to ensure that only mail that:
a) Was sent from the antispam device, or
b) Originates on the same server the domain is hosted on
gets accepted.
Ideas welcome!
Last edited: