Discussion:
[PLUG] Sorting incoming mail with procmail recipe
Rich Shepard
2018-11-02 20:11:46 UTC
Permalink
I've still not corrected procmail's putting messages from one mail list in
my inbox. This started only a couple of weeks ago and I thought I had it all
worked out, but I don't.

The messages are addressed To: grass-***@lists.osgeo.org and the procmail
recipe for this is,
:0:
* ^(From|Cc|To).*osgeo.org
spatial-analyses

Since procmail processes each description line as a regex the above format
should work for all recipes. And, this format does work for the other mail
lists to which I subscribe. I want to learn why it's not working with this
one.

All suggestions and ideas are welcome,

Rich
Roderick Anderson
2018-11-02 23:03:27 UTC
Permalink
Rich,

It's been years since I wrote procmail scripts but the thing that jumps
out at me is the position of the asterisk. Should it go before the period?


Rod
--
  I've still not corrected procmail's putting messages from one mail
list in
my inbox. This started only a couple of weeks ago and I thought I had it all
worked out, but I don't.
procmail
recipe for this is,
* ^(From|Cc|To).*osgeo.org
spatial-analyses
  Since procmail processes each description line as a regex the above
format
should work for all recipes. And, this format does work for the other mail
lists to which I subscribe. I want to learn why it's not working with this
one.
All suggestions and ideas are welcome,
Rich
_______________________________________________
PLUG mailing list
http://lists.pdxlinux.org/mailman/listinfo/plug
Rich Shepard
2018-11-02 23:22:05 UTC
Permalink
Post by Roderick Anderson
It's been years since I wrote procmail scripts but the thing that jumps
out at me is the position of the asterisk. Should it go before the period?
Rod,

Not if the intention is to ignore multiple characters. Just as you'd write
'rm .*~' to remove all hidden backup files.

Regards,

Rich
Roderick Anderson
2018-11-02 23:36:48 UTC
Permalink
Yup. It's been awhile! 😁

Rod
--
Post by Rich Shepard
Post by Roderick Anderson
It's been years since I wrote procmail scripts but the thing that jumps
out at me is the position of the asterisk. Should it go before the period?
Rod,
Not if the intention is to ignore multiple characters. Just as you'd write
'rm .*~' to remove all hidden backup files.
Regards,
Rich
_______________________________________________
PLUG mailing list
http://lists.pdxlinux.org/mailman/listinfo/plug
Rich Shepard
2018-11-03 12:33:16 UTC
Permalink
One minor nit is that it's usually recommended to escape literal periods
because "osgeo.org" will match "osgeo.org" as well as things like
"osgeoAorg", "osgeoBorg", "osgeoCorg" etc.
Bryan,

That's not been an issue over the past couple of decades.
The only thing I can think of is that there is a rule above that one which
messages from that list hit first, and therefore get put into that file
instead of the one you've indicated. Does anything change if you move this
rule higher up in the ruleset?
I thought of this but hadn't tried changing this rule's place in the list.
Just did so now, moving it near the top.
Failing that, it appears that procmail has been unmaintained since
2001 and fuzzing efforts have discovered several bugs in it. [1][2]
How interesting! I had no idea. I've used procmail since 1997 and never
thought about it. Only yesterday I learned that teTeX is still (through
14.2) distributed with Slackware while the author stopped supporting it a
very long time ago. I replaced it with TeXLive back then and that's the
TeX version starting with the soon-to-be-released 15.0. I'm surprised that
procmail wasn't replaced years ago.
I've been using "fdm" for... so long I can't even remember.
Probably about 10 years or so by now. I can recommend fdm as a
good and powerful MDA if you're willing to consider switching to
an alternative. [3] https://wiki.archlinux.org/index.php/Fdm
Of course I am.

Thanks for your response. Slackbuilds.org has fdm so I'll build, install,
and learn how to use it.

Best regards,

Rich

Loading...