Platforms

Windows, unix


Abstract

Allows LISTSERV to deliver mail asynchronously via one or more SMTP "worker" processes.


Formal Syntax

There are several different ways to define the value for this variable. Here is the formal syntax (for unix the value must be enclosed in double-quotes, of course):

SMTP_FORWARD_n=[x*]hostname[(opentime-setting)][;failoverhostname]

(Advanced tuning parameters typically used only by "huge" sites (millions of recipients/day) have been omitted.  Please contact L-Soft support if assistance is needed in this area.)


Examples

There are many different ways to set this keyword. A few examples are given below. Note carefully that the settings shown are Windows-specific; in order to set these on unix servers, be sure to place double-quotes around the setting strings.

A typical Unix example:

SMTP_FORWARD_1="MAILHOST.BAR.COM"

export SMTP_FORWARD

A typical Windows example:

SMTP_FORWARD_1="MAILHOST.BAR.COM"

To save space, the rest of these example sets are in Windows format.

A simple load-sharing setup (two workers point to one machine, one points to another):

SMTP_FORWARD_1=UNIXSERVER.BAR.COM
SMTP_FORWARD_2=SMTP.BAZ.NET
SMTP_FORWARD_3=UNIXSERVER.BAR.COM

The same load-sharing setup, but simplified into two lines:

SMTP_FORWARD_1=2*UNIXSERVER.BAR.COM
SMTP_FORWARD_2=SMTP.BAZ.NET

In this example, the first server has been configured to fail over to the second server if it cannot be reached:

SMTP_FORWARD_1=2*UNIXSERVER.BAR.COM;SMTP.BAZ.NET
SMTP_FORWARD_2=SMTP.BAZ.NET

Finally, in this example, the first worker will use UNIXSERVER.BAR.COM from midnight until 5:00 AM, and will use SMTP.BAZ.NET the rest of the day.  The second worker will use SMTP.BAZ.NET all the time.  The third worker will use SMTP.BAZ.NET from 10:00 AM until 2:00 PM and otherwise will not be active the rest of the day.

SMTP_FORWARD_1=UNIXSERVER.BAR.COM(00:00-05:00);SMTP.BAZ.NET
SMTP_FORWARD_2=SMTP.BAZ.NET
SMTP_FORWARD_3=SMTP.BAZ.NET(10:00-14:00)


Details

Defines a number of "SMTP workers" (SMTPW.EXE on Windows; lsv child processes on supported unix platforms) used to spread the mail delivery load across multiple machines (or multiple connections to the same machine). For small workloads, the recommendation is to define a single SMTP_FORWARD_n host (i.e., SMTP_FORWARD_1=) which points to the same host as is set for the SMTP_FORWARD= synchronous delivery variable.  For larger workloads, two or more workers will likely be required.

Multiple SMTP_FORWARD_n host definitions should be made only for large workloads (30,000 daily deliveries or more), or when the mail delivery server being pointed to is very slow. In that case, opening multiple connections to the machine may improve throughput. A general rule is that you define multiple SMTP_FORWARD_n hosts only when xxx.MAIL files are consistently accumulating in the LISTSERV spool directory.

Tip:  The more SMTP_FORWARD_n hosts you define, the more SMTP workers will be started. Since each SMTP worker takes up some resources on your machine, you should not define more workers than your workload requires.

The value of each SMTP_FORWARD_n host must be a fully-qualified domain name (FQDN), or alternately, a dotted-decimal IPv4 address.  IPv6 addresses are not supported.

Under unix, this keyword causes LISTSERV to spawn sub-processes of itself rather than requiring a separate executable.

Note:  Under Windows you MUST define an SMTP_FORWARD= parameter in the site configuration file which will tell LISTSERV where to deliver mail synchronously should asynchronous delivery fail for any reason. Under unix this isn't technically required since synchronous delivery always defaults to the local machine, however we recommend that SMTP_FORWARD= always be set explicitly even under unix.

The first example is one of the most simple configurations: one SMTP_FORWARD_n variable is defined for each separate worker. In this case two workers are pointed at one host, meaning that that host will be used for two-thirds of the outgoing mail.

The second example is functionally identical to the first example but the syntax is different. SMTP_FORWARD_1=2*UNIXSERVER.BAR.COM says "define two workers pointed at UNIXSERVER.BAR.COM".

The third example is also functionally identical to the first example except that it tells worker #1 to use SMTP.BAZ.NET as a "failover" host if UNIXSERVER.BAR.COM cannot be contacted. Otherwise SMTP.BAZ.NET will handle only one-third of the outgoing mail as would be expected.

The fourth example tells worker #1 to use UNIXSERVER.BAR.COM only between midnight and 5AM, and use the failover host SMTP.BAZ.NET at all other times. It also tells worker #3 to operate only between the hours of 10AM and 2PM (with no failover). This is handy for (for instance) offloading large queues to other machines during heavy traffic periods when the other machines aren't being used for other things (like number-crunching).


Default Value

Not set (workers are not used and mail is delivered synchronously via the host defined in SMTP_FORWARD).


Wildcards

Not allowed.


See also

SMTP_FORWARD