procmail
[Top] [All Lists]

Re: digest splits

2001-08-18 20:33:17
homega(_at_)wanadoo(_dot_)es writes:
I\xB4ll answer myself.  It\xB4s a known feature... of formail.

On my .fetchmailrc I have: mda "formail -ds procmail"

If you want to split digests, you should do that from inside your
.procmailrc for just those lists that you want so split.  As is, you'll
split into multiple messages *any* message sent to you that formail
thinks to be a digest.  To correct that, remove the mention of formail
from your .fetchmailrc and just say ".... mda procmail" (or better, let
fetchmail deliver to your local MTA.  There are reasons that delivery
via SMTP is the preferred fetchmail configuration).


From \xB4man formail\xB4 I gather that I should write this like
      formail +1 -ds procmail
               ^^
instead and explains the \xB4+[0-9]\xB4 as:

+skip
      skip the first skip messages while splitting

What does this \xB4skip\xB4 mean and, how is it different to write
or not the \xB4+[0-9]\xB4 skip?

Formail treats an argument of a plus-sign followed by a number as
a request to skip over some number of the leading messages that are
split out.  When you split a digest, the first 'message' from the split
is generally the 'index' of the digest.  Passing "+1" to formail tells it
to not pass that 'message' on to procmail but rather just throw it away.


...
:0:
* ^TO_*list-users(_at_)mailinglist(_dot_)dom
somebox

What's that '*' doing there after the ^TO_?  It can only reduce the
effectiveness of the ^TO_ expression.  The correct usage would be:

        :0:
        * ^TO_list-users(_at_)mailinglist(_dot_)dom
        somebox


then I realize that the digest message headers are:

From list-users-admin(_at_)mailinglist(_dot_)dom
and
From: list-users-request(_at_)mailinglist(_dot_)dom
(TO_ includes the From headers, right?)

From the name "^TO_", would you really expect it to match the "From:"
header field or "From " message separator?  "To" and "From" were opposites
the last time I checked.  (For the exact regexp matched by the ^TO_
token, read the MISCELLANEOUS section of the procmailrc(5) manpage.)


so, I should have used:
:0:
* ^TO_*list-users-admin(_at_)mailinglist(_dot_)dom
somebox

Unless "list-users-admin(_at_)mailinglist(_dot_)dom" appears in a 'recipient'
field like To:, Cc:, Resent-To:, etc, that will not work.


and the rest of messages seem to have had their full headers
cut off, and the From and To fields are:

From user(_at_)anydomain(_dot_)dom
From: user(_at_)anydomain(_dot_)dom
To: list-users(_at_)mailinglist(_dot_)dom
(where ``user幹 is the original sender of the message)

Funny, it looks like procmail is seeing every single line
with the To: field set to list-users(_at_)mailinglist(_dot_)dom, and
delivering them separetely.

Procmail is being invoked by the "formail -ds procmail" command once for
each message in digest.  That's what you told it to do.  Thus the separate
delivery.  As for the To: lines, the digest presumably include the a To:
field in each 'message' in the digest that shows how the message got to
the list.  If you look at the original digest message, you'll find that
all the sub-messages had their headers stripped down to a minimal set,
because no one wants to have to page though line after line of "Received:"
header field.


Is this a feature, unintended feature, intended bug, bug?
If it\xB4s a feature, I wonder if it will work with digests
coming from other list managers like majordomo (the list
digest it split is managed by Mailman).

Is what a feature?  That formail's -d option works to split digests is
certainly an intended feature.  It almost certainly will work on digests
sent by majordomo and probably any other mailing list digest that you
try it on.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>