Mailserver configurations (Postfix, Cyrus, Courier, etc.)

Mail Server with SSL/TLS built on Dovecot and Postfix using MySQL backend

Install needed packages: apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-lmtpd dovecot-mysql dovecot-sieve dovecot-managesieved mysql-server-5.6 postfix postfix-mysql During the Postfix install, choose "Internet Smarthost" and leave the values at their defaults, we will replace the configuration later.   Create database: Connect to the mysql console using root and execute these: CREATE DATABASE mailserver; USE mailserver; CREATE TABLE […]

Postfix: Rewrite sender on outgoing mails

With Postfix you can rewrite the sender, respectively the from-headers for outgoing mails. Prerequesite is an existing Postfix installation. Create the /etc/postfix/sender_canonical, with the following example content (you may use spaces or tabs to separate the columns): root www-data Next create the sender_canonical.db file: postmap hash:/etc/postfix/sender_canonical […]

Postfix spam prevention with simple means

I've published already quite a few tutorials on greylisting, rbls and so on. Here's another tutorial showing how you can reduce your spam with rather simple means.   First of all we need to edit the file /etc/postfix/ and add those lines: smtpd_helo_required     = yes strict_rfc821_envelopes = yes disable_vrfy_command = yes unknown_address_reject_code  = […]

Integrating Postgrey into Postfix (Greylisting Filter)

In this article I'm going to show the simple integration of Postgrey into a postfix installation: Basically the installation of postgrey is done with: apt-get install postgrey   Then you should (but it's not needed) customize a little bit its configuration file /etc/default/postgrey, which contains: POSTGREY_OPTS="–inet=" #Postgrey uses the port 60000 locally POSTGREY_TEXT="Greylisted" #This parameter is optional […]

Spamdyke as Antispam Solution in Plesk with Qmail

First of all you need to make sure that you have the necessary packages to compile spamdyke: apt-get install gcc make libc-dev   Then download the latest version:   At the moment that I'm writing this howto, the latest version is 4.0.10: wget tar -xvzf spamdyke-4.0.10.tgz cd spamdyke-4.0.10/spamdyke   After unpacking it, you […]

Clamassassin as Antivirus Solution with Maildrop, Courier and Postfix

The integration of clamassassin into an existing Courier/Postfix installation is quite simple. First of all you need to install the needed packages: apt-get install clamassassin clamav clamav-freshclam clamav-daemon clamav-base   Supposing that you use maildrop, you just have to edit the file /etc/courier/maildroprc as follows: exception {  xfilter "/usr/bin/clamassassin"  if (/^X-Virus-Status: Yes/)  {   to /dev/null  } […]

Configure SMTP Auth in a Postfix/MySQL Configuration

To make E-mail delivery work with SMTP auth using SASL, you have to create the folder /etc/postfix/sasl (if it does not exist yet) and add the two files smtpd.conf and smtp.conf, having the same content each: pwcheck_method: auxprop auxprop_plugin: sql mech_list: plain login sql_engine: mysql sql_hostnames: localhost sql_user: postfix sql_passwd: post sql_database: postfix sql_verbose: yes […]

Integrate Spamassassin into Courier-Postfix Installations using Maildrop

This tutorial works great in combination with the Courier-Postfix howtos on this website. That's how it works: I'm using maildrop to filter incoming mails coming in from Postfix and then deliver them to Courier.   First of all we need to change the file /etc/postfix/ (any existing maildrop line must be removed): maildrop  unix  –       n       […]