Hi.

I am seeing a delay of around 30 seconds to 5 minutes to deliver mail
while using spamassassin with procmail. I have recently changed to using
spamc/spamd in the hope that it would improve delivery times, but it has
not.

What I think is strange is that the delay seems to occur AFTER
spamassassin has classified the message as spam or ham. Also, during this
time spamd is taking up a lot of CPU time and memory. I've not been able
to find anything that has helped in either the FAQs, mailing lists or
elsewhere.

Debug mode (-D) does not reveal anything useful, the delay occurs after
"debug: cleaned up kid 9024, pool=1" is printed.

In the example below I am running spamd with only the local tests (-L) and
without bayes (use_bayes 0) specified in the user_prefs file.


arrives    16:20:40
identified 16:20:43
delivered  16:22:12 (delay=00:01:33)


spamassassin 2.63
perl         5.8.1
procmail     3.22
sendmail     8.11.2
linux        2.4.26

/usr/local/bin/spamd -c -L --user-config -m 1

----/var/log/messages
Jun 23 16:16:20 simon spamd[8536]: server started on port 783/tcp (running 
version 2.63)
Jun 23 16:20:40 simon sendmail[9019]: i5NFKd809019: from=<[EMAIL PROTECTED]>, 
size=3483, class=0, nrcpts=1, msgid=<[EMAIL PROTECTED]>, proto=ESMTP, 
daemon=MTA, relay=[216.74.67.130]
Jun 23 16:20:40 simon spamd[8536]: connection from localhost [127.0.0.1] at 
port 23710
Jun 23 16:20:40 simon spamd[9024]: info: setuid to net-ste succeeded
Jun 23 16:20:40 simon spamd[9024]: processing message <[EMAIL PROTECTED]> for 
net-ste:8001.
Jun 23 16:20:43 simon spamd[9024]: identified spam (4.9/4.5) for net-ste:8001 
in 2.5 seconds, 3726 bytes.
Jun 23 16:22:12 simon sendmail[9020]: i5NFKd809019: to="|IFS=' ' && 
p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #net-ste", 
ctladdr=<[EMAIL PROTECTED]> (8001/8000), delay=00:01:33, xdelay=00:01:32, 
mailer=prog, pri=32717, dsn=2.0.0, stat=Sent
Jun 23 16:22:29 simon sendmail[9215]: i5NFMT809215: from=<[EMAIL PROTECTED]>, 
size=3776, class=-60, nrcpts=1, msgid=<[EMAIL PROTECTED]>, bodytype=8BITMIME, 
proto=ESMTP, daemon=MTA, relay=vger.kernel.org [12.107.209.244]
Jun 23 16:22:30 simon spamd[8536]: connection from localhost [127.0.0.1] at 
port 23726
Jun 23 16:22:30 simon spamd[9220]: info: setuid to net-ste succeeded
Jun 23 16:22:30 simon spamd[9220]: processing message <[EMAIL PROTECTED]> for 
net-ste:8001.
Jun 23 16:22:32 simon spamd[9220]: clean message (0.0/4.5) for net-ste:8001 in 
2.1 seconds, 4080 bytes.
Jun 23 16:22:44 simon sendmail[9240]: i5NFMh809240: from=<[EMAIL PROTECTED]>, 
size=19675, class=0, nrcpts=1, msgid=<[EMAIL PROTECTED]>, bodytype=8BITMIME, 
proto=SMTP, daemon=MTA, relay=mta105.cheetahmail.com [216.15.189.39]
Jun 23 16:23:59 simon sendmail[9216]: i5NFMT809215: to="|IFS=' ' && 
p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #net-ste", 
ctladdr=<[EMAIL PROTECTED]> (8001/8000), delay=00:01:30, xdelay=00:01:30, 
mailer=prog, pri=139661, dsn=2.0.0, stat=Sent
Jun 23 16:24:07 simon spamd[8536]: connection from localhost [127.0.0.1] at 
port 23731
Jun 23 16:24:07 simon spamd[9375]: info: setuid to net-ste succeeded
Jun 23 16:24:07 simon spamd[9375]: processing message <[EMAIL PROTECTED]> for 
net-ste:8001.
Jun 23 16:24:11 simon spamd[9375]: clean message (3.1/4.5) for net-ste:8001 in 
3.8 seconds, 19959 bytes.
Jun 23 16:24:54 simon sendmail[9461]: i5NFOs809461: from=<[EMAIL PROTECTED]>, 
size=1898, class=-60, nrcpts=1, msgid=<[EMAIL PROTECTED]>, bodytype=8BITMIME, 
proto=ESMTP, daemon=MTA, relay=vger.kernel.org [12.107.209.244]
Jun 23 16:25:42 simon sendmail[9244]: i5NFMh809240: to="|IFS=' ' && 
p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #net-ste", 
ctladdr=<[EMAIL PROTECTED]> (8001/8000), delay=00:02:59, xdelay=00:02:58, 
mailer=prog, pri=49191, dsn=2.0.0, stat=Sent
Jun 23 16:25:43 simon spamd[8536]: connection from localhost [127.0.0.1] at 
port 23735
Jun 23 16:25:43 simon spamd[9547]: info: setuid to net-ste succeeded
Jun 23 16:25:43 simon spamd[9547]: processing message <[EMAIL PROTECTED]> for 
net-ste:8001.
Jun 23 16:25:45 simon spamd[9547]: clean message (0.0/4.5) for net-ste:8001 in 
2.3 seconds, 2199 bytes.
Jun 23 16:27:19 simon sendmail[9462]: i5NFOs809461: to="|IFS=' ' && 
p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75 #net-ste", 
ctladdr=<[EMAIL PROTECTED]> (8001/8000), delay=00:02:25, xdelay=00:02:24, 
mailer=prog, pri=138750, dsn=2.0.0, stat=Sent
----

----$(top bn1 | head -n 8 | tail -n 2)
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10890 net-ste   18   0 73420  71m  18m R 67.4 28.9   1:16.77 spamd
----

----~net-ste/.spamassassin/user_prefs
required_hits 4.5
always_add_headers 1
always_add_report 0
subject_tag *SPAM*
report_safe 1

use_bayes 0
bayes_auto_learn 0
----

----~net-ste/.forward
"|IFS=' ' && p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75 
#net-ste"
----

----.procmailrc
MAILDIR=$HOME/.mail
LOCKFILE=$HOME/.lockmail

:0fw: spamassassin.lock
* < 256000
| /usr/local/bin/spamc

:0:
* ^X-Spam-Level: \*\*\*\*\*\*
trash

:0:
* ^X-Spam-Status: Yes
INBOX-OTHER
----





Thanks.



Stephen.

Reply via email to