Tip for FROM_DAEMON
Hi, Last night I realised that it is utterly non-efective to do
FROM_DAEMON test all over my private/public procail modules. It's
better to cache the results and use fast variable. I've included this
to section "10.1 Speeding up procmail" in pm-tips.
o You can avoid multplse and possible expensive FROM_DAEMON tests
by cacheing the result at the top of your .procmailrc. We use a
little trick here to get more verbose logging. The [^daemon] is
actually a regexp; which will always match and make procmail to
log: Match on "[^daemon]". We could have used from_daemon=".",
but that wouldn't tell much in condition line log: Match on "."
from_daemon = !
from_daemon = "[^daemon]"
# Later you just use from_daemon like the big brother
# Match on "[^daemon]"
How to get FROM_DAEMON match: a question
But, now we come to interesting part. I actually wanted to see what the
FROM_DAEMON matched and here are my fruitles tries. What's the trick to
get FROM_DAEMON expanded and attach MATCH operator to it?
Initial match is ok:
Match on "(^(Precedence...
No match on "\/(^(Precedence...
No match on "\/()(^(Precedence
I know this doesn't work, because FROM_DAEMON is special, but I tried anyway
No match on "^\/FROM_DAEMON.*"
"No match" is beginning to sound like a mantra by now....