Ubuntu Linux is quickly becoming one of the most popular Desktop Linux distributions. As Ubuntu gains in popularity in the desktop market it is also gaining in popularity as a server operating system as well. In this guide I will run though the basics needed to get an IMAP and SMTP mail server up an running on Ubuntu Linux.
Installing the needed Applications
Assuming you are starting from a fresh install of Ubuntu Server you will need to install the following packages:
- postfix
- sasl2-bin
- courier-imap
- courier-imap-ssl
During the installation postfix will ask you for the general type of configuration, choose "Internet Site" and when the installer asks you for the hostname enter the fully qualified domain name (FQDN) that points to your server (i.e. server.example.com).
After all the packages have been installed you can move onto configuring them.
Configuration of Postfix
The first thing you need to do is configure postfix (our email server) to use SASL authentication. Using authentication will ensure that authorized users always have access to the mail server but will ensure that spammers and other malicious parties can't take use it to relay spam. Run the following lines of code to enable SASL authentication:
Your Postfix installation is now configured to use authentication, however, logins will NOT be encrypted. This means that any username or password you send to the server will be sent in cleartext, which is extremely insecure. To encrypt the transmissions of usernames and passwords you will need to enable SSL encryption:
Make sure you replace 'server.example.com' with the FQDN of your server. You may also replace the paths for the tls key, cert and CA file paths with the path to your custom certificates if you have one.
Next, you need to force postfix to use the maildir style of directory so that it will be compatible with the courier mail server.
Configuration of Courier-imap
Next, you need to configure Courier as an IMAP server so that users can retrieve emails stored on the server:
Note that every time you want to allow a new user email permissions you must copy the maildir folder into the user's home directory by issuing the command:
Finally, you should configure courier to use SSL encryption to increase security. Generate a self-signed SSL certificate using OpenSSL. Follow these instructions for more information about generating SSL certificates.
After you have generated your crt and key files you need to edit /etc/courier/imapd-ssl and provide the paths to your custom certificate files.
After following this guide you should hopefully have a functional email server based on the Ubuntu Linux operating system. Additional information about Ubuntu's email services can be found at ubuntu.com.
I believe I understand what your speech and in essence i feel I agree. i would value more highly to hear plenty of concerning what your speech here thought. i'll be back.
ReplyDeleteretrieving deleted emails