[Exim] SpamAssassin and procmail -> exim script.

Top Page
Delete this message
Reply to this message
Author: Andrzej Kasperowicz
Date:  
To: exim-users
Subject: [Exim] SpamAssassin and procmail -> exim script.
Hi!

Could you please write me an equivalent of the below quoted procmail
script under exim?

==========
# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 256000
| /home/permanent/andyk/sausr/local/bin/spamassassin


# Mails with a score of 15 or higher are almost certainly spam (with
0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
# :0:
# * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
# almost-certainly-spam
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*
/dev/null

# All mail tagged as spam (eg. with a score higher than the set
threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
probably-spam

===============

Procmail does not work correctly (mails are lost when using procmail) on
my server, and the admin says that he has not got the time to fix it.
He recommended using exim filter giving his own example:

========
You would probably be better off using a .forward file using Exims mail
filters.
Here is the .forward I use. (You'll want to edit the header match)

# Exim filter
if $message_headers: contains "X-Pengus-Spam-Flag: YES"
then
save /home/pookey/.SPAM/
finish
endif
==========

However, that filter would copy every suspicious mail into the file,
while the procmailrc code presented above would divide mails
depending on how many "spam" points it gets (I want to direct high score
spam mails directly into /dev/null).

As I don't know exim scripts, please help me to write that one!

Many thanks!

Cheers!
Andy.