1. Postfix (SMTP)
Postfix is the default Mail Transfer Agent (MTA) for Ubuntu. It is in Ubuntu's main repository, which means that it receives security updates.
This explains how to install and configure postfix and set it up as an SMTP server.
In order to install Postfix with SMTP-AUTH and TLS, first install the postfix package from the Main repository using your favorite
package manager. For example:
| # sudo apt-get install postfix |
You need to edit /etc/postfix/main.cf (or sudo dpkg-reconfigure postfix )for your environment.
| # vi /etc/postfix/main.cf
#------- Sample ------------------------ |
If you send an e-mail from the internal mail server
as a defferent domain name like :
| # vi /etc/postfix/transport
#-----<transport>---------------------------------------- |
To create index file (like transport.db) :
| # postmap /etc/postfix/transport |
Start postfix process :
| # /stc/init.d/postfix start |
2.Devecot (pop3, imap)
Dovecot is a Mail Delivery Agent, written en with security primarily in mind. It supports the major mailbox formats:
mbox or Maildir. It is a simple and easy to install MDA. This explains how to set it up as an IMAP or POP3 server.
| # sudo apt-get install dovecot-imapd dovecot-pop3d |
IMAPS and POP3S are more secure than the simple IMAP and POP3 because they use TLS encryption to connect.
Once you have chosen protocol, amend the following line in the file /etc/dovecot/dovecot.conf
|
# vi /etc/dovecot/dovecot.conf protocols = pop3 pop3s imap imaps |
To enable plain text logins when not using a secure protocol, put the following line in /etc/dovecot/dovecot.conf :
| disable_plaintext_auth = no |
To start dovecot process.
| # /etc/init.d/dovecot start |
In order to access your mail server from another computer, you'll have to configure your firewall or
router to allow connections to the server on the necessary ports :
| * IMAP - 143 * IMAPS - 993 * POP3 - 110 * POP3S - 995 |
You'll also need to uncomment following line in /etc/dovecot/dovecot.conf :
| listen = * |