[Exim] Exim+SpamAssassin+Fetchmail

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Chris Bartram
Datum:  
To: exim-users
Betreff: [Exim] Exim+SpamAssassin+Fetchmail
Hi.

I've had a problem with my SA+Exim+Fetchmail config. It all works fine,
except I've ahd problems with my firewall/router. One of it's interfaces
has been going to sleep, and when I wake it back up, fetchmail goes off
and fetches all my mail.
Quite a lot of it! (say 300ish messages?)
Mostly Spam :-(
SA then spawns a lot of proccesses, making the box very very busy. After
a whils, it gets so busy that SA stops accepting any mail into the filter.
That's sort of ok, because I can wait. Exim carries on going though....
It then starts bouncing mail, complaining about a connection timeout
during the pipe operation to SA.

I *could* just set a fetchlimit on fetchmail, but is there anything more
elegant I can do, like have exim queue the mail?

I thought I could limit the incoming mails per connection, but I think
that fetchmail opens a new connection for each mail.

Apologies if this is an RTFM question- just point me at the correct
place. I've had a look at the list archives, and didn't find any
really close matches. A few suggestions that might fit- like limiting
the queue when the load average gets too high.
What I'm really after is a suggestion of what would be good practice in
this situation. I've fixed the router, but I don't want a
box that keels over if I leave it offline for a few days then go fetch a
lot of mail.
Will exim's antispam features (RBL etc) play nice in a fetchmail
environment (as opposed to a 'proper' smtp feed)?

Here's the (hopefully) relevant bits from exim.conf that pipe the mail
to SA. I'm
running SA in a spamc/spamd setup. I found this from a link on the SA
website.

Exim is v3.35, SA 2.63, and Fetchmail 5.9.11, on Debian Woody.

Thanks in advance for any suggestions.

Chris



########First the transport########################################
# Spamassassin
spamcheck:
driver = pipe

command = /usr/sbin/exim -oMr spam-scanned -bS
transport_filter = /usr/bin/spamc

bsmtp = all

home_directory = "/tmp"
current_directory = "/tmp"

user = mail
group = mail

return_path_add = false
log_output = true
return_fail_output = true

prefix =

suffix =

##########Then the router##########################
######################################################################
#                          Spamassassin                      #
######################################################################
spamcheck_router:
 no_verify
 #check_local_user
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-sca
nned}} {!eq {$received_protocol}{local}} } {1}{0}}"
driver = smartuser


transport = spamcheck