[milters] Archive

Lists Index Date Thread Search

Article: 1708
From: Anthony Howe
Date: 2007-09-20 03:32:08 -0400
Subject: Re: milter-spamc timing out after 10 seconds? - new information

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Ben Spencer wrote:
> Previous configuration:
> Sendmail -> milter-spamc -> network -> SpamAssassin
> 
> New configuration:
> Sendmail -> network -> milter-spamc -> SpamAssassin (via local socket)
> 
> Results (no real change):
> 2007 Sep 19 16:09:06 mailgw [mail.info] sendmail[4690]: l8JL956V004690: Milter 
> add: header: X-milter-p0f-Report: aol.dublin.bluehornet.com [216.54.194.21] 
> (unknown) Linux 2.6, seldom 2.4 (older, 4) link sometimes wireless service 
> priority1 NAT
> 2007 Sep 19 16:09:16 mailgw [mail.err] sendmail[4690]: l8JL956V004690: Milter 
> (milter-spamc): timeout before data read
> 2007 Sep 19 16:09:16 mailgw [mail.info] sendmail[4690]: l8JL956V004690: Milter 
> (milter-spamc): to error state
> 
> This only happens for scans which take 10 seconds or over. However, since this 
> is Sendmail connecting to the milter over the network, it takes the
"problem" 
> out of the milter's hands and leaves this with some host OS setting or some 
> sendmail setting someplace? Any idea what this might be?

A log sample you sent in a follow up:

Sep 19 16:45:44 mailgw sendmail[7435]: l8JLjXJb007435: Milter 
(milter-spamc): headers, sent
Sep 19 16:45:44 mailgw sendmail[7435]: l8JLjXJb007435: 
milter=milter-spamc, action=eoh, continue
Sep 19 16:45:44 mailgw sendmail[7435]: l8JLjXJb007435: Milter 
(milter-spamc): body, send
Sep 19 16:45:44 mailgw sendmail[7435]: l8JLjXJb007435: 
milter=milter-spamc, action=body, continue
Sep 19 16:45:44 mailgw sendmail[7435]: l8JLjXJb007435: Milter 
(milter-spamc): body, sent
Sep 19 16:45:54 mailgw sendmail[7435]: l8JLjXJb007435: Milter 
(milter-spamc): timeout before data read
Sep 19 16:45:54 mailgw sendmail[7435]: l8JLjXJb007435: Milter 
(milter-spamc): to error state

Shows first the headers and I think two body chunks being passed and the 
2nd of which causes read error. I've looked at my milter code, 
filterBody, that relays the body chunk to SpamAssassin, but I see 
nothing that can account for this problem in the milter.

I've looked at the sendmail-8.14.1 libmilter/*.c and sendmail/milter.c 
code for instances of "10". Found some related to polling, conditional 
mutex waits, and the default timeouts. Nothing jumps out at me as being 
the problem.

I can only assume there is some procedural error in the configuration 
process such that the timeouts defined with the INPUT_MAIL_FILTER macro 
within your .mc are not being applied. 10 seconds is the timeout for S: 
(send) and R: (read). You previously stated that your settings are 
F=T;T=C:15m;S:4m;R:4m;E:10m, but it would appear that they are simply 
not being applied for some reason.

a) Are you editing the correct .mc file?

b) Are you rebuilding the matching .cf from the .mc? Check the .cf file 
and look for a line similar to this that contains your settings:

Xmilter-spamc, S=unix:/var/run/milter/milter-spamc.socket, 
T=C:1m;S:1m;R:2m;E:4m

c) Is sendmail being -HUP  to load the new configuration or are you 
using a script to restart it? If a script, is it using the -f option and 
different .cf file? Any errors reported in the log or console?

d) Are you sure sendmail is using the configuration you think it should 
be using, either by default or via -f option. Using

	sendmail -Am -d0.10

should report what configurations are loaded by default and selected.

e) Are you use both MTA (sendmail.mc) and MSA (submit.mc) configurations?

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         ICQ: 7116561      Sendmail Milter Solutions
http://www.snert.com/                 
     http://www.snertsoft.com/

Lists Index Date Thread Search