Please note carefully that if your question is not answered here, you should try one of the following avenues for support:
IF you do need to write to L-Soft Support be sure to include a detailed description of your problem, your config.dat file showing the configuration of your LSMTP, and if necessary a fragment from the log file showing the problem. By fragment, we mean 20-30 lines, not more that 50 lines. Do NOT send the entire log file unless directed to do so.
1.1 Requirements before installing LSMTP
The LSMTP machine, like any other SMTP server, must have a static IP address and a Fully-Qualified Domain Name (FQDN) assigned to it. This is because any other machine that wants to send mail to the LSMTP machine must be able to look up its name in DNS if it wants to connect to it and attempt delivery. The DNS entry can be an "A" record or an "MX" record; generally an "A" record will be sufficient.
In the current anti-spam climate, many receiving mailers will perform a Reverse DNS (PTR) lookup on the IP address of the sending mailer (your LSMTP) to validate it before they decide whether or not to accept mail from your mailer. If your mailer does not have a FQDN registered in DNS and also a proper "PTR" record in DNS this reverse lookup will fail and many mailers will refuse to accept mail from you. Good mailing practice suggests that you correctly register the FQDN of your server and act like a Good Netizen.
Many people want to "test" LSMTP without registering a FQDN in DNS. Although it is possible to configure and use LSMTP with only an IP address, and for it to send and receive mail, numerous difficulties will arise. L-Soft will not provide support for un-named installations of LSMTP (without a FQDN registered in DNS). Eventually you will need to have a name for your server so start things off right with a proper name registered in DNS.
LSMTP (from Version 1.1b onwards) also requires access to a DNS service. LSMTP will not use WINS or NETBIOS naming nor will it lookup names from a HOSTS file. A working DNS service must be entered in the appropriate location for Windows NT Networking configuration or LSMTP will refuse to start.
1.2 Verifying a correct installation
The quickest way to test an LSMTP installation (assuming LSMTP started successfully) is to click on the Resolve menu of the WinLSCP Control Program.
In the 'Name' field, enter HOME.EASE.LSOFT.COM
Click on the Resolve button and observe what happens.
10:00:32 MX query for home.ease.lsoft.com 10:00:32 trying (via UDP) DNS server 126.96.36.199
This verifies that a local DNS service is available and reachable by LSMTP.
status = %LSMTP-S-OK, Ok cname = home.ease.lsoft.com mailers: home.ease.lsoft.com 10 188.8.131.52, 184.108.40.206
This verifies that the DNS service is able to correctly lookup and resolve an address outside the local network. If your DNS server returns "No Such Domain" then it cannot correctly resolve external internet addresses and LSMTP will fail to operate correctly.
10:00:32 connecting to home.ease.lsoft.com 10:00:33 home.ease.lsoft.com( 0) >>> 220 home.ease.lsoft.com (LSMTP for Windows NT v1.1b) ESMTP server ready 10:00:33 home.ease.lsoft.com( 0) <<< QUIT 10:00:33 home.ease.lsoft.com( 0) >>> 221 home.ease.lsoft.com says goodbyeThis verifies that a successful SMTP connection can be made with the remote destination. This is especially important if you are behind a firewall as it will help you determine if the firewall is correctly configured to allow LSMTP to connect through it. If this fails, then likely LSMTP is unable to connect to any external destination and delivery of any email may be impossible. However, there are certain circumstances where this test may fail and it it possible to deliver mail so you should also perform an actual mailing test to and from an external destination.
1.3 Setting Threads
The LSMTP evaluation kit has a 50 thread limit. Some sites may get a special unlimited thread license for high performance evaluation. However, once the Permanent LAK is applied, correct setting of the thread count is often overlooked. Sites with an unlimited LAK often leave the threads set at 180 or even 40 and then wonder why they have poor performance.
Thread count is set on the Service & Threads tab of the LSMTP configuration Menu.
The rule of thumb for best performance is to set the Outgoing SMTP threads at about 90% of the LAK limit (normal priority). Leave Incoming SMTP threads (high priority) undefined (blank) and the Incoming POP threads (normal or low priority) also undefined (blank) so LSMTP can adjust these on-the-fly based on actual operational needs. You must never allocate all threads only to outbound mail. The only way LSMTP gets new data to mail out is by an incoming SMTP transaction from LISTSERV or other mail source so you must always leave some threads available for incoming mail.
Suggested starting point for Outbound Thread setting:
|LAK Units||Actual Threads Allowed||Outbound Thread Setting (to start)|
Then measure performance over several large mailings (using the SF90M program) and adjust the Outbound thread limits up or down. Note, even with an 'unlimited' LAK you should define an outbound thread limit. This allows LSMTP to dedicate a fixed amount of memory to its internal structures and not have to readjust under heavy load. Note that the unlimited LAK really has an internal design limit of 1500 so it is not truly 'unlimited'. Note also that outbound thread limits above 600 can (when combined with other traffic) saturate a T-1 (1.5 mbs) connection. It is recommended that you do not exceed 1200 without checking with L-Soft Support and you should never exceed 1400. Once again, only set the Outgoing SMTP thread limit, leave the others blank so LSMTP can adjust itself.
1.4 Importance of setting Local Aliases (why is mail looping?)
Suppose you have configured LSMTP on a machine whose true FQDN is mail.example.org. But the machine also has another DNS "A" record as 'listserv.example.org. You may get the following error message.
An error was detected while processing the enclosed message. A list of the affected recipients follows. This list is in a special format that allows software like LISTSERV to automatically take action on incorrect addresses; you can safely ignore the numeric codes. --> Error description: Error-for: firstname.lastname@example.org Error-Code: 0 Error-Text: Mailer example.org said: "554 Message looping received 6 times)" Error-End: One error reported. ------------------------------ Original message ------------------------------ Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 Received: from mail.example.org (xxx.xxx.xxx.xxx) by mail.example.org (LSMTP for Windows NT v1.1b) with SMTP id <0.5CCB7DC0@mail.example.org>; Thu, 12 Mar 1998 16:24:42 -0600 ...
You need to define "listserv.example.org" as a Local Alias in the LSMTP configuration. Go to the LSMTP Control Program. Click on Configure. The first Tab displayed is the one labeled Local. In the lower left quarter of this tab is a window listing all local domain names and FQDNs that apply to this server. Enter the name listserv.example.org on the single line to the right of this window and click the Add button. Then click OK.
LSMTP must know about ALL of its local domain names, otherwise it assumes they are remote and attempts to deliver via SMTP, thus causing the loop. It stops after six iterations because of the default configuration setting under SMTP & Reports that causes LSMTP to reject messages received more than 5 times.
1.5 Setting Relay Control
The purpose of Relay Control is the prevention of theft-of-service where your LSMTP mailer might be used for unauthorized SMTP forwarding, usually by spammers. The default installation of LSMTP has Relay Control turned on. This may be a slight problem if you want to use LSMTP for mail forwarding from other machines in your network.
Configuration is very easy. Click on the Relay Control tab of the Configure Menu. Ensure that the first box (Enable Relay Control) is Checked. Ensure that the second box (Debug mode) is NOT checked (unless you are testing relay settings.)
The Relay Domains (upper) window is used only to specify additional domain names for which your LSMTP is to receive mail. Do not re-enter the FQDN of the LSMTP server which is already configured on the Local Tab or any other local names for the server that you have already already entered in the Local Aliases window. Enter domain names only as a FQDN. These settings only control receiving of inbound mail to your LSMTP server. They do NOT have any effect on SMTP Mail Relay except to permit the receipt of certain mail (which may then be accepted locally or routed elsewhere.)
The Relay Mailers (lower) window is the important one for Relay Control. Here you must enter the single IP address(s) or the IP address range(s) (specified in CIDR notation*) of other machines that are permitted to relay mail through the LSMTP server. Relay control is not specified by domain name since this can be easily forged. Faking of IP addresses is extremely difficult.
*Classless Inter-Domain Routing (CIDR) notation
The CIDR notation is a way to express ranges of IP addresses (subnets). The IP addresses are denoted as one base address, usually in "decimal-dotted notation" and a decimal number indicating the number of significant bits in the base address, counted left to right: address/bits. For example, 220.127.116.11/27 denotes the range of IP addresses from 18.104.22.168 through 22.214.171.124. The 27 significant bits cover the eight bits of 195, the eight bits of the 78, the eight bits of the 164, plus the three upmost bits of the 224. The remaining five bits can have any setting and the IP addresses resulting from those settings are all included in the subnet.
1.6 Configuring the Postmaster
Many people are tempted to alter the Postmaster setting on the Local tab on the Configure Menu thinking that it will route Postmaster mail to some other address. There is seldom any reason to alter this. The effect is cosmetic only and does NOT provide any routing or redirection of mail to a postmaster account located elsewhere. This setting only provides the identification of the mail "From:" address when LSMTP must issue any messages originating from itself (such as error bounce messages.)
If you wish to redirect the Postmaster mail to another account, you will do this on the Routing tab. Scroll down to find the Postmaster address. Select it with a mouse click. Then click on Modify. Scroll down to "When a message is received for this address," use the pull-down arrow to Select forward it to a new address. In the box below that, enter the address(s) mail should be forwarded to. Click OK.
On some servers the name of the mailer is not Fully-Qualified. (e.g. Postmaster@machine instead of Postmaster@machine.domain.com. Make sure this entry always has a FQDN in the Address.
1.7 Configuring POP3 accounts
Configuring POP3 accounts is a 2 step process. First you must create the POP account itself on the POP Users tab. Enter the account name (which need not be the same as the email address although often it is the same.) Choose the kind of password and enter the account password as well (unless you are using an NT user login account, for which the password is already entered.)
After you have created the POP account, you must create a mail routing for the actual email address of the POP account. This is done on the Routing tab. Simply enter the 'local' (or UserID) part of the email address (it is not necessary to specify the fully qualified address, except when you have the same address for 2 different domains routed to different destinations), select local POP delivery and then specify the POP account name. As noted above, this is frequently the same as the email address but need not be.
Note: It is NOT necessary to create a POP account if you always intend to forward the mail to an account on another server. It is only necessary to create a mail Routing entry (Step 2 above).
In general, we do not recommend placing LSMTP behind a firewall because of the performance reduction that results. There are also different types of firewalls that will have different effects on performance. A packet-filtering firewall will not affect performance nearly as drastically as a firewall which does Network Address Translation (NAT) or a firewall which has it's own SMTP proxy program. If necessary, we suggest LSMTP should be placed in a "DMZ" area between your internal firewall and the internet. Please also be aware of special issue with Cisco's PIX firewall.
Although LSMTP normally receives incoming mail only on Port 25, for outgoing mail especially when under load, LSMTP (and many other SMTP mail programs) may use other arbitrary, unused higher port numbers. The firewall must be configured so as not to impede the use of these higher port numbers for outgoing connections or performance will suffer.
1.9 Will LSMTP run under Windows 2000?
Yes. The most recent build kit (June 26, 2002) runs on both Windows 2000 and NT 4.0. See our L-Soft FTP site. Early versions of LSMTP 1.1b had a problem finding the new location of the DNS server entries in the NT Registry for Windows 2000. If you are attempting to run the older version of LSMTP it will fail to start, protesting the lack of a DNS server. Reinstall, making sure to use the latest kit.
1.10 How do I tell what version or build of LSMTP I am running?
On the WinLSCP Control Program screen, click on Show | Version & License. This will open a pop-up window which will list the version number (v.1.1b) and build-date of both WinLSCP and LSMTP. The most recent version has a WinLSCP build date of Jun 6, 2000 and LSMTP build date of Jun 26, 2002.
You can also find this out from a command line. CD to the x:\LSMTP directory. Issue the command:
LSCP SHOW VERSION
2.1 How do I tell when the mailing is "done"?
If you have constant traffic through your LSMTP, then it is usually not possible to determine this. If you only do large mailings at limited periodic intervals, can this be observed. Basically, when you start the mailing, nothing may appear to happen for several minutes. During this time LSMTP is busy organizing the inbound queue, and trying to sort out destinations. Once LSMTP has enough information to begin, it will open all available outgoing threads, building connections to as many different destinations as possible.
LSMTP will stay in this mode until every destination has been tried at least once. What you will see visually (on the WinLSCP Control Program screen) is that outgoing SMTP threads are no longer maxed, but decline down from the Outbound thread limit. The outgoing count will seldom reach down to 0 since (depending on the size of the mailing) there will always be some retries in progress.
2.2 How can I tell if LSMTP is mailing efficiently?
At the peak (or in the main body of the mailing before only the retries are left) LSMTP should use all available outgoing threads. If it does not, either something is incorrectly configured, or your mailing may simply be full of bad (non-mailable) addresses.
In the x:\LSMTP\TOOLS\ directory, created by a normal installation, is a file called SF90M.EXE. This file can be used to measure relative LSMTP performance when making tuning changes, in conjuction with mailing for LISTSERV lists.
First you must go to the LSMTP Control Program Configure menu, Logging and Accounting Tab and click on Full Accounting. This causes LSMTP to write the file accounting.dat that SF90m will need to process. Note this file can get rather large, but a new file is created every night at midnight. Then copy the SF90M.EXE file to the x:\LSMTP\LOG directory (where the accounting.dat file will be written).
Then proceed to do a mailing. After the mailing (1 hour, several hours, or a full day) run the SF90M file as follows:
x:\LSMTP\LOG\SF90M yyyymmdd listname > perf.txt (or other filename of choice)
returns info on 'listname' for 'date' -or-
x:\LSMTP\LOG\SF90M yyyymmdd > perf.txt
returns info on all transactions for 'date' -or-
x:\LSMTP\LOG\SF90M > perf.txt
returns info on all transactions for today...
Then you can print out the 'perf.txt' file results and compare performance. Note that time-of-day, and day-of-week can have significant performance effects as well so you need to average measurements over several large mailing events before making further parameter changes.
Here is an example printout:
Total: 674,007 deliveries +--------------------------+--------------------------+------------+ | Average delivery time | Max delivery time | For... | +--------------------------+--------------------------+------------+ | 515 sec (08:35) | 1094 sec (18:14) | First 50% | | 636 sec (10:36) | 1390 sec (23:10) | First 60% | | 765 sec (12:45) | 1685 sec (28:05) | First 70% | | 903 sec (15:03) | 2121 sec (35:21) | First 80% | | 1076 sec (17:56) | 2778 sec (46:18) | First 90% | | 1172 sec (19:32) | 3088 sec (51:28) | First 95% | | 1193 sec (19:53) | 3212 sec (53:32) | First 96% | | 1214 sec (20:14) | 3348 sec (55:48) | First 97% | | 1236 sec (20:36) | 3474 sec (57:54) | First 98% | | 1260 sec (21:00) | 3622 sec (1:00:22) | First 99% | <<< | 1286 sec (21:26) | 35354 sec (9:49:14) | All (100%) | +--------------------------+--------------------------+------------+ Highest sustained delivery rate for 1 minute: 238.8/sec at 01:21 Highest sustained delivery rate for 5 minutes: 227.0/sec at 01:55-01:59 Highest traffic in a one-hour period: 632,711 deliveries (01:14-02:13)
The meaning of the above report shows an excellent overall performance. The peak mailing rate was 238.8 messages/second. The sustained delivery rate over 1 hour was 632,711 messages/hour or 175.8 messages/second! Let's take a closer look:
1286 sec (21:26) | 35354 sec (9:49:14) | All (100%)
Looking at the 100% line we see that the average delivery time for all recipients was 21 minutes 26 seconds. This is quite good. However the maximum delivery time was well over 9 hours. What happened? A few destinations had mail servers that were down or were slow to accept the mail. These slow or non-performing destinations distort the overall picture, so it is better to eliminate them from the analysis. If we ignore the worst-performing 1% of the total destinations (6,740) we can see if/how performance improves. Look at the 99% line:
1260 sec (21:00) | 3622 sec (1:00:22) | First 99%
Now that we have eliminated the poor performers, our average delivery time improves slightly (to 21:00 from 21:26) but the maximum delivery time is dramatically reduced from over 9 hours to 1 hour. This give a much more accurate picture of the total delivery speed. 674,007 msgs divided by 1:00:22 gives a rate of 186.1 msgs/sec. An excellent performance.
2.3 Why are there hundreds (thousands) of messages stuck in the queue? How do I get LSMTP to mail them out?
The first thing to understand is that this in not usually an indication that anything is wrong. On the WinLSCP Control Program, click on the Show Menu then on Scheduled Calls. These will show a summary of the reasons there are destinations in the queue that have not yet been delivered to.
242 SMTP entries SMTP last call status codes: 1 WSAEADDRNOTAVAIL 3 WSAENETUNREACH 3 WSAEHOSTUNREACH 50 WSAECONNREFUSED 16 WSAECONNRESET 14 WSAETIMEDOUT 12 %LSMTP-E-DNS_INVDOMAIN, No such domain exists 14 %LSMTP-E-DNS_NOANSWER, No information found for given domain name 23 %LSMTP-E-DNS_SRVFAILURE, DNS server failure 9 %LSMTP-E-DNS_NOREPLY, No reply from DNS server 2 %LSMTP-E-SMTP_NOIPADDR, No IP address found for 77 %LSMTP-E-SMTP_OPENTMO, Timed out opening connection 18 %LSMTP-I-SMTP_WILLRETRY, Site will be retried
You can also get the above display from a command line and write it to a text file for further study. CD to the x:\LSMTP directory and issue the command:
LSCP SHOW SCHED > sched.txt
Let's look at this report in greater detail:
242 SMTP entriesThis entry says there is mail for 242 Destinations in the queue. On the WinLSCP Control Program, if you look in the lower part of the screen, you will see a section for the Queue and a one-line listing for the SMTP Queue. The number of Destinations is important and should be approximately the same as the above number. (It is seldom exactly the same since connections currently being tried are not included in the Show Scheduled Calls count since they are calls in progress.) The number of messages or recipients to deliver is irrelevant unless and until LSMTP can make a connection with the destination.
SMTP last call status codes: 1 WSAEADDRNOTAVAIL 3 WSAENETUNREACH 3 WSAEHOSTUNREACHThis is the beginning of the summary listing of reasons why mail is still in the queue and not delivered. The number to the left of each Status Code represents the number of domains affected by each Status Code. The status code reflects what happened during the most recent attempt LSMTP made to deliver mail to that domain destination. A detailed explanation of the meaning of each Status Code can be found in the Online Help for LSMTP, Appendix A.
50 WSAECONNREFUSED 16 WSAECONNRESET 14 WSAETIMEDOUTWSAECONNREFUSED does not necessarily mean a site is blocking you. Usually it means the other site is simply too busy right now to accept a connection. WSAECONNRESET means the connection was started but then was abruptly terminated for some reason by the remote side. WSAETIMEDOUT means the connection failed to respond to this initial handshake request within the allowed time.
12 %LSMTP-E-DNS_INVDOMAIN, No such domain exists 14 %LSMTP-E-DNS_NOANSWER, No information found for given domain name 23 %LSMTP-E-DNS_SRVFAILURE, DNS server failure 9 %LSMTP-E-DNS_NOREPLY, No reply from DNS server 2 %LSMTP-E-SMTP_NOIPADDR, No IP address found for mailerAll of these are variant errors relating to bad domain addresses, such alo.com (for aol.com) or htomial.com (for hotmail.com). These are invalid domains that will never be mailed to. However, since LSMTP does not receive an Authoritative response from DNS that the domain does NOT exist, LSMTP must continue to retry the lookup until its retry time-out limit.
These domains may be listed in the Show | Queue Detail listing as 'untried'. This does NOT mean LSMTP has not attempted them. However if no DNS information is returned, LSMTP cannot begin to connect to the destination. If LSMTP cannot connect, the 'Try' counter cannot increment so it will remain at 0. Thus 'untried' really means 'never connected', not that no attempt has been made.
77 %LSMTP-E-SMTP_OPENTMO, Timed out opening connection 18 %LSMTP-I-SMTP_WILLRETRY, Site will be retriedOPENTMO is a very frequent failure status. It means the remote location did not respond to the SMTP HELO (or EHLO) request to start a SMTP transaction within the allowed time. We don't know why the machine is failing (it may be down or something wrong with it) but it is not answering. If this happens with a machine that you know should always be on-line and working, (such as home.ease.lsoft.com) then this may also indicate your firewall is blocking outgoing mail connections. WILLRRETRY simply means the destination is in the queue for a retry.
If you want to examine this futher go back to the top of the Scheduled Calls window. The default button is Summary Display. Click the Full Display button and then the Refresh button. The display will change and now you will see all domain addresses listed in alphabetic order. The same Last_Call_Status_Code will show next to each domain. If you look in the H's you will no doubt see some creative mispellings of the domain hotmail.com.
Pick out a few of the OPENTMO error domains and try them for yourself using the Manual Resolve technique from Sect. 1.2 You should get exactly the same error status code.
2.4 How can I prevent error bounces from tieing up LSMTP?
It's not necessary and also unwise to explicity do this; LSMTP already gives preference to new, untried outgoing connections before retrying destinations in the queue that have already been tried unsuccessfully.
Although some customers have altered LSMTP's retry settings on the theory that this will give LSMTP more resources for the initial part of the mailing, in reality these types of changes only make LSMTP less efficient. L-Soft strongly recommends that you not make such changes.
2.5 How can I diagnose trouble?
LSMTP is not starting.
The first thing to check is the log file. Usually this will be in x:\LSMTP\LOG and the file name will be log_yyyymmdd.log (e.g. E:\LSMTP\LOG\log_20000615.log). When LSMTP stops or is shut down, and when it starts, or attempts to start there are about 20-25 lines written to the log file which detail certain normal stop and startup parameters as well as any abnormal conditions LSMTP has encountered. If you need help interpreting these, please be sure to send this fragment of the log file to L-Soft Support. Do NOT send the entire log file.
LSMTP is not delivering mail or is mailing very slowly.
First test connectivity with 1 or 2 known-to-be-working external sites using the manual Resolve command. This procedure is described above in Sect. 1.2
Look at the number of Destinations in the SMTP Queue (ignore number of messages or number of recipients at this time) and compare to the number of Active Outgoing SMTP threads. If the number of SMTP Destinations is greater than the number of Active outgoing threads, and the number of Active Out threads is less than the outgoing thread limit, then the mailing is "done" and you are seeing only retries of mail to destinations already tried and to which delivery could not be made previously. It is likely the original reason for non-delivery still persists so mailing will proceed very slowly. See Sect. 2.1
Follow the procedure detailed in Sect. 2.3 Look for the 2-3 highest count error Status Codes. A lot of DNSSRVFAILURE may indicate a problem with your DNS service. Or you may just have a lot of bad (undeliverable) addresses. A lot of OPENTMO or a lot of WSAE* (tcp stack errors) may indicate a subtle network problem.
Problem delivering to one or a few domain destinations.
The best solution for examining this is Site-Specific logging described in Sect. 2.6
2.6 What is Site-Specific Logging? How do I do it?
Site specific logging in not as simple as clicking a single box but is a good trick to use to observe what the problems may be with a single destination (or origin) site when connectivity or delivery issues come up.
From the LSMTP Control program, click on Configure, then Logging & Accounting Tab. Uncheck the 2 boxes, for 'log calls established/terminated' and 'log messages transferred'. The box Flush Log to disk every X times should say 0 (zero). Normally these boxes should always be unchecked to keep the size of your log files small and manageable.
Click on SMTP Destinations tab. Usually the site in question will not be listed, so click on ADD. Enter the Domain name of the site (e.g. aol.com). There are several lines below this with various parameters filled in. The very bottom line however ('Mailer entry name...') will be blank. Enter the domain name here again (e.g. aol.com) and click OK.
Click the Mailers tab. There are 2 windows. In the upper window, click on ADD. For 'Mailer name' enter the same domain name as you put in the bottom line in the previous (SMTP Destinations) box. (e.g. aol.com). Now there are several sub-tabs. The first of these should be called 'Logging' and there are 4 checkboxes. Normally, you check only the first 2 (log incoming connections and log outgoing connections.) Then click OK and OK again. LSMTP will reload the configuration and will begin logging immediately.
Caution! If you check these boxes you should collect the data you need in the log file and then uncheck them after a time, to prevent the log files from becoming too large. This is especially true if you click on the 2 'log data transfers...' boxes. This creates a full hex + ascii dump of all traffic with the logged site and can cause the log files to get very huge very quickly.
Note: If the site you want to log has only an IP address (typical in testing circumstances) or if you are certain is has only a single MX or A record for mail delivery you can take a shortcut. Ignore the SMTP Destinations tab. Click the Mailers tab. First in the lower window, click on ADD. enter the IP address of the remote mailer. Then enter a name. This need not be a FQDN but must be something meaningful to you in identifying the mailer. Click OK. Then in the Upper Window, click on ADD. For 'Mailer name' enter the same domain name as you put in the bottom line in the previous (SMTP Destinations) box. (e.g. aol.com). Now there are several sub-tabs. The first of these should be called 'Logging' and there are 4 checkboxes. Normally, you check only the first 2 (log incoming connections and log outgoing connections.) Then click OK and OK again. LSMTP will reload the configuration and will begin logging immediately.
Sample of normal logging:
(if you do check the Log Calls established/terminated on Logging&Accounting tab)
16:07:20 ( 9)O begin example.org mailer.example.org 16:07:26 ( 9)O end example.org mailer.example.org
This is not very helpful at diagnosing problems.
Here is a sample of site-specific logging:
16:07:20 ( 9)O opened example.org mailer.example.org 16:07:23 mailer.example.org( 9) >>> 220 SMTP service ready 16:07:23 mailer.example.org( 9) <<< EHLO gw.example2.com 16:07:23 mailer.example.org( 9) >>> 250-Requested mail action okay, completed 16:07:23 mailer.example.org( 9) >>> 250-8BITMIME 16:07:23 mailer.example.org( 9) >>> 250 HELP 16:07:23 mailer.example.org( 9) <<< MAIL FROM:<email@example.com> 16:07:23 mailer.example.org( 9) >>> 250 Requested mail action okay, completed 16:07:23 mailer.example.org( 9) <<< RCPT TO:<firstname.lastname@example.org> 16:07:23 mailer.example.org( 9) >>> 250 Requested mail action okay, completed 16:07:23 mailer.example.org( 9) <<< DATA 16:07:24 mailer.example.org( 9) >>> 354 Start mail input; end with
. 16:07:24 mailer.example.org( 9) <<< . 16:07:26 mailer.example.org( 9) >>> 250 Requested mail action okay, completed 16:07:26 mailer.example.org( 9) <<< QUIT 16:07:26 mailer.example.org( 9) >>> 221 SMTP server closing channel 16:07:26 ( 9)O closed example.org mailer.example.org
As you can see, this is much more informative. If a site is blocking you, you will see it here, or if it is failing to properly terminate the connection, etc. For obvious reasons you don't want this to be on for very long as the log files will get large rapidly.
For help in determining the meaning of the commands and responses please consult Internet Standard RFC821, the SMTP Protocol.
2.7 Do I need to make a POP account to route mail?
No. Receiving mail and routing it to one (or more) other addresses or locations can be done by declaring a routing entry only in the LSMTP configuration..
2.8 Can I edit files in the LSMTP spool directory?
No. Direct editing of the *.mai files in the LSMTP spool is not supported. Although the files appear to be largely text, there are binary elements which will be corrupted, rendering them unmailable.
2.9 LSMTP is installed on a remote machine. How can I control it remotely?
You need to have NT networking capability between the machines. i.e. You need to be able to map a network drive between the machines. So if you are going through firewalls, etc, you need to have the appropriate ports allowed.
Then you copy WinLSCP.EXE and LSMTP.HLP to the local machine.
Then you start it with WINLSCP \\othermachine.domain.com i.e. using a fully qualified domain name for the remote machine (or you can also use its IP address).
Failing this, you can administer it via telnet and ftp. Via telnet, the command LSCP MON STAT gives all the same dynamic on-screen information that you get from WinLSCP. You FTP the config.dat to your machine, make any edits, FTP it back and then use telnet to do LSCP RELOAD CONFIG. Many of our customers also use Remote Control applications like PC Anywhere with good success.
SPECIAL NOTE to users of Windows 2000 Terminal Services:
Because of the way Terminal Services is implemented, the normal WinLSCP.exe (LSMTP Control Program) does not work correctly when operated remotely through Terminal Services. Typically, in this situation, the counts of messages received/delivered and the active threads and queue counts all remain at 0. There may be a message that LSMTP is Stopped. (WinLSCP always works correctly at the physical console of the machine it is running on.) To be able to use WinLSCP remotely through Terminal Services, create a file named LSMTP-console.cmd (or whatever other name you choose) on the remote desktop and paste the 2 lines below into it. (Fill in the correct value for your disk drive instead of x:\... Note also that %computername% is a literal. i.e. you should let the computer find its own root name.)
Rem This command starts the remote LSMTP console in a Terminal Services session START /B x:\lsmtp\winlscp.exe \\%computername%
Make this *.cmd file into a shortcut icon on your remote desktop. Then double-click on this icon (on the remote desktop) and WinLSCP will now work properly in a Terminal Services session.
2.10 Can I simply write files to some directory and have LSMTP mail them?
No. LSMTP accepts only mail jobs that are mailed to it via a normal SMTP transaction. File drop-in can be done using our companion product LISTSERV®. If you are a user of both LSMTP and LISTSERV, you can request additional information about this from L-Soft Support. You may also find this information in our White Paper.
2.11 Can I use LSMTP without LISTSERV?
Yes. Since the programs are separate (although designed to work closely together) they each work independently of the other.
2.12 How do I use LSMTP's API?
LSMTP has a mail receipt API that permits LSMTP to receive mail and write it directly to a file which may then be processed by some other external program. This can be used to implement email-to-fax, or an autoresponder of some kind. The API works only for mail receipt, and has not effect on sending outgoing mail. Full instructions for this API are found in the on-line help file for LSMTP.
2.13 I got a warning that my server is an 'Open Relay'. What should I do?
Open Relay, basically means some unauthorized person is sending mail (usually spam) through your server without your knowledge. Some large sites may refuse to accept any mail from your server if you are an open relay.
In the WinLSCP Control Program, go to Configure then the Relay Control tab. Check that the topmost box ('Enable Relay Control') is checked. Check that the second box (debug mode) is NOT checked. Thirdly, check all the IP addresses listed in the lower window (Relay Mailers) to be sure you know what all of these addresses are and where they come from. Mail from any of the listed IP addresses is permitted to relay through your server. Also be sure you have specified any address ranges (in CIDR notation) correctly and that you are not accidentally allowing more IPs than you intend to.
A cautionary note. Many of these suggestions can improve performance up to a point, but if you over-do them, (e.g. too many LISTSERV SMTP worker threads or too many LSMTP directories, etc.) you find yourself sliding rapidly down the far side of the normal curve into diminishing performance. Do not over-do. Proceed with caution, use the analysis tools, and average your measurements over several mailings to even out changes in network/internet behavior that may also affect your results.
3.1 The File System and disk drive(s)
0. Disk hardware. High volume mailing with LSMTP is a surprisingly disk intensive process. High performance disk hardware is a must. An ultra-wide SCSI RAID system is best, with the largest possible Ram Caching RAID controller. Ram cache of 64mb or 128mb are advised. The ram cache must be configured as "write-back" and NOT as "write-through". The cache should also be configured with an external battery backup. RAID 5 is the safest configuration, although RAID 0/1 is somewhat faster, and somewhat less safe. It should be noted that backup of files generated in high volume mailing is not feasible since the files come and go faster than they could be backed up.
1. Run LISTSERV and LSMTP on NTFS partition(s) and *not* on a FAT partition.
There are inherent limitations in the FAT file system that make handling large numbers of files in a directory inefficient and slow. Both LISTSERV and LSMTP can easily generate large numbers of relatively small, temporary files when doing a big mailing so this will be a factor. NTFS provides superior capability, as well as security advantages.
2. Disabling automatic "8-dot-3" filename generation on NTFS partition.
If running on an NTFS partition, you should disable NT's automatic "8-dot-3" filename generation. If you do not do this, you will find that system performance drops markedly (up to 80%) when you have more than 200-300 files in the LISTSERV and/or LSMTP SPOOL directory. This performance drop is due to a limitation of the NTFS filename lookup system, which is forced to do an index lookup for the corresponding 8-dot-3 filename any time it encounters a long filename. The greater the number of files, the slower this process is.
Changing the default setting is done by opening the Windows NT Registry Editor (regedt32.exe), choosing the "HKEY_LOCAL_MACHINE" window, and then locating the key:
To disable the 8-dot-3 filename creation, change the value of this key from 0 to 1 and reboot your machine.
If you are unfamiliar with editing the Registry, there is an easier way. On our ftp site, ftp://ftp.lsoft.com/listserv/windows/ntfs83-intel.exe is the file which will do this for you.
Simply download and run this file from the command line. It will tell you the current value of the variable (1 or 0) and ask if you want to change it. If you answer N, the program exits, changing nothing. If you answer Y, it asks for the value to change it to, you enter 1 to get the correct setting and it will set it and exit. You must reboot the machine after making this change.
3.2 Network bandwidth, RAM, and DNS Services
LSMTP cannot send mail faster than DNS can lookup site addresses. The use of a robust ram-caching DNS (BIND is one example) will ensure LSMTP is not limited by the DNS lookup process. In very high volume setups, it is vital to have the DNS service run on a separate machine on the local network.
For really high performance, 1024mb of ram memory is essential to allow adequate room for LISTSERV HPO, LSMTP and a caching DNS if all run on one machine. For regular High performance 256mb of ram may be enough, but 512mb is better. Best is for the DNS service to reside on a separate machine. If you aren't sure about the DNS think how it will respond to 1200 simultaneous destination requests when LSMTP opens up on a huge mailing... Most DNS are configured to handle 3-50 requests at a time.
3.3 How many Spool Directories do I need?
By default, there is only one spool directory defined, but you may define up to 256 spool directories for LSMTP for better performance. These may be located on any local NTFS partition. The number of spool directories that will work on any site depends on the workload, and so is best determined by experimentation. A good number to start with is 5 but the best number again depends on actual workload. Ideally this number should be about equal to the number of multiple SMTP-Workers set in LISTSERV above although the relationship is not exact. Thus if you have 5 SMTP worker threads, you should have 5-7 LSMTP spool directories. Too many directories is counter-productive. Also, a very large value for MAXBSMTP (see above) reduces the number of directories needed. Conversely if you are using another program that generates hundreds of separate single recipient messages, you should increase the number of LSMTP spool directories. In general, if you have more than 500-1000 files per spool directory during a large mailing, you need to increase the number of spool dirs by 50%. As with all tuning suggestions it is possible to overdo this and having too many directories will result in decreasing performance.
Under NT, in the LSMTP Control Program 1.1a, select "Configure..." and go to the "Directories" tab to add spool directories (In 1.1b the tab is called "Spool directories".) In 1.1a the LSMTP Control Program will create the directories if they don't exist yet. In 1.1b you must manually create the directories. After you save the configuration changes, you MUST stop and restart LSMTP under either version 1.1a or 1.1b.
3.4 Setting Multiple connections to certain domains
If your mailing lists tend to have a large number of addresses from a particular site (e.g., AOL, Prodigy, Worldnet...), create a site definition for that site within the LSMTP configuration, and then specify a maximum number of outgoing (concurrent) connections to that site. This allows LSMTP to allocate more resources for delivery to such sites, as it's other usage fluctuates under load.
The optimum number of connections per site is really determined by each workload and desired throughput rates. Start with 10 connections and work up or down as experience dictates. One rule of thumb on this is to use 1 thread for each relative % that domain occupies in your database. e.g if aol.com amounts to 32% of your total address database, then you should allocate 32 threads to that SMTP destination.
NEVER change the value of the '*' or default site to make it larger than 1. You may think this will improve throughput but in practice is causes LSMTP to "spin it wheels" and overall throughput will actually decrease, not what you want.
For LSMTP 1.1b, you set this on the SMTP Destinations tab. Click on Add then define the destination, and then set Max. number of simultaneous connections: With LSMTP 1.1b, you do not have to Stop/Re-Start LSMTP.
For LSMTP 1.1a, select Configure and go to the Sites tab. Click on Add..., enter the site name (use the DNS name), and change the value in Open at most __ outgoing connections to site. After you save the configuration changes, stop and restart LSMTP.
3.5 Setting threads
This is discussed above in Sect. 1.3
3.6 Measuring Performance
This is discussed above in Sect. 2.2
This is discussed above in Sect. 1.8
3.8 Special considerations for "Brute-Force" Mail-Merge
"Brute Force Mail-Merge" consists of preparing thousands (perhaps millions) of separate single messages, each message for one person. Singe each message contains its own mail headers, and is stored as a separate file, disk space management becomes extremely important. You must ensure that you have adequate disk space to hold your entire mailing
Since it is a problem for any file system to handle hundreds of thousands of files in one directory it is important to have enough spool directories so that files can be distributed among them evenly, in order to keep the number of files per directory reasonable. If you are doing LSMTP's modified-BSMTP form of mail-merge, there is seldom any need for more than 8-16 spool dirs. In Brute-Force MM, we recommend that you begin with 25 spool directories and try a mailing and then increment by another 25, in steps up to 250 spool directories.
In Brute Force MM, having very high performance disk hardware becomes extremely important since ultimately the speed of mailing will be limited by the speed of disk I/O. See Sect. 3.1 Many hundreds of thousands of files must be received and written to disk, the destinations must be sorted, connections opened and then the mail can be delivered. As the mail is being delivered, the file must be read again, and if successfully delivered, the file may be deleted.
One trick that seems to squeeze some improvement, is to divide the spool directories among 4 logical disk partitions. Since NT assigns a separate section of system RAM to handle I/O for each logical disk, having 4 such structures instead of only 1 results in a modest improvement. Another improvement is the new HPFS version of NTFS that comes with Windows 2000.
Comments on this FAQ are welcome and should be sent to email@example.com. Please do not send support or sales inquiries to this address--it is for comments on the manuals and FAQs only. If you need to ask a question that is not covered by this FAQ, see the support options outlined at the top of the page.