[Sunhelp] procmail help

Doug McLaren dougmc at frenzy.com
Thu Aug 31 17:21:06 CDT 2000


On Thu, Aug 31, 2000 at 12:58:56PM -0500, Bill Bradford wrote:

| Got a question.  I've currently got a procmail rule that looks like
| this, for putting the sun-managers list into its own folder:
| 
| :0:
| * sun-managers at sunmanagers.ececs.uc.edu
| sun-managers
| 
| Basically, "if a message contains sun-managers at sunmanagers.ececs.uc.edu,
| put that message into the sun-managers folder".
| 
| However, I want to do an AND sort - 
| 
| "if a message contains sun-managers at sunmanagers.ececs.uc.edu AND the
| string SUMMARY, put that message into the sun-managers-summaries folder".

:0 HB:
* sun-managers at sunmanagers.ececs.uc.edu
* SUMMARY
sun-managers-summaries

The HB means to look at both the header and the body - probably not
what you wanted, but it is what you asked for.

Note that `* sun-managers at sunmanagers.ececs.uc.edu' isn't that good of
a thing to search for, because it'll catch things that aren't to the
list.  For example, if somebody emails you asking about
`sun-managers at sunmanagers.ececs.uc.edu', it'll catch it, even though
it doesn't belong there.

A better rule would be this -

::
* (^TOsun-managers at .*ececs.uc.edu|^Sender: owner-sun-managers)
* ^Subject: SUMMARY
sun-managers-summaries

And an even better rule is probably this -

::
* (^TOsun-managers at .*ececs.uc.edu|^Sender: owner-sun-managers)
/dev/null

:)

For oodles of procmail examples, check out http://www.procmail.org/jari.






More information about the SunHELP mailing list