Mailserver
From CafeWiki
General - Postfix
Postfix based email server installation on ubuntu is incredibly straightforward, simply ensure that the "LAMP Server" option is selected during the initial installation of the ubuntu OS. Once the server is installed, the process of configuring the mail system is pretty easy. The default mailserver install for ubuntu LAMP is postfix for the MTA and dovecot for POP3 and IMAP. Postfix is fine (and what I’m used to), but most of the books and how-to’s seem to be written for Courier as the IMAP/POP3 server and it just seems to be an easier choice.
- Remove dovecot:
apt-get remove dovecot-common
- Install courier (both the IMAP and POP3 components
apt-get install courier-pop apt-get install courier-imap
- Check that the mail port is being listened to by running
netstat –ant
- Set the postfix configuration to correctly reflect the domain, network and relay settings, ensure that the following lines are included in the /etc/postfix/main.cf configuration file:
myhostname = your_hostname alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = localhost.localdomain, localhost, hostname.com, subdomain.hostname.com relayhost = isp.mail.relay.domain mynetworks = 127.0.0.0/8 192.168.1.0/24 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all home_mailbox = Maildir/ mailbox_command =
- Restart postfix (note that since there were network configuration changes due to the mynetworks= command, that a reload is not sufficient):
postfix restart
- For internal re-direction of mail, set up and test any required aliases (for example to redirect admin to a real user)
- Make the mailserver available to the internet for incoming email by setting the port forwarding on the Router/NAT to forward port 25 traffic to mailserver IP address
- Configuration and aliases
- IMAP (Courier)
Webmail (Squirrelmail)
Spam Management (Spamassassin)
Antivirus (ClamAV)
