On Wed, 2008-12-17 at 18:21 -0500, Sam Varshavchik wrote:
> Courier has several different APIs by which
> incoming mail can be inspected or filtered before Courier accepts mail from
> the remote mail server, and, if unwanted, Courier then refuses to accept the
> message from the remote server.
Please give me some references or clues on this. I have Courier running
with a global /etc/courier/maildroprc file, which is basically delivery
mode instructions. Within this file, Maildrop runs clamav and
SpamAssassin, in that order, along with several custom scripts, the end
result of which is that a user's inbound email is analyzed, and disposed
of according to user preferences, optionally deposited into a
~/Maildir/.Spam IMAP folder, or ~/Maildir/.Quarantine/. All of this
works quite nicely, and I've written a good web UI for people to manage
their filtering options.
What I would like to do is re-organize this scheme so that Courier or
Maildrop can run SpamAssassin at the SMTP front door, and reject
outright any email with a spam score in excess of a given value, which I
can parse for with Maildrop with "if ( /^X-Spam-Level: *\*\*\*\*\*\*\*\*
\*\*/ ) { .... do something ....}". /etc/courier/maildroprc is parsed
in delivery mode, after an email has been accepted, so I can't put it
here. How would I do this with Courier - preferably globally?
Basically, the logic flow of my mail pipe should look something like
this:
Run inbound email through SpamAssassin and get a spam score before
accepting it for delivery
If (the spam score equals or exceeds 10) refuse to accept it.
Else (proceed to delivery mode)
# Delivery mode
Run clamav on the email
If (clamav identifies a virus) {
Deposit the email in ~/.Maildir/.Quarantine/new
}
If (spam score greater than a user-defined value) {
Re-write Subject line with "***SPAM***" (or something) in it
Deposit the email, at the user's option, in ~/Maildir/.Spam/new
}
I'm already doing the delivery mode processing, but I need to to analyze
incoming email during the SMTP session and reject it outright if it
meets certain criteria. What I don't know is how to inject a full
analysis into the process _prior_ to delivery mode.
--
Lindsay Haisley | "In an open world, | PGP public key
FMP Computer Services | who needs Windows | available at
512-259-1190 | or Gates" | http://pubkeys.fmp.com
http://www.fmp.com | |
------------------------------------------------------------------------------
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users