2 messages in net.sourceforge.lists.courier-maildrop[maildropl] Can't forward to program ...
FromSent OnAttachments
Flemming BjerkeJan 28, 2007 5:22 am 
Sam VarshavchikJan 28, 2007 6:32 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Can't forward to program - why?Actions...
From:Flemming Bjerke (fl@bjerke.dk)
Date:Jan 28, 2007 5:22:14 am
List:net.sourceforge.lists.courier-maildrop

I have problems with forwarding to a small program. From my maildroprc:

if (/^(To|Cc|Bcc):.*afsendt@bjerke\.dk/) { to "| /home/vmail/test.py" # to "/var/spool/mail/virtual/bjerke.dk/afsendt/" }

From my maildrop.log:

Date: Sun Jan 28 13:39:24 2007 From: Flemming Bjerke <fl@bjerke.dk> Subj: GAK6 !Err: | /home/vmail/test.py (967)

(The commented saving to a maildir works fine, when uncommented.)

The permissions:

-rwx------ 1 vmail mail 1378 2007-01-28 13:50 mailfil -rwx------ 1 vmail mail 119 2007-01-28 13:34 test.py

The user is vmail. From /etc/postfix/master.cnf:

maildrop unix - n n - - pipe flags=R user=vmail argv=/usr/bin/maildrop /etc/courier/maildroprc ${recipient} ${user} ${nexthop}

The program simply stores an incoming mailstring:

#!/usr/bin/python import sys mailString = sys.stdin.read() sav = file('mailfil','w') sav.write(mailString) sav.close()

The program works perfectly when piping a mail to it:

cat /tmp/cur/1169985767.1845429.www\:2\, | /home/vmail/test.py

Actually, I use another program smtp2zope.py from the Mailboxer product for zope. This program uses exactly the same way a mailstring, and it works!!!

What is wrong? For now, I have tried everything I could figure out!

Flemming