Views
ProcmailAndQmailAndVpopmail
This is the best way I found to set up procmail with qmail for all users in a domain.
For just one user
Assumming you want to set up procmail for an user berengeno at the domain domain.com . Create a file called .qmail-berngeno at /home/vpopmail/domains/domain.com/ Insert: | preline /usr/bin/procmail -t /home/vpopmail/domains/domain.com/berengeno/Maildir/procmailrc or the path to the berengeno's procmailrc file.
For all users under a domain
Setting maildrop script
First you need to install maildrop program.
Create the script file mailfilter
with the following in it:
import EXT import HOST import HOMEEnd of scriptVHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST` VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
logfile "/tmp/maildrop.txt"
`test -d $VHOME/Maildir` if ($RETURNCODE == 1) { to $VPOP }
`test -e $VHOME/Maildir/procmailrc` if ($RETURNCODE == 1) { to "$VHOME/Maildir/" } to "| /usr/bin/procmail -t $VHOME/Maildir/procmailrc"
Setting qmail
Assumming we want to set up procmails for the users at the domain domain.com Edit the file /home/vpopmail/domain.com/.qmail-default Insert: | preline /usr/bin/maildrop /path/to/mailfilter
Plase change the paths to the paths of your configuration.
-- Main Jose R. Ortiz Ubari - Aug 11 2003