[Esd-l] Procmail not working when invoking from other Dir than $USER

David Schulz david at tca-cable-connector.com
Sun Jun 20 20:01:04 PDT 2004


Hello all,

I have a OSX Panther Server set up, and I would like to Filter my Mail with
Procmail. I don't want to have any .procmailrc files in the Users Home
Directory, because other than a few Test Accounts they don't have Home
directories setup. I like to have only global Recipes sitting somewhere else
on the System which do their Job for everybody.

Now the only recipe I like to get to work for now is this
------
:0
* ^Subject:.*test
! me at mydomain.com
------

###############
If my /etc/procmailrc looks like this, everything works fine

# Master Procmail Recipe for Postfix > Procmail > Cyrus
# 
### 
PATH=/bin:/usr/bin:/usr/bin:/etc
DELIVERTO="/usr/bin/cyrus/bin/deliver"
USERINBOX="$DELIVERTO -e -a $USER -m user/$USER"
SHELL=/bin/sh 

VERBOSE=on 
LOGFILE="/procmail.log"

INCLUDERC=/Users/$USER/.procmailrc
#INCLUDERC=/etc/.procmailrc

:0 w 
| $USERINBOX 

--------
Corresponding Log file Output


 procmail: Assigning "INCLUDERC=/Users/admin/.procmailrc"
 procmail: Match on "^Subject:.*test"
 procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi
 me at mydomain.com" 
 procmail: Notified comsat: "cyrus@:/usr/sbin/sendmail -oi me at mydomain.com"
 Subject: Test 
 Folder: /usr/sbin/sendmail -oi me at mydomain.com 558
 procmail: Executing "/usr/sbin/sendmail,-oi,me at mydomain.com"
 procmail: Assigning "INCLUDERC=/Users/me/.procmailrc"
 procmail: Couldn't read "/Users/me/.procmailrc"
 procmail: Executing "/usr/bin/cyrus/bin/deliver,-e,-a,me,-m,user/me"
 procmail: Assigning "LASTFOLDER=/usr/bin/cyrus/bin/deliver -e -a me -m
user/me" 
 procmail: Notified comsat: "cyrus@:/usr/bin/cyrus/bin/deliver -e -a me -m
user/me" 
 Subject: Test 
 Folder: /usr/bin/cyrus/bin/deliver -e -a me -m user/me 665

###############


When i have my Procmailrc setup like this, it wont work. Why?


# Master Procmail Recipe for Postfix > Procmail > Cyrus
# 
### 
PATH=/bin:/usr/bin:/usr/bin:/etc
DELIVERTO="/usr/bin/cyrus/bin/deliver"
USERINBOX="$DELIVERTO -e -a $USER -m user/$USER"
SHELL=/bin/sh 

VERBOSE=on 
LOGFILE="/procmail.log"

#INCLUDERC=/Users/$USER/.procmailrc
INCLUDERC=/etc/.procmailrc

:0 w 
| $USERINBOX 
--------
Log File

 procmail: Assigning "INCLUDERC=/rc/.procmailrc"
 procmail: Match on "^Subject:.*test"
 procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi me at mydomain.com"
 procmail: Notified comsat: "cyrus@:/usr/sbin/sendmail -oi me at mydomain.com"
 Subject: Test 
 Folder: /usr/sbin/sendmail -oi me at mydomain.com 558
 procmail: Executing "/usr/sbin/sendmail,-oi,me at mydomain.com"
 procmail: Assigning "INCLUDERC=/rc/.procmailrc"
 procmail: Match on "^Subject:.*test"
 procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi me at mydomain.com"
 procmail: Notified comsat: "cyrus@:/usr/sbin/sendmail -oi me at mydomain.com"
 Subject: Test 
 Folder: /usr/sbin/sendmail -oi me at mydomain.com 665
 procmail: Executing "/usr/sbin/sendmail,-oi,me at mydomain.com"
###############

For some reason when I call the recipe sitting in a Users Home folder, the
end of the log says Executing Cyrus, while when I call a recipe sitting
somewhere else, the end of the log file says executing sendmail.

Sorry for this lengthy Mail, but I hope to be clear.
I also have a Thread running here:
http://www.afp548.com/eBBS/viewtopic.php?p=4047#4047
Please help if you can,
Thanks and regards,
David


More information about the esd-l mailing list