askbill at conducive
Dec 28, 2011, 11:14 PM
Post #3 of 4
Jeff Lasman wrote:
> On Friday, December 23, 2011 08:29:11 AM Jone Colmenero wrote:
>> Good afternoon guys!
>> I have the following question:
>> I need to redirect all mail in the Subject containing the term "Test
>> Email" to a particular account.
> Exim won't even see or care about the subject until the mail is received.
> Once it's received you can filter it with exim.pl.
Or, in DATA phase, with either a lookup for any reasonably predictable
string, such as 'Test message' (or in this case uber-common spam):
# DATA_9: Check for forbidden strings in Subject: IF found THEN WARN
(set an acl_m variable here, and have a router/transport act on it)
NB: 'badsub' is an ordinary flat file, one-entry-per-line structure
ELSE with a regex ('trigger' is a less-predictably-placed sub-string, in
any of the 'Received' headers in this example, but that's easy to change):
# DATA_SCAN_01A1: IF message is from known spam-engine THEN deny
regex = ^Received:: .*PowerMTA
(make this a 'warn' for your use, use it to set an acl_m to direct the
router/transport to where you want the message delivered)
Perl is useful - but best to save the overhead for the harder stuff...
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/