procmail
[Top] [All Lists]

Re: Memory, swap space exhausted by procmail; system staggers

1999-06-04 11:47:05
1999-06-04-03:50:14 Brett Glass:
We're running 3.13.1, and it happened just as you said: a big message
or two exhausted our swap space. I may have to limit message sizes
in Sendmail, which I'm loathe to do because users will complain.

Procmail reads the entire message to be processed into memory. If you don't
want a sufficiently huge message to hang your system --- one bigger than
available virtual memory, typically RAM + swap - system overhead --- then you
have only two choices: limit message size in your MTA, or switch to something
other than procmail. Now it's true that the problem isn't as bad now; thanks
to tightening up the memory allocation code, procmail usually doesn't need 2
or 4 times the amount of memory needed to hold the message, but if there's no
limit to the size message I can send you, and you're running procmail, then I
can exhaust swap on your system. Of course disk has gotten so cheap that a
reasonable alternative might be to just allocate a few gigs of disk as swap
space; if you size your swap based on your internet connection bandwidth so
it'll take me a few days to fill it, then you'll have plenty of time to catch
me, hunt me down, and kill me before I hang your system. Hang on 500GB and I
can't fill your swap even if I have all day through an otherwise-idle T3. Ok,
maybe this idea doesn't quite scale so well.

At the moment the only Local Delivery Agent I know of that has powerful
filtering like procmail, and doesn't have this problem, is Maildrop[1]. I have
been hoping to add another entry to the lineup, but have not as yet made up my
mind how I want it to work:-).

-Bennett

[1] <URL:http://www.flounder.net/~mrsam/maildrop/>