PerlStalker’s SysAdmin Notes

Notes from the life of a systems administrator

Installing Courier

Originally posted at [2006-02-23 Thu 08:51]

1 FreeBSD

Install the following from ports:

1.1 mail/courier

Note: Make sure you upgrade Perl before you build courier. This is so that perlfilter can find perl modules installed later, e.g. Courier::Filter.

Add to /etc/make.conf

# For Courier

Also, you need to make sure that courier is using Perl > 5.6 and not the system perl. During the build, courier uses /usr/bin/perl5. This is the system perl. Here’s the work around.

mv /usr/bin/perl5 /usr/bin/perl5-system
ln -s /usr/local/bin/perl5 /usr/bin/perl5

It probably isn’t kosher to leave /usr/bin/perl5 pointing to the ports perl but I haven’t had problems with it. If you’re paranoid, you can do this:

rm /usr/bin/perl5
mv /usr/bin/perl5-system /usr/bin/perl5

After the install, you will be asked if you want to change /etc/mail/ mailers.conf. Say yes.

1.2 databases/mysql40-server

We’re going to use MySQL to store the user information.

1.3 databases/p5-DBD-mysql

Needed so SpamAssassin can talk to MySQL.

1.4 /etc/rc.conf

Disable all sendmail lines. (Courier will handle all of that.)


2 Gentoo

USE="mysql ssl" emerge courier-authlib courier
rc-update add courier default