mouss wanted us to know:
/^X-Spam-Status:.*/
if ( $MATCH =~ /Yes/ )
{
log "No vacation message: $MATCH"
exit
}
Beware the "common" bug here (I know it because it happened to me;-)
This would match:
X-Spam-Status: No, score=-2.464 required=5 tests=[BAYES_00=-2.599,
=> see the 'YES' in 'BAYES'.
YES and Yes are two different entities though. Or is this match case
insensitive by default? I'll dig in the man page and adjust it as
necessary. (You can tell that I don't use BAYES here because I would
have seen that :-)
use /^X-Spam-Flag: YES/ instead. or at least, /^X-Spam-Status: Yes/
But I don't get any details in the logs if I do that. So I'll make
adjustments to not trigger any false positives.
one can even play with the score so as to not auto-respond if score >= 4
(for instance, because such message, while not tagged as spam, is
suspicious):
or if one is a geek, he can set a non integral treshold here:
but this is over-engineering...
I don't think so, I think it's perfectly valid. However I think at this
point, the best bet would be to start with the mail bot referenced
earlier and adjust it to match this. One shell out where everything is
done would certainly be cleaner than doing all this in a scripting
language. That's one huge advantage that the mail bot had.
Thanks for all the feedback!