helpSpamAssassin Milter Plugin - Support: sr #102940, Timeouts


sr #102940: Timeouts

Submitted by:  Nate S. <nschindler>
Submitted on:  Wed 24 Mar 2004 12:23:19 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  Dan Nelson <dnelson>
Open/Closed:  Open Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 27 Mar 2004 01:46:37 AM UTC, comment #3:

Alright... I took a step back, and instead of trying to get spamass-milter working without having the messagewall connections to sendmail timing out, I just decided to let sendmail have it's default 1h 'command' timeout back.
So, unused connections from messagewall to sendmail timout and reconnect. This keeps the seldom-used spamass-milter children from dying, since they're not there long enough to die.

It's not a real solution, because it adds a lot of garbage to my mail logs, but it works.

Nate S. <nschindler>
Wed 24 Mar 2004 06:38:56 PM UTC, comment #2:

Thanks for the quick response.

What happens is messagewall opens 5 connections to sendmail. I'm not sure if it even issues a helo at that point.
Messagewall gets inbound mail and forwards it to sendmail through the already open connection. if Messagewall is sending two messages to sendmail at the same time, it'll use a 2nd (already open) backend connection. It's somewhat rare for messagewall to have to send 3 messages to sendmail at the same time (probably once an hour), so the 3rd, 4th, and 5th sendmail connections are there only for occasional bursts of volume.

As soon as messagewall starts and connects to sendmail, I have 5 child sendmail/spamass-milter processes. After a few minutes or up to a few hours (depending on our volume), at least two of the least used spamass-milter processes die.
In the log, I don't see spamass-milter dying (not debugging yet), but during messagewall's next attempt to try the sendmail child that would've called the dead spamass-milter, I see this in the log, which seems pretty generic:
Milter (spamassassin): write(D) returned -1, expected 5: Broken pipe

My sendmail's "Timeout.command" option needed to be increased so that it wouldn't kick off the idle messagewall connections. This has done what I needed up to this point (before spamassassin was installed), but sendmail has a lot of other global timeouts. Not sure if any of them would have an effect on this problem. I've also increased the timeouts where the milter is defined in the sendmail config. I found a line in spamass-milter.cpp that said:
nready = poll(fds, nfds, 100);
I tried changing that to:
nready = poll(fds, nfds, 1382400);
Didn't really know what that would do, but I figured it couldn't hurt. Lastly, I've tried starting spamass-milter with "-- -t 0".
No luck with any of these.

I know mimedefang-multiplexor had a timeout option for situations like this where there's an idle smtp proxy connection, and I was thinking that spamass-milter probably had something similar - even if it's hard-coded.
Mimedefang is way overcomplicated for what I'm doing. Aside from this small problem, spamass-milter is perfect.

Nate S. <nschindler>
Wed 24 Mar 2004 06:13:48 PM UTC, comment #1:

I'm not sure what you mean by "setting the timeout". There are no timeouts that should cause delivery failure or even warning messages in spamass-milt itself, and the milter functions only get called when the client sends data to the server. If there is just an idle SMTP socket open, the milter isn't called at all.

The poll.c file is a wrapper around select() for those systems without a native poll() call. poll itself is called with a 1-second timeout in Spamassassin::output(), but that function is only called when the client has finished sending a message, and it's inside a loop that just calls poll again if the timeout expires.

Dan Nelson <dnelson>
Project AdministratorIn charge of this item.
Wed 24 Mar 2004 12:23:19 AM UTC, original submission:

I need to do in spamass-milter what can be done with mimedefang-multiplexor's -b option: set the timeout.

I run messagewall, which connects to sendmail. messagewall holds the connection open with sendmail, and the sendmail slaves that are seldom used fail when they call spamass-milter, because spamass-milter has timed out.
i've set the sendmail and milter options in to a number which far exceeds the scheduled restarts and log rotations of the mail services, but this doesn't help.
The issue seems internal to spamass-milter.

It looks like this was dealt with in poll.c, but i don't know what to change. I need the timeout to be 8 days.

Nate S. <nschindler>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2004-03-24 dnelson Assigned toNone => dnelson

Back to the top

Powered by Savane 3.4