Sorting locally delivered email using Procmail
Hi,
I tried under a different subject heading that may have been misleading.
So here goes another try:
I am trying to use procmail for local delivery. My setup consists of
exim and cyrus from sid.
Calling the localuser director before procmail I am easily able to
deliver local email to myself. However, if I call the procmail
director before localuser, the delivery fails.
Shown below are the relevant entries from exim.conf, .procmailrc and
.maillog files. Could somebody point out the mistake I am making, or
share how they are using exim+procmail to make local delivery of mail.
Thanks.
-Andy
-----------------------exim.conf (begin)-------------------------------
#TRANSPORTS
local_delivery:
driver = pipe
command = /usr/sbin/cyrdeliver ${local_part}
return_path_add = true
return_output
prefix = ""
user = cyrus
procmail_pipe:
driver = pipe
command = "/usr/bin/procmail"
return_path_add
delivery_date_add
envelope_to_add
# check_string = "From "
# escape_string = ">From "
suffix = ""
#DIRECTORS
localuser:
driver = localuser
transport = local_delivery
procmail:
driver = localuser
transport = procmail_pipe
require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
no_verify
--------------------------exim.conf (end)------------------------------
-----------------------~/.procmailrc (end)------------------------------
SHELL="/bin/sh"
DELIVERMAIL="/usr/sbin/cyrdeliver"
LOGFILE="$HOME/.maillog"
IMAP="$DELIVERMAIL -a andy -q -m andy"
LOGABSTRACT="all"
VERBOSE="on"
:0 c:
| $IMAP.backup
:0 fw
| spamc
:0 h
* ^X-Spam-level: \*\*\*\*\*\*\*\*\*\*
/dev/null
:0
* ^From.*Cron | ^Subject.*Cron
| $IMAP.cron
:0
| $IMAP
:0 w
{EXITCODE=$?
HOST
}
------------------------~/.procmailrc (end)----------------------------
------------------------~/.maillog (begin)----------------------------
procmail: [12792] Mon Sep 30 21:45:19 2002
procmail: Couldn't determine implicit lockfile from "/usr/sbin/cyrdeliver"
procmail: Locking ".lock"
procmail: Executing "/usr/sbin/cyrdeliver,-a,andy,-q,-m,user.andy.backup"
procmail: Non-zero exitcode (65) from "/usr/sbin/cyrdeliver"
procmail: Assigning "LASTFOLDER=/usr/sbin/cyrdeliver -a andy -q -m user.andy.backup"
procmail: Unlocking ".lock"
procmail: Match on "^From:.*andyml"
procmail: Couldn't determine implicit lockfile from "/usr/sbin/cyrdeliver"
procmail: Locking ".lock"
procmail: Executing "/usr/sbin/cyrdeliver,andy"
procmail: Non-zero exitcode (65) from "/usr/sbin/cyrdeliver"
procmail: Assigning "LASTFOLDER=/usr/sbin/cyrdeliver andy"
procmail: Unlocking ".lock"
procmail: Executing "spamc"
procmail: No match on "^X-Spam-level: \*\*\*\*\*\*\*\*\*\*"
procmail: No match on "^From.*Cron | ^Subject.*Cron"
procmail: Assigning "LASTFOLDER=/usr/sbin/cyrdeliver -a andy -q -m user.andy"
procmail: Notified comsat: "andy@:/usr/sbin/cyrdeliver -a andy -q -m user.andy"
>From andyml@nyc.rr.com Mon Sep 30 21:45:19 2002
Subject: hello again. This is a test.
Folder: /usr/sbin/cyrdeliver -a andy -q -m user.andy 562
------------------------~/.maillog (end)----------------------------
Reply to: