Hi folks.
I'm new here, and relatively new to procmail, so lots of question :)
However, I've been
using it now for around two weeks and I'm amazed that I've lived for
this long without it! Truely awesome program :-)
Linux 2.0.24, libc-5.2.13 etc, sendmail 8.8.2.
I'm subscribed to around a dozen email lists and procmail is proving
to be very, very helpful in organising my incoming mail so that I've
now got some sort of order and sanity here :-)
% ls -l ~/.procmailrc
-rw-r--r-- 1 tonyn users 9767 Nov 5 13:04 /home/tonyn/.procmailrc
It's doing a lot already, but there is something that I want to do,
and I can't seem to figure out how to do it.
I want to filter _all_ incoming mail that is Quoted-Printable to make
it "normal" before it's put into the various maildrop boxes. Is it
possible to get procmail to do something "globally" before local
delivery? (Is this what the /etc/procmailrc/ stuff is for?)
I use emil for (most of) my mime-conversions. (Excellent program btw:
http://www.uu.se/emil/)
It sort of means that I wil need to identify these messages and parse
them *twice* - once initally, "globally", sending them to emil with
appropriate parameters, then from there back to procmail for local
delivery.
If this can't be done, then how does one set up a local ~/.procmailrc
file so that these messages are filtered, then again processed by
procmail for delivery into the user's mailboxes?
As I understand it, if mail passes a rule that sends it to a filter,
then it's up to the filter to deliver the mail into the appropriate
mailbox. Or can I get procmail to gather the output of the filter and
continue to process it from there?
Or do I need to get the filter to pass it back to procmail again?
That is, not to redirect the output of the filter to append it to
where it is supposed to go, but pipe it onto procmail. This sort of
thing seems to be inefficient to me.
The procmailex man page gives this example:
:0
* ^Content-Type: *text/plain
{
:0 fbw
* ^Content-Transfer-Encoding: *quoted-printable
| mimencode -u -q
:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"
:0 fbw
* ^Content-Transfer-Encoding: *base64
| mimencode -u -b
:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"
}
Substituting `mimencode' for `emil', is this how it's done to get
procmail to further process the message from here? Just enclose the
filtering "rules" with `{...}' ?
If it's this easy, then I also want to use sed on all my email like
this to get rid of all the PGP munging::
sed -e 's/^- //' \
-e '/BEGIN PGP SIGNED MESSAGE/d' \
-e '/BEGIN PGP PUBLIC KEY BLOCK/,/END PGP PUBLIC KEY BLOCK/d' \
-e '/BEGIN PGP SIGNATURE/,/END PGP SIGNATURE/d' \
(Tested... this seems to be reliable and works _really_ well).
What I've got now is sendmail using emil as my local deliver agent,
and emil passing it on to procmail for actual delivery. However, this
is inefficient [it all doesn't need to be filtered] and I would prefer
emil to be used only if necessary.
Also, I'm about to switch from using mailx to mh to handle my email
(still using mailx as getting used to mh means a total change of
mindset in how I'm reading my email). I'm looking forward to the mime
capabilities of mh).
Is there anyone here that can give me some hints as to how to get
the combination of sendmail+procmail+mh working really smoothly?
Finally:
- Is this list archived?
- Is there any other FAQ for procmail besides what I found in the
sources and in Nancy's mail-filtering FAQ?
- Anyone know of a good web site with handy procmail hints?
- Is there any mailing lists for mh?
Thanks for any help and advice.
Cheers
Tony