Trying to setup a filter with 2 regex rules for bcc:
The first regex (rule) checks if there is
[email protected] at the Delivered-To or the Envelope-to headers
Code:
(?:[Ee]nvelope-[Tt]o\:\s*john\@domain\.com)|(?:[Dd]elivered-[Tt]o\:\s*john\@domain\.com)
So it should work in a filter where
[any header] [matches regex] [1st regex]
the second regex (rule) checks if
[email protected] is not included in the To: and CC: headers
Code:
(?!(?:^[Tt]o\:\s*.*john\@domain\.com)|([Cc][Cc]\:\s*.*john\@domain\.com))
This should go
[any header] [matches regex] [2nd regex]
Combined those 2 rules with a logical
AND inside the cPanel filter should do the job. But it doesn't.
Do you see anything wrong?