0

i am downloading mail using fetchmail and delivering it to local unix account, the users .procmailrc file stores the mail in Maildir format and also delivers it to cyrus imap

PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
LOGFILE=$MAILDIR/procmail.log

# Grab out the Return-Path
:0
* ^Return-Path:\/.*
{
  RETURNPATH = "$MATCH"
}

DELIVER="/usr/lib/cyrus-imapd/deliver"
USERINBOX="$DELIVER -a $USER -m $USER.$USER -r $RETURNPATH"


:0w
| $USERINBOX

on procmail.log i get this error

From root  Fri Sep 30 12:09:28 2011
 Subject: Welcome to pop mail!
  Folder: /home/user/Maildir/new/1317380968.8880_0.localhost            4634
/usr/lib/cyrus-imapd/deliver: option requires an argument -- 'r'
421-4.3.0 usage: deliver [-C <alt_config> ] [-m mailbox] [-a auth] [-r return_path] [-l] [-D]
421 4.3.0 v2.3.16-Fedora-RPM-2.3.16-6.el6
procmail: Program failure (75) of "/usr/lib/cyrus-imapd/deliver"
From root  Fri Sep 30 12:30:34 2011
 Subject: RE: test email
  Folder: /home/user/Maildir/new/1317382234.8910_0.localhost           15507

any ideas?

some more work

i have updated .procmailrc for "myuser" and this time it hangs while delivering to cyrus

PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
LOGFILE=$MAILDIR/procmail.log
VERBOSE=yes
USER=`echo myuser | /usr/bin/tr A-Z a-z` # force lowercase username

# Grab out the Return-Path
:0
* ^Return-Path:\/.*
{
  RETURNPATH = "[email protected]"
}

DELIVER="/usr/lib/cyrus-imapd/deliver"
USERINBOX="$DELIVER -e -a $USER -m $USER.$USER"


:0w
| $USERINBOX

output from procmail.log...

procmail: Assigning "USER=myuser"
procmail: No match on "^Return-Path:\/.*"
procmail: Assigning "DELIVER=/usr/lib/cyrus-imapd/deliver"
procmail: Assigning "USERINBOX=/usr/lib/cyrus-imapd/deliver -e -a myuser-m myuser.myuser"
procmail: Executing "/usr/lib/cyrus-imapd/deliver,-e,-a,myuser,-m,myuser.myuser"

and ps -ef shows this process running..

topdesk   9043  7367  0 13:25 ?        00:00:00 /usr/bin/procmail -d myuser
root      9050  9043  0 13:25 ?        00:00:00 /usr/lib/cyrus-imapd/deliver -e -a myuser -m myuser.myuser
1

1 Answer 1

1

Before your edit my comment was right. There was no Return-Path present. Your logfile confirms this. Nut instead of following my advice you changed the script in a different way.

After your edit you entered a new command line parameter -e which is not available to deliver. See the man page. So deleting the parameter will probably make it work.

If the program still hangs then you have to provide the mail log and see if you can identify the cause for the hang.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .