Intentionally Throttling Messages Delivery

I volunteered  to maintain several mailing lists for several community organizations. They are small mailing lists with members not more than 200 each, but on hot topics, it can generate a lot of emails sent to the email server.

The mailing list uses Mailman. It sends the message to the email server on the same computer. The email server uses Sendmail, which is set up to send the messages to smart host, which is my ISP email server. The computer itself is using Fedora.

To minimize the unintentional large amount of email being sent by its service subscribers, my ISP limits number of emails allowed to deliver within a period of time. Having mailing list runs in this situation without some adjustments certainly will make my account being flagged by my ISP. So, here is the solution that I am using right now.

Sendmail Configuration

First, we need to make sure that Sendmail will only send certain amount of email within a period of time. This can be done by making:

  1. Sendmail processes emails in queue every certain time.
  2. Sendmail only processes certain amount of email when processing the queue.

The first one is already set in Fedora default installation. If you want to make interval adjustment, you can edit the startup configuration for Sendmail, which is in my system located at /etc/sysconfig/sendmail. My configuration is:


For the second one, you need to put the settings inside file (actually you can specify them from command line too). You can edit your m4 file and then create new file from your m4 file. The settings that you need to put are:

define(`confMAX_QUEUE_RUN_SIZE', `30')dnl
define(`confDELIVERY_MODE', `queueonly')dnl

MAX_QUEUE_RUN_SIZE is to make sure the maximum number of messages to be processed during a single queue run.

DELIVERY_MODE is to make sure that Sendmail uses queue delivery mode.

With this configuration, Sendmail only sends 30 messages in its queue every 5 minutes.

Mailman Configuration

After we setup Sendmail, the next step is to make sure that we have the number of messages being sent by Mailman accurately.

In default configuration, Mailman delivers messages to the email server in batches. This means there are many recipients in each message. The email server than checks the message and for multiple recipients, send each recipient a copy of the message.

If we are using this configuration, Sendmail will see viewer messages in queue than actually needs to be delivered to the smart host. As result, My ISP email server may see I send more messages than the allowed limit.

The solution is to make sure that Mailman generates separate message for each recipient. This will make the number of message appears in Sendmail’s queue more accurate.

To do this, you need to go to Non-digest options in Mailman’s administration page and make sure that Mailman personalizes each non-digest delivery (see figure below).


Note: You may need to set the MAX_QUEUE_RUN_SIZE a little bit lower than the limit allowed by the smart host to anticipate when someone inside your system send email to multiple recipients.

Post a Comment

Leave your comment below
The comment is moderated. Only comments related to the post will be accepted.
Your name
Email address
Your comment

Read Comments No comment yet Comment feed

You can get this information from:
Close this window
Email This Information
To send the message, please fill the form below
Email To
Your Email

Please enter the text on the following image in the verification box below. Click here if you cannot read the text. All alphabets are in upper case.

Verification image