Mail Services Overview
 

Table of Contents

Introduction
Domain Name Server (DNS) Requirements
SMTP Setup
POP3 Setup
Common SMTP and POP3 Settings
Common Mail Problems and Solutions
Common Questions and Answers

Introduction
PowerWeb provides a complete suite of mail services that manage incoming and outgoing mail, using SMTP and POP3 services. Briefly, SMTP is used to send mail and to receive mail from other host machines, whereas POP3 is used to retrieve mail for a specific user, once it has been received by SMTP locally.

You MUST perform the following setup steps:

Each of these steps is documented below. Please read the notes THOROUGHLY, the information and the required setup is vital for you to be able to run a successful mail service.

  1. Disable any existing POP3 or SMTP (SendMail) server.
  2. List ALL host names for your server within your HOSTS file.
  3. List ALL IP addresses for a multi-homed server within the PowerWeb Host Mapping page for both SMTP and POP3.
  4. Define mail directory locations.
  5. Autostart PowerWeb's POP3 service.
  6. Autostart PowerWeb's SMTP service (this is the default setting).
  7. Ask your DNS administrator to set up your name server to handle mail for your host name.
  8. If you have problems, read the quick-fix guide within this document.

Remember, every time you change a TCP/IP configuration file, such as your HOSTS file, you should shutdown PowerWeb and restart it so that it can read the new setup.

If you are running an existing SMTP or POP3 server:

You must disable any existing SMTP or POP3 server before running the PowerWeb mail services. In the case of IBM's OS/2 sendmail product, you will need to use the TCP/IP configuration program (tcpcfg) to stop it from being autostarted.

Typical mail flow:

remote user sends mail via his/her mail package
-> remote user's SMTP server
-> destination site's SMTP server
-> mail sorter program, which sorts incoming mail into mailboxes by user
-> POP3 server
-> recipient's mail package

The POP3 server therefore relies on your site having a functioning SMTP server to receive mail, which is why you should always enable PowerWeb's SMTP service if you enable POP3.

There are two methods of storing mail:

Store the user's mail in separate files, one per message, into a directory given the same name as the user's mail id.

Store all of a given user's mail into a single file, named the same as the user's mail id (this is most commonly used under UNIX).

The first approach is the default and is the favoured one under OS/2 and NT unless you have a very large volume of mail items within each mailbox.


Domain Name Server (DNS) Requirements
For your site to receive mail, you should ask your domain name server administrator to setup your domain name with MX records appropriately.

For example, if your machine host name is "www.compusource.co.za" and you wish to receive mail at the address "compusource.co.za", then you will need an MX record for "compusource.co.za" which points to "www.compusource.co.za" with a preference value of 0 (the highest precedence). You may also wish to add another MX record for a backup host to receive mail on your behalf when your primary mail server is down (PowerWeb SMTP will automatically receive the mail from that backup server once communications are re-established).

You should also ensure that both your domain name as well as your server name have A (address) records defined within the DNS database. These records are required to map a host name to an IP address.

After a change has been made to a DNS database, it can take anything from 2 hours to 2 days to take affect at all the other DNS sites around the world.

How to Verify your DNS Setup:

If you wish to verify that your DNS has been set up correctly, use the nslookup program as follows:

nslookup
server your_dns_server's_ip_address
set q=mx
your_server_name
and verify that the machines and ip addresses listed are those required.

Note that you should not list your local host as one of the MX alternatives, because RFC 974 specifies that any destination host with an equal or lower precedence (higher preference value) to that of your local host is discarded, including your local host. The implication is that mail intended for another host will be queued until a host of higher precedence accepts the mail from it.


SMTP Setup
The generic service settings are common across all protocols and are accessed by loading the /admin page, and choosing "Services" under "General Configuration", or you can access it directly here.

Multi-Homed Sites:

If you have a multi-homed site, you will need to inform PowerWeb which IP addresses belong to the local machine. This is done through the Host Mapping page. If you omit an IP address from this list, you may cause a mail loop where SMTP continually tries to send to itself until the maximum hop count is exceeded and the mail is bounced back to the sender.

With a multi-homed site, each IP address has its own mailbox directory and its own user realm as specified by the Host Mapping page.

If you have the same user name for multiple hosts, the mail will be split into multiple mailboxes, one per host, and the mail is retrieved by pointing your mail client software at each individual host.

Multi-Aliased Sites: (this section is a must-read!)

PowerWeb can handle multiple aliased host names for the same IP address. This situation will almost always arise - for example, if your server is named www.compusource.co.za, you will most likely send mail to compusource.co.za, not www.compusource.co.za, which means that you need an alias for the machine running PowerWeb Mail.

PowerWeb handles aliases by querying your HOSTS file at startup for all the aliases for all the IP addresses that you list within the Host Mapping page (described above). Therefore if you change your DNS to include another alias, you should edit your local HOSTS file and restart PowerWeb so that it can be informed of the change. It is very important that you keep your HOSTS file accurate and complete, otherwise your mail may sit in your mail queue until it is bounced after the default 5 days of waiting.

The HOSTS file is kept within the directory specified by your ETC environment variable. Ours is stored within d:\mptn\etc\hosts and contains (on two separate lines):

127.0.0.1 localhost
196.31.1.61 www.compusource.co.za ftp.compusource.co.za smtp.compusource.co.za compusource.co.za
In this example, www.compusource.co.za is our canonical host name and smtp.compusource.co.za is an alias.

You MUST specify your canonical host name as the FIRST name after the IP address, otherwise PowerWeb cannot properly determine all the local host name aliases, and mail may sit in your mail queue and never be delivered because PowerWeb did not discover all your aliases. This information is required in this order because the Internet Domain Name Service is not powerful enough to support a query to obtain all aliases of a host.

Long User Names:

PowerWeb can accept long user names for mail-ids so long as you are running an extended file system that allows long filenames. If you are running a DOS file system, you are limited to user names of at most 8 characters long. User names may not contain any characters which are not valid file name characters on your file system.

Audit Log and Trace Log:

On a busy mail site, you may wish to disable auditing as the log file can grow rapidly. Switch auditing on to diagnose mail problems.

PowerWeb SMTP keeps a condensed log of all successfully received or delivered mail: view the SMTP trace log.

Timeout and Disk Space Management:

Within the Limits page, you may wish to change the maximum message size (MaxUpload) and the minimum free disk space (MinFreeSpace) settings, as well as the timeout before undelivered mail will be bounced (TimeoutDeliver). Most other timeouts should be left unaltered from their defaults unless you have good reason to change them.

Gateways and Firewalls:

The Proxy page allows you to specify a gateway machine (probably on a firewall) to deliver external mail through. If you need more flexibility, use the "Resolve" Mail API hook.

Mail Queue Management:

Incoming mail messages are queued on your hard disk for safety of delivery. The queue directory is defined by the "Document Root" of your SMTP server and can be relocated elsewhere for disk management purposes.


POP3 Setup
The POP3 setup is almost entirely automatic. Your main task is to add or remove users who can receive mail, including any aliased user names, by using the User Editor.

By default, any member of the Mail user realm (which is a pseudonym of the Admin realm by default) is able to receive mail.


Common SMTP and POP3 Settings
The Mail Settings page is common to SMTP and POP3 and defines how mail is handled by your site, such as the storage location and type of your user mailboxes.

Read the Help on that page for more details.


Common Mail Problems and Solutions
Mail is not being received:

The most common causes are:

  • You are not running the SMTP service. Check that it is autostarted.
  • You are running PowerWeb's SMTP as well as for example IBM's sendmail server simultaneously. The solution is to stop sendmail from being autostarted by loading IBM's TCPCFG program (for OS/2).
  • You do not have a valid MX record for your server, see the documentation above on how to set up DNS.
  • Mail is being received for an invalid user name and hence is being rejected. Check that the Mail user realm contains all the user names who are allowed to receive mail.
  • Your Mail User Database Realm is set to case-sensitive. It should be case insensitive.

Mail is received, but not delivered to POP3:

The most common causes are:

  • Your HOSTS file is missing or incorrect. It is very important that it contains all valid IP addresses and all valid host name aliases for your server. Refer to the documentation above for instructions.
  • If the maximum hop count is being exceeded, it is likely that your HOSTS file does not list your canonical (official) name for your server as the first name after the ip address.
  • You have multiple IP addresses for your server and you have not defined them all within the Host Map page within Mail Setup.

Mail is delivered, but your mail client does not see it:

The most common causes are:

  • You are not running the POP3 service. Check that it is autostarted.
  • Your mail client is not setup to use POP3 on port 110 of your server. If your mail client can only support POP2, you can add a second POP3 service which runs on port 109 - this will allow POP2 clients to work.
  • Your mail client has the wrong user name and/or password.

Common Questions and Answers
Can I have separate mail accounts for each of my virtual domains?

Yes, this is now fully supported, with completely separate mailboxes and passwords for each set of users.

Can I redirect mail addressed to a local user to another site?

Yes. To make use of this facility, you add a new user to your mail realm whose name is the full e-mail address of the new recipient, and whose alias is the original user name at your host. You do not have to define a password, as this user will never have a mailbox, the user name is simply there to provide mail redirection.

For example, to redirect mail addressed to "help" to "helpline@xyzinfo.com", you would create a new user named "helpline@xyzinfo.com" with an alias of "help".