I'm in a shared hosting environment, with several domains on my account. I do NOT have root or even shell access. I need to be able to filter against the "Envelope-to:" field (matching a regex). Is there a way to do that?
More broadly, I'm trying to filter on recipients (with a regex). The only options I've found are:
1) Filtering on the TO field, which fails to work for email sent CC, BCC, DCC and via email lists.
2) Filtering on the "Any header" field, which fails to work when an email is sent to more than one person at a domain and false positives if a local email address is mentioned in any other field (just imagine the hilarity of [email protected] emailing [email protected] with a subject line "Who is this [email protected] jerk???" The "Any header" criterion would match that and send a copy to james, which while excellent comedy is less excellent mail filtering behavior.)
In case it weren't obvious from the examples: I'm trying to implement plus addressing, at least the incoming side of the problem. "[email protected]" needs to deliver to "[email protected]", while "[email protected]" needs to deliver to "[email protected]", while "[email protected]" needs to either bounce as user not found or deliver to either a special account for crap or /dev/null. Jack should be able to subscribe to the cpanellovers-l email list with the email address [email protected], and have the list emails delivered to [email protected] despite the fact that [email protected] and [email protected] never appear in the To field of the messages, and [email protected] is only reflected in the messages' Envelope-to field. Further, Jack should then be able to filter emails with an Envelope-to [email protected] and [email protected] and [email protected] to his "TechForums" folder, while his [email protected], [email protected], and jack+thesmith[email protected] emails get put in his "Family" folder.
Surely this possible? It's pretty basic. How is it done?
More broadly, I'm trying to filter on recipients (with a regex). The only options I've found are:
1) Filtering on the TO field, which fails to work for email sent CC, BCC, DCC and via email lists.
2) Filtering on the "Any header" field, which fails to work when an email is sent to more than one person at a domain and false positives if a local email address is mentioned in any other field (just imagine the hilarity of [email protected] emailing [email protected] with a subject line "Who is this [email protected] jerk???" The "Any header" criterion would match that and send a copy to james, which while excellent comedy is less excellent mail filtering behavior.)
In case it weren't obvious from the examples: I'm trying to implement plus addressing, at least the incoming side of the problem. "[email protected]" needs to deliver to "[email protected]", while "[email protected]" needs to deliver to "[email protected]", while "[email protected]" needs to either bounce as user not found or deliver to either a special account for crap or /dev/null. Jack should be able to subscribe to the cpanellovers-l email list with the email address [email protected], and have the list emails delivered to [email protected] despite the fact that [email protected] and [email protected] never appear in the To field of the messages, and [email protected] is only reflected in the messages' Envelope-to field. Further, Jack should then be able to filter emails with an Envelope-to [email protected] and [email protected] and [email protected] to his "TechForums" folder, while his [email protected], [email protected], and jack+thesmith[email protected] emails get put in his "Family" folder.
Surely this possible? It's pretty basic. How is it done?