Sunteți pe pagina 1din 5

Installing Qmail, Courier, Ezmlm, ...

on Debian
Jeffrey Clement July 2003

Introduction

This document quickly describes how to setup Debian 3.0 (Sid) to run Qmail, Vmailmgr, EZMLM, and Courier all from packages. As always this information is provided at YOUR OWN RISK. Chances are reasonable that it will work but it might not so be warned.

Required Packages
daemontools-installer ucspi-tcp-src qmail-src vmailmgr courier-imap courier-imap-ssl courier-authvmailmgr courier-authdaemon courier-ssl ezmlm-src 1

INSTALL PACKAGES AND BUILD SOURCE

spamassassin

Install Packages and Build Source

The order is importortant. Some of the commands require input from you. Defaults are probably ne. When you run the build-xxx scripts make sure to say yes to installing the package generated. $apt-get install daemontools-installer $apt-get install ucspi-tcp-src $build-daemontools $build-ucspi-tcp $apt-get install qmail-src $build-qmail $apt-get install vmailmgr $apt-get install courier-imap $apt-get install courier-imap-ssl $apt-get install courier-authvmailmgr $apt-get install ezmlm-src $build-ezmlm So far so good?

Congure Qmail for POP3

Edit the */etc/init.d/qmail* script do the following: 1. comment the alias_empty="/usr/bin/..procmail.." line and uncomment the alias_empty="./Maildir/" line. 2. uncomment the POP3 stuff in the start) section. 3. switch the pop3 startup parameter /usr/bin/checkpassword to */usr/bin/checkvpw*! If you dont do this, authentication will fail to POP3. In the /etc/init.d/qmail-pop3 you may need to nuke the ulimit stuff!

CONFIGURE COURIER FOR VMAILMGR AUTHENTICATION

Congure Courier for Vmailmgr authentication

Edit */etc/courier/imapd* and change the line that says AUTHMODULES=... to AUTHMODULES=authvmailmgr. This will setup courier-imap to only allow authentication against virtual accounts and not system accounts which ir probably a good idea.

Congure qmail to accept mail for your domains

I dont want to go into this in detail. Basically you want to create control les that kind of resemble what Ive got here. ie) red:/var/qmail/control# ls defaultdomain locals me plusdomain red:/var/qmail/control# cat red.bluesine.com red:/var/qmail/control# cat red.bluesine.com red:/var/qmail/control# cat red.bluesine.com red:/var/qmail/control# cat red.bluesine.com red:/var/qmail/control# cat localhost red.bluesine.com bluesine.com jclement.ca red:/var/qmail/control# cat red.bluesine.com:bluesine bluesine.com:bluesine jclement.ca:jclement

rcpthosts

users

virtualdomains

defaultdomain locals me plusdomain rcpthosts

virtualdomains

Each line in *virtualdomains* maps a domain to a system account that collects mail for that domain. Make sure that the account exists and that you set it up for vmailmgr. ie) adduser jclement ..... asks for account info, pw, etc su - jclement vsetup vadduser jsc ..... asks for accounts password, etc vaddalias jclement jsc

START IT ALL UP

And so on for each virtual domain!

Start it all up

/etc/init.d/qmail stop /etc/init.d/courier-imap stop /etc/init.d/courier-imap-ssl stop /etc/init.d/qmail start /etc/init.d/courier-imap start /etc/init.d/courier-imap-ssl start

Setting up spam assassin

This will lter ALL mail send through your server. Its going to kill your performance but I hate spam so... mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig Create a new /var/qmail/bin/qmail-queue script that looks like this: \#!/bin/sh spamc -f | /var/qmail/bin/qmail-queue.orig Then make sure spamd is running: spamd -d And nally chmod +x /var/qmail/bin/qmail-queue Oh and here is my /etc/spamassassin/local.cf le: rewrite_subject 1 #report_safe 1 use_razor1 0 use_razor2 0 required_hits 4 blacklist_from joe@msn.com whitelist_from secure@bluesine.com whitelist_from JokeGenie@MyFree.com

THATS IT

And nally... Since Qmail-queues memory footprint is way larger now well have to ddle with the ulimit stuff in /etc/init.d/qmail. Look for the line like "ulimit -v 8192" and change to something bigger like "ulimit -v 28192" For individual users one can just use some fancy procmail scripts to lter out spam to a separate folder otherwise the subject is altered and they can have their mail client handle it.

Thats It

Let me know if you have any problems. This was mostly just to summarize what I did to install it on my machine so I dont forget. But you may nd it useful too. Please let me know if it works for you or if you have any suggestions.

S-ar putea să vă placă și