Mail Transport Agent

Let us get some terms sorted out:

  • Mail server is one sends and receives emails. It does not send mails to or receive mails from a user as you would expect. Mail servers communicate with users through mail transport agents.
  • Mail transport agent (MTA) is an agent of a mail server. A MTA delivers mails to another mail server. Examples are Sendmail, Postfix and Exim.
  • Mail user agent (MUA) is an agent of a mail user. A MUA delivers mails to the user. Examples are Eudora, Outlook Express, Mozilla Mail and Kmail.
Graphically,
MUA >>>>> Mail server <<<<< MTA

Popular mail protocols:

  • SMTP -- send mails
  • POP3 -- deliver mails
  • IMAP -- message access
The secure version is identified by the "S" suffix, which stands for Secure Socket Layer (SSL), e.g. SMTPS, POP3S and IMAPS.

Why MTA?

You may ask why we are talking about mail servers and related topics in Athena. If you look at ROCP configuration, you will notice the option to authenticate users by email as well as several mail server settings. In that authentication method, an activation key is sent to sent to a registrant's mail box, There are two ways to do that, one is obviously setting up a mail server and the other is to use MTA or MUA.

A reasonably featured mail server, comprising SMTP and POP3, is usually beyond an Athena host, not so much on technical knowledge, but resources. To begin with, a top-level domain (TLD) is required. Then a mail host with fully qualified domain name (FQDN) should be set up before mail servers and MTA are installed. Since an Athena host only needs to send mails, i.e. the activation key, and does not receive mails from users (the activation key directs registrant to ROCP web site), it makes sense to avoid the hassle of setting up a mail server. Besides, the MTA that comes with a Linux distro can talk to any mail server and functions like a SMTP server.

As a side note, many Linux distros come with UWASH (University of Washington) IMAP server package which, once installed, becomes an industrial-strength IMAP server with POP3 functionality. That means you can provide full-featured web mail service to your users. However, UWASH server works only with Linux user directory, meaning you have to make each mail user a Linux user as well. (Caution: Test UWASH on a separate machine.)

Let us get the MTA

The most popular of all MTAs is the battle-proven Sendmail. However, many users tend to find it difficult to deal with the age-old, sometimes cryptic, configuration and go for the speedy Postfix instead. Installation is straight forward and involves nothing more than launching RPM and select package (add the conf package if you choose Sendmail).

Configure

Now that Sendmail or Postfix is installed, log in to Webmin at https://localhost:10000, go to the Server page and click the appropriate icon. You will see that you already have a mailbox among other users, such as mysql and apache. That is no surprise. Linux MTAs work hand-in-glove with the systems they are on and will deliver mails within your local net. While you are there, check whether your host name has been picked up by the MTA. You should see myhost.mydomain.tld if host name has been previously set.

Next, set up your account with your favourite MUA such as Outlook Express, Kmail or Mozilla Mail. You should have an account with a POP3 server if you want to receive mails. Configure your identity:

  • email address — your email address
  • outgoing server — myhost.mydomain.tld
  • outgoing type — SMTP
  • incoming server — myhost.mydomain.tld (does not matter, no incoming mails anyway)
  • incoming type — POP3

I have been lucky enough to have mail servers to play with and in all honesty have not tried the MUA configuration without a working mail server. However, I found in my tests that an address like user@myhost.mydomain.tld works indeed. It was not due to my TLD. The test server has a MX 20 priority, meaning it will never receive any mail if my main mail server is up. Sendmail (and Postfix) will deliver mails using FQDN host name as the domain, something perfectly acceptable to standard-compliant mail servers. If you only have a web mail account, such as one from Hotmail, you might want to try that. (Yahoo is using a third-party blacklist and might block your mails.)

Testing

You want to know whether the MTA setup works, of course. Just send yourself a mail at another address, such as from user@myhost.mydomain.tld to myname@hotmail.com and go check that mail box. If it works, you have got a "mail server" which you can use with ROCP. If for some reason the MTA fails to deliver, log in to Webmin again and check the mail queue. It might look strange at first but you can have a good guess of the source of error. Paste that error message on your favourite search engine and you will be on the site of Sendmail or Postfix soon after, ready to read something useful.





Q&A

Should I set up the MTA?

You should. Only Linux users have those industrial-strength MTAs as options. It is fairly easy to install and configure with the help of Webmin. Besides, it will not do any damage if it does not work. As an Athena host, email activation via ROCP is an effective way to control registration flood and is the only way todate to control login names, some of which contain characters which cause MySQL server to freeze.

Can I use my NoIP or DynDNS domain?

Theoretically yes, if your NoIP domain name is configured to be your host name. Sendmail or Postfix will be using a FQDN hostname which is your NoIP or DynDNS domain name to deliver mails. However, it is almost certain that replies to your mails will be sent to the mail server of NoIP or DynDNS which (a MTA will contact) will be receiving (or bouncing) mails for NoIP domain. That is the reason for configuring your MUA identity with your own mail address as the reply-to address. Another nag here. Do not give your service provider any problem; it could lead to termination of such free services.