Skip to Content.
Sympa Menu

devel - sympa + postfix

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Philippe Riviere <address@concealed>
  • To: Sympa-Dev <address@concealed>
  • Subject: sympa + postfix
  • Date: Thu, 8 Feb 2001 09:33:29 +0100


Dear sympa-coders,

your comments and more tests will be required before this can be posted in
the FAQ or elsewhere.

After a lot of trouble caused by sympa sending all the mail (100,000
subscribers) down to postfix in 6 minutes, then letting postfix process a
huge queue... I've found a method to make sympa nicer with postfix.

Why is there a specific problem with postfix? In fact the "sendmail" program
from the postfix distribution is just a pass-thru program, that takes
messages from sympa and puts them as files in the postfix incoming queue. So
it finishes in milliseconds and sympa sends another set of addresses very
fast. The queue grows very fast, which may result in overflowing the system
with huge list. And another problem comes when the queue is full of sympa
messages: other messages (which are supposed to be priority) are treated
like sympa's messages, so they can wait several hours before being
delivered.

We've tried to patched the smtp.pm file to insert a sleep command, but this
is not very useful: it works somehow, but you have no control on the sleep
time once it's launched, so you can adjust only once every message (bad!)

So here is my solution: I just wrote a wrapper script around the postfix's
sendmail program, and set the sympa.conf so it does not launch too many
wrappers at the same time. Of course you have to adjust your variables so
that
maxsmtp * nrcpt / sleeptime == postfix's delivery rate (msg/sec)

In my example maxsmtp = 2, nrcpt = 300, sleeptime = 120 seconds, so sympa
would pour addresses in the queue at about 5 recipients per second (that's
18,000 per hour) in average. The settings depend, of course, on the bandwith
you have to your average recipient.


#######BEGIN /usr/sbin/sendmail-sleep
#!/bin/sh
/usr/sbin/sendmail $*
sleep 120
#######END sendmail-sleep


#######sympa.conf
## Maximum number of recipients per call to Sendmail
nrcpt 300

## Average number of recipients (ie max. number of different domains)
## per call to Sendmail
avg 300

## Max. number of Sendmail processes (launched by Sympa) running
simultaneously
## Proposed value is quite low, you can rise it up to 100, 200 or even 300
## with powerfull systems.
maxsmtp 2

## The full path to the Message Transfer Agent program (default is Sendmail
8.7
## or above)
#sendmail /usr/sbin/sendmail
sendmail /usr/sbin/sendmail-sleep
#######END sympa.conf


Of course this allows you to control the delivery rate directly, by just
editing /usr/sbin/sendmail-sleep while sympa.pl runs (beware, however, not
to save a bad version to disk while sympa.pl runs! You would break your mail
delivery!)


  • sympa + postfix, Philippe Riviere, 02/08/2001

Archive powered by MHonArc 2.6.19+.

Top of Page