[exim] detecting verify mode in a filter

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nick
Dátum:  
Címzett: exim-users
Tárgy: [exim] detecting verify mode in a filter
Hello,

I have a filter script which is called by a redirect router. The filter
delivers or rejects mail depending on state stored in a sqlite database.

The problem I have is that it is executed in verify mode before the
actual delivery, and this means a counter is decremented twice per
delivery, instead of once.

No problem, I thought at first, just use the /no_verify/ option in the
router to prevent the filter being executed, as for user .forward
files. Except this means that verification gets the wrong answer about
whether the relevant emails get delivered or not, and mails get rejected
when they shouldn't, or vice versa.

Or, just use the /$verify_mode/ to disable state changes in verification
mode. Except, it apparently isn't available: when I use it I get an error:

    'failed to expand "$verify_mode" in filter file: unknown variable 
name "verify_mode"'


If I could see a way of passing the verify_mode from the router into the
filter that might work, but so far I don't.

Surely there must be a way around this I've missed, can anyone recommend
something?

Thanks!

Nick