I made some changes but I haven't figured it out. The following recipe
should undigest, junk some subjects, and file the rest in folder
"IN-persfin". But so far all I have been able to do so far is undigest
and dump-to-inbox.
I don't think I understand the path of the resultant undigested emails:
the formailed messages don't seem to be processed by procmail with my
.procmailrc, they just get dumped into my inbox, as if they refuse to run
through .procmailrc twice. Do I have to employ sendmail (user-level only)
somehow?. How can I undigest, junk subjects, and file-in-folder? Thanks
for any help.
---clip .procmailrc
:0
*(^To|^X-Digest):.*\/persfin.*
{
TEST=$MATCH
DIGEST=$MATCH
:0c:
*!X-Digest: $DIGEST
$DEFAULT
:0
*!X-Digest: $DIGEST
|formail -i"To: Persfin-Digest <eric(_at_)clark(_dot_)net>"
-A"X-Digest: \
"$DIGEST -i "Reply-To: "$DIGEST +1 -ds procmail -Ym \
DEFAULT=/var/mail/eric /homef/eric/.procmailrc
# |formail -i"To: Persfin-Digest <eric(_at_)clark(_dot_)net>"
-A"X-Digest: \
"$DIGEST -i "Reply-To: "$DIGEST +1 -ds procmail
:0
*^Subject:.*(insur|quicken|child)
/dev/null
:0:
IN-persfin
}
#:0fW
#* ^TOpersfin
#| formail -i "Reply-To: persfin-digest(_at_)shore(_dot_)net" -A "Status: O" +1
-ds
#:0A:
#IN-persfin
---clip email output which gets dumped into inbox, should go to folder
From rocky(_at_)startribune(_dot_)comThu Nov 30 20:42:22 1995
From: Rakesh Agrawal <rocky(_at_)startribune(_dot_)com>
Date: Wed, 29 Nov 1995 18:54:53 -0500
Subject: Logistics Of Selling Short
X-Digest: persfin-digest(_at_)shore(_dot_)net
To: Persfin-Digest <eric(_at_)clark(_dot_)net>
Reply-To: persfin-digest(_at_)shore(_dot_)net
Could someone explain the logistics of selling short? I know what it is and
...
---clip mailstat.log
#Nothing gets saved to IN-persfin, yet a whole lot gets |formail.
#Why don't those 239 show up in /var/mail/eric log? Thats where
#I get them delivered...
Total Number Folder
----- ------ ------
42930 7 /var/mail/eric
6977 2 IN-nh5
6521 3 IN-probe
692189 239 formail -i"To: Persfin-Digest <eric(_at_)clark(_dot_)net>"
-A"X-Digest:
---clip verbose.log
procmail: Assigning "MATCH="
procmail: Matched "persfin-digest(_at_)shore(_dot_)net"
procmail: Match on "(^To|^X-Digest):.*\/persfin.*"
procmail: Assigning "TEST=persfin-digest(_at_)shore(_dot_)net"
procmail: Assigning "DIGEST=persfin-digest(_at_)shore(_dot_)net"
procmail: Match on ! "X-Digest: $DIGEST"
procmail: Locking "/var/mail/eric.lock"
procmail: [11626] Thu Nov 30 20:04:56 1995
procmail: Assigning "LASTFOLDER=/var/mail/eric"
procmail: Opening "/var/mail/eric"
procmail: Acquiring kernel-lock
procmail: [11626] Thu Nov 30 20:04:57 1995
procmail: Unlocking "/var/mail/eric.lock"
procmail: Match on ! "X-Digest: $DIGEST"
procmail: Executing "formail -i"To: Persfin-Digest <eric(_at_)clark(_dot_)net>"
\
-A"X-Digest: "$DIGEST -i "Reply-To: "$DIGEST +1 -ds procmail -Ym \
DEFAULT=/var/mail/eric /homef/eric/.procmailrc"
procmail: Assigning "LASTFOLDER=formail -i"To: Persfin-Digest \
<eric(_at_)clark(_dot_)net>" -A"X-Digest: "$DIGEST -i "Reply-To: "$DIGEST \
+1 -ds procmail -Ym DEFAULT=/var/mail/eric /homef/eric/.procmailrc"
From alufml(_at_)fnma(_dot_)com Thu Nov 30 20:04:54 1995
Subject: List of VISA Cards 800 Phone Numbers
Folder: formail -i"To: Persfin-Digest <eric(_at_)clark(_dot_)net>" \
-A"X-Digest: 565
---clip done
Eric: eric(_at_)clark(_dot_)net ---------------------------------- Mime OK.
On Sat, 11 Nov 1995, Soren Dayton wrote:
Date: Sat, 11 Nov 1995 18:10:23 CST
From: Soren Dayton <csdayton(_at_)midway(_dot_)uchicago(_dot_)edu>
To: Eric Olsen <eric(_at_)clark(_dot_)net>
Cc: procmail(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Filtering undigested messages
Why does the following recipe not delete any "Insurance" or "Quicken"
subjects?
Because each message is getting spit out to stdout and they are
getting concatenated into one again.
Also, do |formail'ed messages get filtered by the whole .procmailrc or
just the remainder after the |formail... line?
Just the remainder of the action line. Then they may continue to
other things.
Thanks.
:0fw
|formail -A"X-Digest: $MATCH" -i "Reply-To: $MATCH" -des
:0
* ^Subject:.*(insur|quicken)
/dev/null
:0r:
IN-persfin
Basically the problem is that none of the letters are being dealt
with independently. To arrange that you probably want something like:
formail -des procmail ........
where you give procmail an rc file that will do what you want it to do....
Soren