On your corrections, is there a missing ) or perhaps you type one extra?
Yes, and there was a missing }
I meant it to be like this:
(BTW you don't need
* ! ^majordomo(_at_)bus\(_dot_)ucf\(_dot_)edu
because majordomo is included in ^FROM_DAEMON)
:0
* ! ^FROM_DAEMON
{
:0 H
* cba(stf|fac)?@(atlantis\.)?bus\.ucf\.edu
{
:0 B
* ()<HTML>
* ()</HTML>
{
:0 c
/tmp/$file_name.txt
:0
| /usr/local/bin/html_bouncer.pl $file_name.txt
}
}
}
# I should know better than to forget to indent properly to make sure I don't
leave a stray { or } hanging
What I need is an exact matching of the To: addresses, on the first part,
i.e.,
cba(_at_)atlantis(_dot_)bus(_dot_)ucf(_dot_)edu
cba(_at_)bus(_dot_)ucf(_dot_)edu
^ ^
| |- disregard hostnames, match bus.ucf.edu.
|
- exact match for each list (cba, cbafac, cbastf, etc)
So you want to match cba/cbafac/cbastf exactly,
and you want to match 'bus.ucf.edu' with or without further subdomains?
cba(stf|fac)? #matches "usernames" cba, or cbafac, or
cbastf
@
(.*\.)?\<bus\.ucf\.edu\> #matches (I think) bus.ucf.edu or any
subdomain above
it
I'm still new to the use of \< and \> so their placement may be off.... well,
I'm pretty sure that \> is right, but I'm less sure about where to put \<
Put it all together,
and instead of :0 H why not just use
:0
* ^(To|Cc):.*cba(stf|fac)?@(.*\.)?\<bus\.ucf\.edu\>
Or you could use ^TO_ or ^TO also
Content-type are too many... I tried and I could not make it work at all. If
someone has a solution for that approach... Any new feedback?
Too many content-types for HTMLs?
I just did a quick 'egrep -i "^content-type.*html|<html>"' on my inbox and found
that in every case I found a
^Content-Type: text/html
for each <HTML>
But if you search the headers for
* ^Mime-Version: 1.0
* ! ^Content-Type:[ ]Text/Plain
*then* you could search the body for 'Content-Type: text/html' (rather than
searching every message body for <HTML> & </HTML>)
In your current method, someone could send you a text message that says
"Here, copy and paste this in to make a webpage
<html><head><title>hello world</title></head>
<body>
this is a test
</body>
</html>
"
and your recipe would bounce a text message that happened to have those HTML
tags in it.
Just some thoughts from a really basic procmail user
TjL
ps -- personally I prefer using $HOME/.tmp to /tmp but that's my own idiomatic
thing...
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail