Re: [exim] Forward mail except....

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
Subject: Re: [exim] Forward mail except....
On Friday 30 March 2007 18:20, techmon wrote:
> I have a VPS w/ CPANEL (which I understand uses Exim for mail).
>
> I would like to do the following:
>
> Have a particular email account forward a copy of all incoming emails to an
> external email address. However, here's the catch: All email except those
> emails that are tagged spam by spam assassin. (for instance, have spam
> assassin put "spam" or similar in the subject)
>
> How can I configure Exim to do this?


You can easily do this in the system filter. Please read the filter
specification (http://www.exim.org/exim-html-4.66/doc/html/filter.html)
(hint: the keywords are "unseen" and "deliver") as well as the main
specification (http://www.exim.org/exim-html-4.66/doc/html/spec_html/),
chapters 43 and 11 (look for "$header_"). If SpamAssassin is being called
from within Exim's ACL system you can check $spam_score_int instead of the
headers. To prevent outgoing mail from being forwarded you can add a
condition based on one or more of the $sender_* variables (ch. 11 again), or
perhaps more easily by setting an ACL variable (ch. 40).

Sorry for not giving a complete example, but I believe you learn by doing, and
that's a good thing since I suspect that you miss out on many of Exim's
powers by hiding it behind cPanel.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans