Postfix

Virtual Users And Domains With Postfix, Courier And MySQL

The following are a serie on "Virtual Users And Domains With Postfix, Courier And MySQL (CentOS 5.1)" in howtoforge:

Postfix with TinyCDB on Gentoo

If you want to enable cdb support for Postfix on Gentoo, "USE=cdb emerge -v postfix" will always pull in cdb, instead of tinycdb.

Another thing to note is that tinycdb conflicts with cdb.

In order to use tinycdb in place of cdb, you can first emerge tinycdb. This will unmerge cdb for you. So, if you had cdb installed, you must find out whether you have the green light for tinycdb. Run "equery d dev-db/cdb" to check for dependencies.

Tuning Postfix and Its Accessories

authdaemond

You can change the number of authdaemond processes in the file /etc/courier/authlib/authdaemonrc:

daemons=2

This line sets the number of authdaemond processes to 2.

saslauthd

To change the number of saslauthd processes, edit the file /etc/conf.d/saslauthd (in Gentoo):

SpamAssassin and ClamAV for Postfix on Gentoo

Install Spamassassin, ClamAV, and Amavisd-new

You can just run emerge on these packages. Note that as of today, the mail-filter/spamassassin in Portage is still version 3.2.1, which is a bit old. If you want the latest, you can find the latest dev version from Gentoo mail-filter category packages page. To install the masked mail-filter/spamassassin-3.2.5, put the following line in /etc/portage/package.keywords:

Implement DomainKeys Identified Mail (DKIM) on Postfix Gentoo

Sendmail libmilter

This is the prerequisite for the DKIM package. Install Sendmail libmilter with poll option:

Add the line below into /etc/portage/package.use

mail-filter/libmilter poll

Now emerge the package

# emerge -v mail-filter/libmilter

Implement SPF on Postfix

Install SPF policy server

Check openspf.org for the latest development. For Postfix, http://www.openspf.org/Software currently lists two packages: python-postfix-policyd-spf and  postfix-policyd-spf-perl. It says that python-postfix-policyd-spf is more feature.

Install python-postfix-policyd-spf:

Download the package, extract the tar ball, and follow the README in the source tree.

Multiple Mail-hosting Systems on Gentoo with Postfix and Courier

USE flags:

In /etc/make.conf, add the following to USE

imap libwww maildir sasl ssl

In /etc/portage/package.use, add the following lines:

Install Postfix with Dovecot on Gentoo

Check package status

First of all, check the package status: