source: npl/mailserver/dspam/dspam-3.10.2/doc/qmail.txt

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 2.3 KB
Line 
1$Id: qmail.txt,v 1.1 2005/03/11 21:16:03 jonz Exp $
2
3QMAIL and VPOPMAIL INTEGRATION
4
5qmail is designed with a modular system architecture, so there are a couple
6of places to add dspam to such a system.  VPopmail extends the base qmail
7delivery process to handle virtual domains and users, which can reside in
8several different user databases.  Whether you want to add dspam at the
9virtual domain level or user level largely determines the best way to add
10it to your system.
11
12USER-LEVEL INTEGRATION
13
14If you are only configuring dspam for a small percentage of your users,
15this is the best method. Configure dspam to use a standalone local delivery
16agent like safecat (if you already use procmail or maildrop as an LDA, you
17should call dspam from those tools directly).
18
19First, create a small script called maildir_mod in /usr/local/bin...
20
21  #!/bin/sh
22  VPOPDOMAINS="/home/vpopmail/domains"
23  if [[ "$2" = "-d" ]]; then
24      user=`eval echo $3 | cut -f 1 -d "@"`
25      domain=`eval echo $3 | cut -f 2 -d "@"`
26      cd $VPOPDOMAINS/"$domain"/"$user"
27  fi
28  /usr/local/bin/safecat "$1"/tmp "$1"/new 1>/dev/null
29
30  NOTE: Be sure to configure VPOPDOMAINS to point to the path for your virtual
31        domain directories
32
33Now configure DSPAM:
34
35./configure \
36  --with-dspam-owner=vpopmail \
37  --with-dspam-group=vchkpw \
38  --with-delivery-agent="/usr/local/bin/maildir_mod Maildir -d %u" \
39  # Your arguments
40
41Next, create a .qmail file in the directory for the user with a line to
42call dspam, like this:
43
44 | /usr/local/bin/dspam --deliver=innocent --user $EXT@$USER
45
46The two environment variables $EXT and $USER are created by the qmail-local
47program which begins the local delivery process.
48
49DOMAIN-LEVEL INTEGRATION
50
51If you're adding dspam for all users in a domain, you can add dspam
52directly inline with the vpopmail LDA: vdelivermail.  In this mode, you don't
53need to configure dspam to use a custom LDA, nor do you need to add a .qmail
54file for all users. Instead, you replace the existing line to the
55.qmail-default file at the virtual domain level, like this:
56
57 | /usr/local/bin/dspam  --deliver=innocent --user $EXT@$USER  --stdout | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
58
59In essence, you just add the call to dspam (with the appropiate options
60including --stdout) to the front of the existing line which vadddomain
61creates when you add a domain.
Note: See TracBrowser for help on using the repository browser.