On Mon, 15 Nov 1999 12:08:52 -0500 (EST), David Collantes
<david(_at_)bus(_dot_)ucf(_dot_)edu> wrote:
Would anyone tell me why the following recipe will not work and what to
do to make it work? I have tried the Jari pm-tips (in fact, part of the
code above came from it) with no luck.
How exactly does it not work?
How can a message be multipart/alternative and multipart/mixed at the
same time? And text/html too. All conditions have to match in order
for the action to be taken. Did you forget the negation on these? Or
do you mean
* ^Content-Type:\<*multipart/(mixed|alternative)
* B ?? ^Content-Type:<\*text/html
which would catch a multipart with one text/html body part (dismissing
for now the unlikely false matches you might get)? Or do you even mean
:0
* ! ^FROM_DAEMON
* ! ^From TRC
* ! ^majordomo(_at_)bus\(_dot_)ucf\(_dot_)edu
* ! ^majordomo-owner(_at_)bus\(_dot_)ucf\(_dot_)edu
* ! ^owner-cba(fac|stf|adj)?(_at_)bus\(_dot_)ucf\(_dot_)edu
{
# If we get this far, we want to reply if there's an HTML part
# If there's no sign of any HTML or attachment, do nothing; ...
:0
* ! ^Content-Type:\<*text/html
* ! ^Content-Type:\<*multipart/(mixed|alternative)
{ }
# Else, if it's a multipart but it doesn't have HTML, do nothing; ...
:0E
* ^Content-Type:\<*multipart/(mixed|alternative)
* ! B ?? ^Content-Type:\<*text/html
{ }
# Else, send an angry reply telling them to turn off this "feature"
:0E
| ( formail -rt ; cat /admin/d/david/admin/other/nohtml.txt ) \
| $SENDMAIL -oi -t
}
Untested, off the top of my head, of course ...
(Notice that TRC* probably doesn't do what you want; it matches TR,
TRC, TRCC, TRCCC ...)
If you don't have nested conditions like that, there's no point in the
block really; you can just say
:0
* conditions
* more conditions
| ( formail -rt ; cat /admin/d/david/admin/other/nohtml.txt ) \
| $SENDMAIL -oi -t
If your PATH is not set up properly, fix that instead of using
explicit paths every time you call up a program. $SENDMAIL is special,
because it should be compiled in with the correct path in your
Procmail already.
Hope this helps,
/* era */
--
Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition