[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: slocal and relation with rcvstore
From: |
Valdis Klētnieks |
Subject: |
Re: slocal and relation with rcvstore |
Date: |
Sun, 13 Mar 2022 23:58:30 -0400 |
On Sun, 13 Mar 2022 21:37:12 +0100, "Thomas Dupond" said:
> If so, what should I use to have all the goodness of filtering and 'unseen'
> behaviour from nmh?
Procmail also knows how to deal with mh-style folders. You can either have it
deliver it directly (which doesn't update sequences), or invoke rcvstore. The
nice thing is that procmail has much more fine-grained matching, searching,
and processing.
So the mail I'm replying to got filtered into the folder by this:
:0 Ew:nmh/$LOCKEXT
*^(To:|cc:).*nmh-workers@nongnu.org
|rcvstore +nmh
While Greg Kroah-Hartman's weekly patch review posts for the various
linux-stable kernel trees get auto-ignored thusly:
:0 E
*^(To:|cc:|X-mailing-list:).*linux-kernel@vger.kernel.org
*^From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
*^Subject: \[PATCH [45].[0-9]
trash/.
(Yes, all 3 regexp have to match. I used 'trash/.' rather than '/dev/null' so
that if it ever false-positived, I'd still be able to fish it out of the trash
folder)
Or even how I invoke 'mhfixmsg' as a filter (at the time, I wasn't sure what
mhfixmsg's interaction with converting parts of a multipart/signed and
potentially breaking a signature, so I didn't invoke it for signed mail)
# Canonify to 8-bit UTF-8
:0
*!^Content-type:.*multipart/signed
{
# Set here rather than earlier so we don't splat out zero-length files for
stuff
# we filed before this, so we didn't fixmsg...
TMPFILE=`mktemp -p /home/valdis/tmp fixmsg.XXXXXXXXXX`
:0 wf
| tee $TMPFILE | mhfixmsg -noverbose -file - -outfile -
}
And I won't share some of the more bletcherous things I did with procmail to
produce actionable data from Listserv/Sendmail bounce reports (hint - since
every single time that Listserv hands Sendmail a mail and bounces, the
boilerplate in the resulting bounce message is identical so you want to extract
the copy of the bounced mail from inside the multipart/report. Let's see you do
*that* with slocal :)