How to tune the SMTP Connector for bulk mailouts.


SUMMARY

How to tune and configure the SMTP connector for better throughput when sending a large number of messages.

DETAIL

The SMTP connector queries messages from the SMTP outgoing queue and sends them to remote mail servers.

When sending out to a large number of recipients, the following configuration changes can improve delivery performance:

  • Disable Delivery Delay Notifications
  • Configure Retry Intervals
  • Review the Number of Send Threads
  • Review System Logging
  • Local DNS Cache
  • Limit the number of outbound connections to the same server
  • Queue Prioritization (Enterprise versions only)

1. Disable Delivery Delay Notifications

Producing Delivery Delay or Failure Notifications can increase the number of items in the outgoing queue and further impact performance. By disabling failure notifications or increasing the time before a delivery notification is sent, the number of messages in the outgoing queue can be kept down instead of increasing during a mailout. These settings are configured under the SMTP connector options in the administration program.

2. Configure Retry Intervals

It is important that message retry intervals are set to compliment the profile of your bulk mailout. If a large list is being processed, you should ensure that the retry intervals are configured so that retries do not contend with new messages arriving into the queue. For example, if you have a list of 20,000 messages to send to subscribers, then you should ensure that the first retry interval is greater than an hour. The reason for this is that it can take over a minute to attempt to contact a remote mail server before it actually fails. If such servers are retried whilst MailEnable is attempting to process legitimate mail, the queue processing will suspend temporarily.

3. Review the Number of Send Threads

MailEnable scans the directory when it is looking for files in the SMTP outgoing message queue. If you are sending large amounts of mail, the server can consume resources continually scanning this folder for messages to send.

You can increase the number of messages that the server will try to send at any one time. This is controlled under the Outbound properties of the SMTP connector in the administration program and is called Maximum number of send threads. Increasing this to 64-128 can improve delivery. If you are increasing it this much you should also enable the option to limit the number of concurrent connections to the one remote server.

It is also possible to slow the directory scanning down - hence slightly reducing the amount of CPU used by the SMTP connector if there are a large number of items in the queue which have been delayed. This is done with a registry key called the "Outbound Poll Delay".

32Bit Windows:

Parent/Owner: HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP
Value Name: Outbound Poll Delay
Value Type: DWORD
Value: Numer of milliseconds that MailEnable waits after it detects that all send threads are in use.

64Bit Windows:

Parent/Owner: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mail Enable\Mail Enable\Connectors\SMTP
Value Name: Outbound Poll Delay
Value Type: DWORD
Value: Numer of milliseconds that MailEnable waits after it detects that all send threads are in use.

Hence, if using 10 threads, use this key to wait as idle while these threads complete. In a typical configuration, 5-10 seconds is normally sufficient - the default is 1 second (i.e.: if the key does not exist, MailEnable will use 1 second). Please note: 5 seconds means entering a value of 5000 for this registry key value.

4. Review System Logging

Turn off SMTP logs that are not used. The extra disk I/O load may adversely affect the SMTP outbound queue processing.

5. Local DNS Cache

Consider using a local DNS server either on the mail server itself or within the same local network. This DNS server can cache DNS lookups and can therefore improve outbound mail processing by reducing the latency associated with DNS lookups.

6. Limit the number of outbound connections to the same server

When sending large amounts of messages to the same mail server, the remote server can sometimes tarpit or restrict the amount of inbound connections that can be sent at the one time. This can slow the processing of the outbound queue as the messages destined to the same mail server will sit in the queue and be retried at a later time. In this scenario it would ideal limiting the amount of outbound connections to the same server. This can be achieved by navigating to the SMTP properties under the "Delivery" tab and enabling the option for "Limit concurrent connections". A value of 5 is normally what would be needed here.

7. Queue Prioritization (Enterprise versions only)

Enterprise editions of MailEnable provide queue prioritization. This means that bulk mail outs (List campaigns) are less likely to impact on the delivery of normal emails. The administrator can also designate mailboxes who need to send messages as priority where messages sent from priority mailboxes will be placed in a priority queue.

In order for messages to be placed in the "Campaign" queue that are sent from the list server to members, the list needs to be set as a campaign. 

How to set a list as a campiagn:

  • Navigate within the administration console to: Messaging Manager > Postoffices > (postoffice name) > Lists > (List Name)
  • Right click on the list and select properties
  • Under the "General" tab tick the option for "This list is a campaign".

How to set a mailbox with High Priority for sending:

  • Navigate within the administration console to: MailEnable Management > Messaging Manager > Postoffices > (postofficename) > Mailboxes > (mailboxname).
  • Right click on a mailbox and select Properties from the popup menu.
  • Navigate to the "General" tab.
  • Tick the option for "Deliver messages with high priority"

8. Queue Prioritization for mailouts not using List service (Enterprise only)

If you are sending emails through SMTP the messages will be put in the general email queue for delivery. If you wish to have your mailouts use the campaign queue, to help avoid slowing down general email, then you can add the following Windows registry keys:

32bit Windows:

Parent/Owner: HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP
Value Name: Bulk uses Campaign 
Value Type: DWORD
Value: 1

64bit Windows:

Parent/Owner: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mail Enable\Mail Enable\Connectors\SMTP
Value Name: Bulk uses Campaign
Value Type: DWORD
Value: 1

Your emails must include the "List-Unsubscribe" header, as this is used to determine whether the email is a list email.

ADDITIONAL CONSIDERATIONS

When there are thousands of messages in the outgoing queue, it becomes somewhat unmanagable to deal with (e.g. if attempting to use Windows Explorer to browse the folder).

When the SMTP connector is restarted it goes through the entire list of messages and resets their status to unsent. When the SMTP connector is restarted a spike in I/O and CPU will occur before any messages begin to be dispatched to remote servers. This feature can be disabled - but consider that those messages at the top of the queue will not be sent until you reset this flag and restart the connector.

This can be controlled via the following registry setting:

Parent/Owner: HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP
Value Name: Reset Messages On Restart
Value Type: DWORD
Value: 1= On, 0= Off, Default= 1

MORE INFORMATION

How to reduce the number of concurrent messages sent to remote mail servers: http://www.mailenable.com/kb/content/article.asp?ID=ME020236



Product:MailEnable (All Versions)
Article:ME020181
Module:SMTP
Keywords:bulk,sending,large,mailout,mail,outs,SMTP
Class:HOWTO: Product Instructions
Revised:Wednesday, March 15, 2017
Author:
Publisher:MailEnable