This article will show you how to setup an email server accessible using a POP3, IMAP or web browser client. It will also show you how to include virus scanning and spam tagging in the mail server. If you have an existing Active Directory or LDAP infrastructure, the last section will show you how to integrate it into your email server so you won’t have to maintain two sets of user accounts.

How to install Linux

You can use either Red Hat Enterprise Linux 5 or CentOS 5. RHEL 5 can be purchased from Red Hat and comes with support. CentOS 5 on the other hand can be downloaded here.

NoteTo simplify our administration tasks, log in as the user root and specify your root password. This is not the recommended way of administering a Linux box, but for the tasks at hand it is the most efficient way.

How to install SMTP, POP3, IMAP and Webmail service

Postfix will be providing the SMTP service, Dovecot will provide the POP3 and IMAP service, while Apache and SquirrelMail will provide the Webmail service.

ImportantBefore deploying your new mail server, see Mail Server Checklist to ensure your new mail server will have a good sending reputation and can be trusted.

How to create mailboxes and do miscellaneous tasks

This section will show you to do tasks like creating mailboxes, aliases, setting quota etc.

WebminInstall Webmin if you want a web-based interface to manage your mail accounts.

How to add antivirus and antispam filtering

We will be using Clam AntiVirus for virus scanning, SpamAssassin for the spam tagging and MailScanner to integrate them into Postfix.

NoteYou can greatly reduce the volume of spam and viruses reaching your mail server if you are willing to give up something. If you are willing to have your mail delayed (time), install Postgrey. If you are willing to spend (money), get the Barracuda Spam Firewall.

How to integrate Active Directory/LDAP

Integrating Active Directory/LDAP into your mail server will turn your Linux email server into a lean and mean Exchange like machine. And you won’t have to deal with Linux system accounts or edit configuration files for common tasks like creating mailboxes and mailing lists. And finally, you can provide your users with standard address book.

getent passwdUsing Winbind to integrate Active Directory user accounts.
Another way to integrate Active Directory into your mail server. I highly recommend using the virtual user solution above instead of this one.

How to integrate MySQL or support multiple domains

To simplify administering multiple domains, the domains and mail accounts will be stored in MySQL and will be managed using Postfix Admin, a web based interface for handling domains, mailboxes and aliases.

SquirrelMail Auto ResponseInstall the SquirrelMail Postfix Admin Plugin if you want to enable the users to set their own vacation message, forwarding and password.

SquirrelMail can use a database backend like MySQL to store address books and preferences. This article describes how to configure SquirrelMail to use a MySQL address book.

(more…)
 

This article describes how to use a text file or static db file as the source for user accounts in Postfix and Dovecot. This is suitable for very simple mail account requirements. For larger implementations, check out the MySQL virtual accounts or Active Directory/LDAP virtual accounts.

(more…)
 

These are the collection of SquirrelMail howtos available on this site.

(more…)
 

This article describes how to configure Postfix to restrict mails from a sender, to a recipient, or both.

(more…)
 

This article describes how to use MailScanner to add a disclaimer message to outgoing mails in Postfix. Make sure MailScanner is integrated into Postfix and tested to be working.

(more…)
 

Backing up your mailboxes is a simple as copying your mailbox folder. This article describes how to backup and restore your Postfix mailboxes using the tar command.

(more…)
 

To improve security or offload services like virus and spam checking, you may want to implement an SMTP gateway. This article describes how to configure Postfix as an SMTP gateway.

(more…)
 

Postfix can be configured to prevent email senders from using an email address that does not belong to them. This article describes how to configure the sender restriction in Postfix to prevent senders from spoofing email addresses.

(more…)
 

This article describes how to configure Postfix and Dovecot to use SSL/TLS to encrypt communication. Before you begin, generate an SSL certificate.

(more…)
 

To use SSL or TLS to encrypt SMTP, POP3, IMAP or HTTP connections requires an SSL certificate. This article describes how to generate your own self signed SSL certificate. A self signed certificate will not cost you any money, but the certificate will not be automatically accepted as trusted by the email client or web browser.

(more…)
 

Next Page »