Hi, I cannot get the email filter to work. I am looking to delete mail arriving from a specific email address. I have created a filter Choosen Source -> header Contains email address from action delete active checked this doesn't work. I am using ISPconfig version 3.2.2 it is up to date. Thanks in advance
### BEGIN FILTER_ID:24 if header :regex "[email protected]" [".*"] { discard; stop; } ### END FILTER_ID:24 ### BEGIN FILTER_ID:23 if header :regex "[email protected]" [".*"] { discard; stop; } ### END FILTER_ID:23 ### BEGIN FILTER_ID:22 if header :regex "[email protected]" [".*"] { discard; stop; } ### END FILTER_ID:22
You entered the fields incorrectly, when using regex you have to specify the header and the regex to match; in your case it is looking for a header named '[email protected]' with any content. It sounds like you want to look for a 'From' header content '[email protected]'. A regex match uses a double slash as an escape char, so try entering: Code: From: email1@yyyyy\\.com And if you want to match the smtp envelope sender, it is usually found in Return-path, so you might add a second rule with: Code: Return-path: <?email1@yyyyy\\.com>?
Or do it the easy way and select 'From' as source in the filter wizard, then contains. Using regex as you did is not required.
I initially tried "from" and "is" with the email address but it didn't work. I've made the changes and now the waiting starts. I'll report back. Thank you both!
This can't work as the email address is not [email protected], it just contains [email protected]. You can see that when you look at the source of an email in your mail client, an email address is something like "John Doe <[email protected]>", so 'contains' must be used, unless you specify the full address.
This is working great. The only issue is I would like the email to go to the trash or deleted folder. Is this possible?