Greylisting is well known antispam technique. It’s idea is basing on fact, that spamming hosts (zombies) do not have time for re-transmission and are trying to send maximum amount of spam in shortest time period. This is achieved by connections to different mail servers and submission of message even without wait for server’s response. In opposition to that, legitimate mail servers presents themselves and waits for server’s response, and then beginning mail submission. If they receive temporary error code (4xx) from server, they will try to submit mail again after defined time period (e.g. 5 minutes)
Mail system
Mail system implementation
My experience, which I gained during implementation of different systems shows, that implementation should be done in stages. Then, at each stage you can see if it works, if there are some fields to improve and then go to the next stage of implementation. Mail system implementation is not exception. We can divide this into following stages:
Stage I
Basic configuration of sending and receiving mail for system users
Building mail system
This description is based on my experience, which I gained during mail system implementation on University of Silesia (Katowice/Poland). In the first stage there was about 3 000 of users, now the system is handling about 40 k of mail users. Whole system (exluding Sophos AV) is based on Open Source software. Their main components are:
Postfix – compilation
Postfix does not have a configure script, so you need to add proper paths and libraries when you creating Makefiles (make makefiles). I must admit, that Postfix code is one of the least problematic code to compile on differents systems. To make my compilations reproducible, I wrote a script and set proper options for compilation.
Pigeonhole – compilation and installation
Pigeonhole – Sieve support for Dovecot
Pigeonhole is the name of the project that adds support for the Sieve language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the Dovecot Secure IMAP Server. In the literal sense, a pigeonhole is a a hole or recess inside a dovecot for pigeons to nest in. It is, however, also the name for one of a series of small, open compartments in a cabinet used for filing or sorting mail. As a verb, it describes the act of putting an item into one of those pigeonholes. The name `Pigeonhole’ therefore well describes an important part of the functionality that this project adds to Dovecot: sorting and filing e-mail messages.
How to remove mail from Postfix queue
Sometimes you need to remove some mail from queue or do other things in shell. For experienced administrators this is not a problem, but I decided to write some usable shell commands and scripts for less experienced users.
Here are few commands to remove mail from Postfix queue. Don’t ask me why – just for example. This time i will describe it step by step. This is mail queue:
# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
571AAC45 48204 Tue Dec 21 07:52:39 MAILER-DAEMON
(connect to example.com[221.X.X.70]:25: Connection refused)
datadm@example.com
...
Postfix
Postfix is Wietse Venema’s mail server that started life at IBM research as an alternative to the widely-used Sendmail program. Postfix attempts to be fast, easy to administer, and secure. The outside has a definite Sendmail-ish flavor, but the inside is completely different. Built from source code, Postfix can run on UNIX-like systems including AIX, … Read more
Dovecot – compilation and installation
On Linux systems you can install Dovecot from packages. Appropriate packages supports also LDAP authentication, MySQL and so on. Unfortunatelly you probably would not find a newest versions, when you install in this manner. Eg. for today in Ubuntu packages you will find version 2.0.19-0ubuntu1, while on Dovecot page version 2.1.7 is available. For this reason it is worth to compile and install software by yourself, even it is available in package.
ClamAV
Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. The core of the package is an anti-virus engine available in a form of shared library.