Bug 180302 - cannot forward mail from procmail to cyrus
cannot forward mail from procmail to cyrus
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: cyrus-imapd (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Rockai
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-06 19:30 EST by Frank DiPrete
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-12 07:10:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank DiPrete 2006-02-06 19:30:29 EST
Description of problem:
Cannot configure procmail to forward to cyrus using deliver.
deliver rejects the mesage with exit code 65 (data format error?)


Version-Release number of selected component (if applicable):
cyrus-imapd-2.2.12-1.1.fc3
procmail v3.22 2001/09/10

How reproducible:
always

Steps to Reproduce:
1. forward from procmail to cyrus-imapd deliver
2. (see procmailrc below)
3.
  
Actual results:

mail is rejected by deliver with exit code 65 and procmail delivers it to
/var/spool/mail/user instead


Expected results:
delver via cyrus to imap mailbox

Additional info:

/etc/procmailrc

LOGFILE=/var/log/mail/procmail.log
VERBOSE=yes

# check for viruses with clamd
:0fw
| /usr/bin/clamassassin

# if virus is found dump it
:0:
* ^X-Virus-Status: Yes
/var/tmp/virusbucket

# send mail through spamd
:0fw
| /usr/bin/spamc

# if marked as spam dump it
:0:
* ^X-Spam-Status: Yes
/var/tmp/spambucket

#hand off to cyrus for delivery

:0W
| /usr/lib/cyrus-imapd/deliver -e -a $LOGNAME -m user.$LOGNAME


log:
procmail: [16913] Mon Feb  6 19:26:28 2006
procmail: Executing "/usr/bin/clamassassin"
procmail: [16913] Mon Feb  6 19:26:28 2006
procmail: No match on "^X-Virus-Status: Yes"
procmail: Executing "/usr/bin/spamc"
procmail: [16913] Mon Feb  6 19:26:35 2006
procmail: No match on "^X-Spam-Status: Yes"
procmail: Executing "/usr/lib/cyrus-imapd/deliver,-e,-a,fdiprete,-m,user.fdiprete"
procmail: Non-zero exitcode (65) from "/usr/lib/cyrus-imapd/deliver"
procmail: Assigning "LASTFOLDER=/usr/lib/cyrus-imapd/deliver -e -a fdiprete -m
user.fdiprete"
procmail: Assigning
"PATH=/home/fdiprete/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"
procmail: Locking "/var/mail/fdiprete.lock"
procmail: Assigning "LASTFOLDER=/var/mail/fdiprete"
procmail: Opening "/var/mail/fdiprete"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/fdiprete.lock"
procmail: Notified comsat: "fdiprete@1914:/var/mail/fdiprete"
From root@skipper.houselan.net  Mon Feb  6 19:26:28 2006
 Subject: data format error
  Folder: /var/mail/fdiprete
Comment 1 Frank DiPrete 2006-02-06 19:31:57 EST
tested imap and it works fine just can't forward from procmail to imap via deliver
Comment 2 Frank DiPrete 2006-02-06 19:48:32 EST
same problem on RHEL4:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180303
Comment 3 Frank DiPrete 2006-02-07 09:24:50 EST
Found a workaround. After removing the From header cyrus will accept the forward:

LOGFILE=/var/log/maillog
VERBOSE=no

# check for viruses with clamd
:0fw
| /usr/bin/clamassassin

# if virus is found dump it
:0:
* ^X-Virus-Status: Yes
/var/tmp/virusbucket

# send mail through spamd
:0fw
| /usr/bin/spamc

# if marked as spam dump it
:0:
* ^X-Spam-Status: Yes
/var/tmp/spambucket

# hand off to cyrus for delivery
# strip From header - borks cyrus deliver (arg!)
:0f
| formail -I "From "

:0w
| /usr/lib/cyrus-imapd/deliver -e -a $LOGNAME -m user.$LOGNAME
Comment 4 Petr Rockai 2006-05-12 07:10:56 EDT
That isn't a workaround. The From line is not part of the internet message 
format RFC and therefore is invalid. Cyrus correctly rejects such message. 
The problem is that procmail expects that the reading process wants to read 
mbox-formatted input, not just the message. Stripping the From line is 
therefore a correct solution.

Note You need to log in before you can comment on or make changes to this bug.