Installing Dovecot IMAP and POP3 daemon with MySql backend on squeeze

Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver.

It’s assumed that you have already installed and configured Postfix according to this tutorial:
Installing Postfix with MySql backend and SASL for SMTP authentication

1. Install required packages

apt-get install dovecot-imapd dovecot-pop3d
Continue reading

How to install Roundcube on squeeze

Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking.

Installation is easy in Debian but the application is pretty outdated in the squeeze apt repository so you may want to install the latest version manually instead. You can download the source from Sourceforge.

1. Install roundcube

apt-get install roundcube roundcube-mysql
Continue reading

Installing sSMTP MTA (Mail Transfer Agent)

sSMTP is an extremely simple MTA to get mail off the system to a mail hub. It contains no suid-binaries or other dangerous things – no mail spool to poke around in, and no daemons running in the background. Mail is simply forwarded to the configured mailhost. Extremely easy configuration.

This is ideal for web servers to avoid running MTA daemons like sendmail, Exim and Postfix which use up resources on the server.

1. Install sSMTP (Note: Any previously installed MTA will be removed)

apt-get install ssmtp
Continue reading

Install and configure MailWatch monitoring tool for MailScanner

MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics.

1. Install Apache2, MySql server and PHP5 with required modules. You may already have some or all of these packages installed.

apt-get install apache2 php5-cli php5 mysql-server libdbd-mysql-perl php5-gd php5-mysql libapache2-mod-php5
Continue reading

Configuring goldfish autoresponder for Postfix

goldfish is a quite simple autoresponder for Postfix in conjunction with MySQL, written in PHP. It consists of only one PHP file which can be started through a cronjob.

In this tutorial, it’s assumed that you have already installed Postfix with MySql backend using this tutorial: Installing Postfix with MySql backend and SASL for SMTP authentication

1. Install PHP5-CLI (Command Line Interpreter) if it’s not already installed

apt-get install php5-cli
Continue reading

Setup DomainKeys Identified Mail (DKIM) in Postfix

DomainKeys Identified Mail (DKIM) is a method for email authentication that allows an organization to take responsibility for a message it has sent in a way that can be validated by a recipient. The technique is based on public-key cryptography: Responsibility is claimed by the signer by adding a digital signature to a message’s header, the DKIM-Signature header field. The verifier recovers the signer’s public key using the DNS, and then verifies that the signed parts have not been altered.

1. Install DKIM filter

apt-get install dkim-filter
Continue reading

Implementing SPF checks in Postfix

Sender Policy Framework (SPF), as defined in RFC 4408, is an e-mail validation system designed to prevent e-mail spam by addressing a common vulnerability, source address spoofing. SPF allows administrators to specify which hosts are allowed to send e-mail from a given domain by creating a specific DNS SPF record in the public DNS. Mail exchangers then use the DNS to check that mail from a given domain is being sent by a host sanctioned by that domain’s administrators. Continue reading

Transfer mailboxes between IMAP servers with imapsync

imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved, and the process can be stopped and resumed. The original messages can optionally be deleted after a successful transfer.

1. Install imapsync

apt-get install imapsync
Continue reading