[Exim] new command in system filter ?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Maxim Kozin
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] new command in system filter ?
Hi all.

For statistics and limitations purpose I was write next system
filter:

add  ${lookup{$sender_address}dbm{/stat/db/out_ok.db}{$value}{0}} to n0
if $n0 is above 1024
then
  mail to $sender_address
       from postmaster@mydomain
       subject "mail send reached limit ($n0)"
       expand file /stat/templ/out_overlimit.mail
  pipe "/stat/counter_fail_out.pl $sender_address"
  seen finish
endif
unseen pipe "/usr/local/etc/exim/stat/counter_ok_out.pl $sender_address"


Later for eliminated pipe's fork I was write new lookup "statdb"
(as described in
http://www.exim.org/exim-html-4.10/doc/html/spec_49.html#CHAP49)
This lookup simple increment counter in db1.x

All work fine, but now "if" construction looked ugly:

if ${lookup{$sender_address}statdb{/usr/local/etc/exim/stat/db/out_ok.db}{1}{1}
then
endif

May be exists some way to add in system filter not "lookup", but
"command", like "save" or "mail" ?

b.r.
Kozin Maxim