Skip to content.

UPR HPCf

Sections
Personal tools
You are here: Home » Members » humberto's Home » Test ZWiki » ProcmailAndQmailAndVpopmail
Views

ProcmailAndQmailAndVpopmail

last edited 6 years ago by cheo

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 HOME

VHOME=`/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"

End of script
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

 

Powered by Plone

This site conforms to the following standards: