PC Webopaedia Outstanding Page Award
Setting up Email in DOS with today's ISP using a dialup PPP TCP/IP connection
By Dan Komaromi
Since this page was written, others have improved my technique. I recommend visiting the following page:
The BareBones Solution by James Chapman:
This guide shows you how to setup email in DOS with a dialup connection. While many DOS-based Internet programs are available via FTP sites, most were written prior to 1994 when dialup connections were primarily made using static IP addresses through regular SMTP protocols. Today's Internet Service Providers, however, use dynamic IP addresses and ESMTP, two features that are incompatible with almost all DOS PPP TCP/IP stack dialers and DOS email clients without a significant amount of tinkering.
After much experimentation, I discovered a simple combination of DOS programs that work with dynamic IP addresses and allow you to work around the ESMTP problem. Now you can take that 286 laptop out of your closet and use it to check your email while on vacation.
The solution presented here uses three excellent programs: Pegasus Mail for DOS v3.22, PMPOP v1.1, and the current version of PPPDEMO. Pegasus Mail and its PMPOP extension by David Harris are freeware, while PPPDEMO, a PPP TCP/IP stack dialer by Klos Technologies, Inc. is a fully-functional, shareware demo. These programs offer excellent user interfaces and impressive features. Pegasus Mail is an outstanding email client; my personal favorite, available for several operating systems.
You may view screen shots of this software in action.
You will need some DOS knowledge to follow these instructions.
To look up terms you are unfamiliar with, see the
2. OBTAINING THE SOFTWARE
Follow these links to download the three DOS-based programs:
PPPDEMO by Klos Technologies, Inc. (218KB)
POP3/SMTP module for Pegasus Mail/DOS (96KB)
Pegasus Mail for DOS 3.22 (811KB)
If your system has less than 1MB RAM, the above combination of programs may or may not work. See the tips & tricks section for information on setting up the stack/dialer NETDIAL (use instead of PPPDEMO) which takes up less memory. I have not personally tested this low memory configuration, so let me know how it works for you.
3. INSTALLING AND CONFIGURING THE PPP DIALER
Create a c:\PPPDEMO directory and execute the self-extracting archive PPPDEMO.exe in this directory.
Run pppmenu. Check and set the following:
IP Parameters -- Enable/Disable IP, select Enable IP.
IPX Parameters -- Enable/Disable IPX, select Disable IPX.
Port -- I/O Port, Interrupt, and Baud Rate. Set the Connection Type to Auto Dial. The remaining should be left at the default settings.
Modem -- Phone Number, Command Strings (if needed).
Scripting -- Set the login sequence and response (usually login: userid\r Password: password\r or similar). If you're not sure about the sequence, set the Port/Connection Type to Terminal for the first time for a manual login.
By default the response timeout is set rather low. Set it to at least 30 seconds.
Authentication -- Select ID and Password, and enter the information.
For those using attglobal.net, select PAP authentication in PPPDEMO and set the userid to internet.youraccount.youruserid, then set your password. Since Advantis uses Password Authentication Protocol, no login script is required. Also, enable VJ Compression in the IP settings..
Now press ESC a few times and choose to save and write the changes to net.cfg.
Exit PPPDEMO and create a file in the PPPDEMO directory called email.bat using any text editor. It should contain the following:
Replace userid with your email username without the domain part.
Add c:\PPPDEMO to the path= statement in AUTOEXEC.BAT so that you can invoke an email session by simply typing the word email at the command prompt.
Create the directory c:\pmail and copy pppwat.exe here. PPPWAT is a very useful utility which automatically updates Pegasus Mail's wattcp.cfg file with your assigned dynamic IP address, netmask, and gateway.
Note: if you need to change the PPPDEMO configuration settings while troubleshooting the dialup process, reboot the computer if you ran the email.bat file. Otherwise, invoking pppmenu will not bring up the configuration menu, rather just the connection menu.
4. INSTALLING AND CONFIGURING PEGASUS MAIL/PMPOP
Unzip pmail322.zip and pmpop111.zip to the c:\pmail directory.
Rename the pdpmpop.exe file to pmpop.exe.
4.1. Setting the WATTCP.CFG file
The wattcp.cfg file contains information about your IP address and other server settings. The only information you need are the primary and secondary Domain Name Server (DNS) addresses and your domain name. The rest is dynamic and automatically configured by the pppwat utility every time you establish an email session.
Open wattcp.cfg in a text editor to add or modify the entries shown below in bold. The other entries should exist, but may hold any address value, since pppwat takes care of these for you.ppp = 1 # Add this entry
my_ip = 000.000.000.000
netmask = 000.000.000.000
nameserver = 000.000.000.000 # Primary DNS -- replace these 0's with your values
nameserver = 000.000.000.000 # Secondary DNS -- replace with your values
gateway = 000.000.000.000
domainslist = "mydomain.net" # Replace with your domain name
4.2. Configuring Pegasus Mail
Run pmail. Enter your userid -- this must be the same as the username you entered as part of the email.bat file. Accept the default home mailbox location and username settings.
Select Preferences, then General Settings. In this menu you will come across an option called "Personal Name." You do not need to enter anything in this field; it is used for running pegasus mail over a network. Choose Y for the "Automatically open new mail:" entry. Press ENTER several times, then Y to accept and continue. Exit Pegasus Mail.
Run pconfig. Select "Configuring Pegasus Mail/DOS," and then "Manage user defined gateways." The POP entry should be highlighted. Press ENTER to edit.
The "Outgoing mail path" should be set to c:\pmail. This is important -- the send email function will not work if this is set to another directory, unless you make some additional changes to the program/config file locations. The outgoing mail is deleted once sent, so this will work fine for single-user setups. Your incoming email will have its own directory.
The "Run for outgoing mail" entry should be set to "c:\pmail\pmpop -s" without the quotes.
Check that the "simple message headers" entry is set to "Glue Headers."
The remaining items should be left at their default values.
Press CTRL+ENTER, Y, then CTRL+ENTER to save the changes, then X to save and exit.
4.3. Configuring PMPOP
Run pmpop -c to configure the Pegasus Mail POP3/SMTP extension.
Enter your POP3 server name in the "Get mail from:" section.
Enter your userid and password.
Type c:\pmail\userid (once again, replace userid) for the "Store mail in:" entry.
Choose Y for "delete messages once downloaded" to remove email from the server after it is retrieved.
Enter your full email address in the "From field:" and then beside that, put your name. i.e In the from field you would enter firstname.lastname@example.org <Firstname Lastname> Where email@example.com is your internet address and <Firstname Lastname> is your full name which will be shown to whoever receives your messages. Be sure to include the <> brackets or you will get unexpected results.
Enter the SMTP relay you will be using in the "SMTP mail host:" section. Please seee the troubleshooting section if you get a handshaking error while sending mail.
Type *.msg for the "Search mask:". This is important because Pegasus Mail cannot find queued email without this mask.
5. STARTING AN EMAIL SESSION
You're now ready to start! Reboot your computer for the modified path statement in AUTOEXEC.BAT to take effect.
Simply type email at the command prompt.
Press ESC to exit the PPPDEMO welcome screen. Press ENTER to connect. While a connection is being established, a small box will pop up in the upper right corner of the screen and cycle through various messages. When the connection is ready, it will contain the text "IP Open."
Exit from PPPDEMO. Pegasus Mail will start automatically. Have fun!
The PPPDEMO software is frequently updated and sometimes this causes problems because this instruction guide cannot keep up on a day-to-day basis. The best way to solve this is to ask the author what changes he made to the program and how they might relate to the error you are experiencing. In order to receive tech support from KLOS, you must register the program. See http://www.klos.com/ for more info.
If you get the error "Unable to bind to ppp driver," perhaps your IPCP is disabled in PPPDEMO. Try enabling it.
Commonly encountered problems arise from memory issues. Check your AUTOEXEC.BAT and CONFIG.SYS files. DOS TCP/IP networking is sensitive to memory-hungry device drivers, especially those used by Windows 3.1.
The PPPDEMO/Pmail3.22 combination requires approximately 1MB of free memory; otherwise, the programs may freeze. You can use the command MEM /C to check available memory.
If the PPPDEMO software does not display "IP Open" after establishing a connection, the most common cause is incorrect scripting and/or modem settings. Most service providers require the use of a login script, the sequence of which you can determine by doing a manual login in terminal mode. Be sure that "IP Open" appears prior to exiting the PPPDEMO menu and troubleshooting the Pegasus Mail setup.
TCP/IP communication errors indicate that the WATTCP.CFG file does not contain correct settings, or that the PPPDEMO TCP/IP protocols were changed from their defaults.
An ICMP: Port unreachable error message will result if the nameserver (DNS) setting in WATTCP.CFG is incorrect.
If you are using an older computer, you may get communication errors if you set the modem higher than 9600 baud. If this is the case, your computer may contain the 8250 UART. The newer 16550 UART contains a 16-bit buffer, enabling it to support higher transmission rates than the older 8250 UART
A driver integrity error may be caused by an incorrect system clock time/day setting. Also, verify your UARTS with FIND_COM (in the PPPDEMO directory).
If you get a handshaking error while sending email (but receiving works), find a regular SMTP mail relay address by examining the full headers of various email messages. A full header lists all of the relays involved in a particular transmission, both SMTP and ESMTP. You can write a list of these relays and test them until you find one that works, preferably in your geographic region. (Special thanks go to Mike Bennett for finding this solution)
In the following fictional example of a full message header, the domain just.an.example.com would be a possible candidate for an SMTP relay:
Received: from somewhere.com by o200.swordfish.net via ESMTP (950513.SGI.3.6.12/941201.SGI) for (firstname.lastname@example.org) id SAA12842; Tue, 18 Mar 1997 18:29:52 -0500 Received: from what.an.example.com (cs163-123.an.example.com [184.108.40.206]) by just.an.example.com (8.4.6/8.7.3) with SMTP id PAA09128 for (email@example.com); Tue, 18 Mar 1997 15:29:50 -0800 (PST) From: Me (firstname.lastname@example.org) Sender: email@example.com Reply-To: firstname.lastname@example.org To: email@example.com Subject: Check Out the DOS Email Site Message-ID: (SIMEON.9702181320.B@what.an.example.com) Date: Tue, 18 Mar 1997 15:35:20 -0800 (Pacific Standard Time)
Here are some tips & tricks reported by users who found a clever way to modify the setup to work on their system.
7. FREQUENTLY ASKED QUESTIONS (FAQ)
What are the minimum system requirements?
All you need is a DOS-based system with at least 1MB of RAM and a modem. Several people have reported success with minimal hardware, including 8086s and palmtops. Please tell me about your own experience so we can push the limits in exploiting the productivity of ancient hardware.
Are there any web browsers for DOS?
DosLynx is a popular text-only web browser, available from http://www.fdisk.com/doslynx/doslynx.htm
Are there any other DOS Internet resources on the web?
See FDISK.COM DOS Internet Pages (http://www.fdisk.com/doslynx/).
Which clients will work with PPPDEMO?
If the program uses a WATTCP.CFG file, or a file with a .CFG extension, you are in luck. PPPWAT can modify these files for you to update the dynamic IP and gateway information. If your service provider uses static IP addresses, you can use a wider variety of PPP applications.
Can I send mail from the command line?
You can use the command line pmpop -s to send all messages with the .msg file extension in the pmail directory. These .msg files are deleted once sent. When creating message files, you must "glue" the headers, using the included glue.exe or something similar. Likewise, you may retrieve mail using the pmpop -g command.