From: Michelle Konzack
Sent: Thursday, January 19, 2006 2:26 AM
[...]
But I do not understand why.
It is since the upgrade last year.
If I use fetchmail->procmail directly, it works,but not:
__( '/usr/bin/tdformail' )____________________________________________
/
<snip>
| let NUM=1
| for MSG in `find $BASE -type f ! -name maildirfolder` ; do
| # Let us see, how many files are filtered and there subject line
| RETVAL=`grep "^Subject: " $MSG`
| echo $NUM" : $RETVAL" |cut --characters=1-79
| # Now we filter.
| cat $MSG |formail -ds $MDA $RCFILE
| err_msg $?
| ################################################################
| # Remove the originating file
| if [ "$REMOVE" == "YES" ] || [ "$REMOVE" == "yes" ] ; then
| rm -f $MSG
| fi
| let NUM=$NUM+1
| done
<snip>
\______________________________________________________________________
I have tested one message/rfc822 and $MSG was ok, but after processing
cat $MSG |formail -ds $MDA $RCFILE
I have two or more messages. Please note, that I use this script
since 2 years and the error occuredfor some month the first time.
Michelle,
Perhaps it is the -d switch added above? The -d switch is intended
only for digests and malformed mailboxes:
-d Tell formail that the messages it is supposed to split need not be
in strict mailbox format (i.e., allows you to split
digests/arti-
cles or non-standard mailbox formats). This disables
recognition
of the Content-Length: field.
What may be happening is formail is ignoring the Content-Length and picking
up the presence of the internal From:/Date:/Subject: sequence and splitting
that out?
Here's something I used to detect digests, and to reserve -d only for
those situations where it is needed:
#
# Filter out noise added into digests
#
:0 f
* ^Subject:.*digest
| sed -e '/^------------------------------/d' \
-e '/^End of .* Digest/d' \
-e '/^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/d'
#
# if it looks like a digest, then split it up
#
:0 f
* ^Content-Type:.*multipart/digest
| formail -m 3 +1 -ds
:0 Ef
* ^Subject:[ ]*[a-zA-Z0-9]*[ ]*digest[ ]*[0-9]*
| formail -m 3 +1 -ds
It is an interesting question as to why this failed when you upgraded
your system. One way to find out would be to get the source RPM's for
the before/after versions, and see where they differ, particularly
in the 'formail' area. Or perhaps you changed some of your scripts
around the same time?
PS: even with the checking for the possibility of a digest above,
note that -ds isn't foolproof, and if the digest itself held a
full message, formail might carve it out, even if the messages
is encapsulated in a MIME wrapper.
- Gary
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail