procmail > cyrus problem

Paul Wolstenholme wolstena at sfu.ca
Mon Feb 7 00:35:51 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have found myself in a situation where I need to run procmail instead 
of sieve for mail filtering. I am using:

postfix-2.1.5
cyrus-imapd-2.2.10
cyrus-sasl-saslauthd-2.1.20_1
procmail-3.22_4

The problem I'm having is using deliver from procmail. Mail for 
paul at domain.tld needs to be stored in /home/cyrus/p/paul_domain_tld 
(the uid stored in LDAP).  Anyone know who to do this. My existing rul 
delivers to /home/cyrus/p/paul. Is there a way to pass the UID to the 
script?

postfix main.cf:
mailbox_command = /usr/local/bin/procmail -t -a "$EXTENSION"
mailbox_transport = procmail

master.cf
procmail  unix  -       n       n       -       -       pipe
   flags=R user=cyrus argv=/usr/local/bin/procmail -t -m USER=${user} 
EXTENSION=${extension} /usr/local/etc/procmailrc

procmailrc
PATH=/usr/local/cyrus/bin:$PATH
SHELL=/usr/local/bin/bash
DELIVERMAIL=/usr/local/cyrus/bin/deliver
VERBOSE=yes

:0 w
* EXTENSION ?? .
| $DELIVERMAIL  -a "$USER" -e -m "$EXTENSION" -- "$USER"

# Only if there was no extension do we try this
:0 wE
| $DELIVERMAIL  -a "$USER" -e -- "$USER"

:0 e
{
     EXITCODE = $?       # Whichever one we tried, failed
     HOST
}


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCBv434vygjarL2QkRAlRLAJ97lIsSMMFJtcTGpJzmxgzdK+qiawCglsEp
8w8xPdy/3T8sH7tIB9kwlG0=
=YVbb
-----END PGP SIGNATURE-----

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list