On Jun 3, 2004, at 00:02, Finn Boje Johannessen wrote:
> I got a problem with exim and spamd.....
>
> It looks like spamd and exim is eating all my memory and cpu....
> So I have to restart the server from time to time.....
You could start "spamd" with a "nice" level of 15 or so.
- On a Debian system, uncomment "NICE="--nicelevel 15" in
/etc/default/spamassassin;
- elsewhere, try to figure out if there is an options file that is
read by the SA
startup script (usually in /etc/init.d/spamd,
/etc/init.d/spamassassin, or such).
- if not, edit the startup script itself.
Also, you could prevent SA from scanning local mails (as you suggested)
or very large mails. If you invoke SA through ExiScan-ACL, you can use
something like this in the data ACL:
# Accept messages from local hosts
accept
hosts = $interface_address : +relay_from_hosts
# Accept very large messages without scanning
accept
condition = ${if > {$message_size}{1M} {true}}
logwrite = :main: Not classified (message size larger than 1M)
# Invoke SpamAssassin (via the "spam" condition), and pretend to
reject
# the message if it is spam. Also save the word "ham" or "spam" in
$acl_m9.
warn
set acl_m9 = ham
spam = mail
set acl_m9 = spam
!hosts = ${if exists {/etc/mail/whitelist-hosts}\
{/etc/mail/whitelist-hosts}{}}
control = fakereject
logwrite = :reject: Rejected spam (score $spam_score):
$spam_report
# Add appropriate X-Spam-Status header, for use in filters at
delivery time.
warn
message = X-Spam-Status: \
${if eq {$acl_m9}{spam}{Yes}{No}} (score $spam_score)\
${if def:spam_report {: $spam_report}}
logwrite = :main: Classified as $acl_m9 (score $spam_score)
accept
-tor