How To Install And Configure An SMTP Server

What is an SMTP Server?

An SMTP server is, broadly speaking, a program that allows you to send email to other SMTP servers; therefore, it also makes it possible to receive it. Usually, when we contract an internet connection, the provider provides us with one or more accounts where we can receive messages (accessed through POP3 or IMAP) and an SMTP server that we must use to send ours. So what is the purpose of installing another SMTP server on our own computer?

1. Have an alternative in case the free SMTP server of our provider is down or does not work properly.
2. To be able to send emails from accounts that do not belong to our provider (your SMTP server often does not allow it).
3. Write and send messages from webmail accounts from our email client, without using a browser.
4. Avoid limitations on the size of attachments (the only limit will be the capacity of the recipient's mailbox).

Normally, if our internet provider is called telecom.es and the recipient's provider is netcable.com , the process for sending a regular message is as follows:

Our mail client ( Outlook , Thunderbird , Eudora , etc.) sends the outgoing message to the SMTP server of our provider that we have configured in the properties of that same client. This locates the SMTP server of the recipient of the message and sends it over the Internet. This second SMTP deposits it in the client's mailbox (the POP3 or IMAP server, which is normally on the same computer), waiting for the client to check the mail and download it to their own computer, also using a mail client.

Using our own SMTP server, the process would be as follows:

In the same way, our mail client would send the message to the configured STMP server, but in this case it would not leave our computer, since we would have it installed right there (Outlook on duty does not care whether it is inside or outside). SMTP would look up your destination address "match" and the rest of the process would be equivalent.

Making an analogy with the real mail , the normal thing is that all the letters that we send go through the nearest post office of our locality. However, if one day it happens that it is not open (local holiday, strike, etc.), we can always drive to the office of the city of the addressee and deliver the letter there. The latter would be the equivalent of using our own SMTP server. The advantage of email is that both forms would have exactly the same economic cost for us (zero, in case of flat rates).

How does it work?

An SMTP server works the same as any other Windows background service. After installing and configuring it properly, we can forget about it, since it will start together with the operating system and we will always have it available to send mail. There are two SMTP servers that we are going to configure in this tutorial: Argosoft Mail Server and XMail . The first stands out for its friendliness and ease of use; its main problem lies in the limitations of its free version : we will not be able to send attachments larger than five megabytes with it.

With XMail we will not have any limit other than the size of the recipient's mailbox, but its configuration requires a little more work and only works in Windows versions NT, 2000, XP or 2003 (and later). Both programs are free.

Argosoft Mail Server

The program can be downloaded from http://www.argosoft.com/rootpages/Download.aspx

Once the executable is in our possession, a double click will cause it to begin to install with the typical procedure of pressing Next… Next…

Once the process is finished, in "Start> Programs> Argosoft Mail Server" we will have the program available. In the first run we were a warning message and will be placed in the tray with this icon . A double click on it will make the main window appear, in which we must go to Tools -> Options.

We have to leave the General tab as in the screenshot above. In the DNS Server box you have to enter one of our DNS servers (the typical 80.58.0.33 from Telefónica ADSL has been set in the screenshot ). 

Although it is optional, it is advisable to fill in the Logging box as suggested above. Thus, if a failure occurs, we can see the cause with the option Tools> View log file of ArGoSoft Mail Server .

This is all that needs to be done to configure the program. Once the OK button is pressed , the server will start working in the background, starting automatically together with Windows and being available every time we send an email.

The other necessary step is to set up our email client, which doesn't have a lot of history. In each of the accounts in which we want to use our SMTP server - instead of the one given (or not) by our provider - we must write the IP address 127.0.0.1 in the box corresponding to SMTP. 

What is XMail?

It is an open source mail server whose SMTP is based on the well-known UNIX / Linux sendmail , although this time it is ported for Windows. As is usual in these programs, their use is based on the unfriendly command line (the "MS-DOS"); although for those who are scared at the prospect, frontends have been created , which make their configuration as affordable as any other typical Windows program. Therefore, there are two files to download:

The XMail server , from http://www.xmailserver.org/ (the file to download is called NT / 2k / XP Binaries )
The frontend. In this case we are going to use XMail Installer , downloadable from here .
The installation of XMail could not be simpler, since it "does not install": we must limit ourselves to unzipping the ZIP file in any folder on our hard drive. Although to keep a bit of order -which never hurts-, we suggest doing it in C: Program FilesXMail .

The same thing happens with XMail Installer : the ZIP file contains a single executable that we can place wherever we want; although, again for order reasons, we recommend pasting it in the same folder as its "parent program" XMail .

A double click on this file XMailInstaller.exe will show the graphical configuration of the server:

We must tell XMail Installer where the XMail program is . To do this, we will do the following:

In the XMail Root box, click on the folder on the right and locate the Mailroot folder of the XMail program . If we have followed the recommendations above, it will be found in C: Program FilesXMailMailRoot .
Next we will indicate the location of the executable. In the XMail Location box , again we use the folder to locate the file XMail.exe , which with our scheme will be in C: Program FilesXMailXMail.exe .
We will press the Update Registry button (we will have to do it every time we make a change and want it to be memorized: it is equivalent to the Apply button on the normal Windows menus).
Finally, we press the Install Service and Start Service buttons (in this order). We can now close XMail Installer .
Now we must configure our email client in the same way as in the case of Argosot Mail Server.

The logs and success / error messages are somewhat more complicated to consult. Normally what I do is: go to the program folder ( C: Program FilesXMail , in the example), press the F3 key and search for all files and folders without specifying any criteria. Once the search is finished, I sort the results by date and I open the latest files with Notepad.

Some safety rules
At the moment there are thousands of robots scanning each IP in search of an open port 25, which usually means that there is an SMTP server behind it. As soon as they find an unprotected one, they use it as a shuttle to send spam "anonymously".

So it is essential to protect our server from accesses from the outside. The method:

If we are behind a multi-user router and / or use the XP firewall with its usual configuration, nothing else to do. We are protected.
If, on the other hand, we connect with a modem, with a single-user router or using the DMZ option, we must install and configure a firewall to block port 25 from any external access.
A typical firewall rule would be the following:
- Rule name : The one you choose.
- Protocol : TCP.
- Sense : Incoming (incoming).
- Local port : 25.
- Remote port : any.
- Application and IPs : any.
- Action: block.

Also check out the details about free autoresponders.