[Exim] System filter

Top Page
Delete this message
Reply to this message
Author: Odhiambo Washington
Date:  
To: Exim Users
Subject: [Exim] System filter

I am trying to get some logging done via the system filter but kinda gotten stuck. Someone
please tell me where mymistake is on the filter snippets below:

The error I am getting is:

##############
wash@ns2 ('tty') ~/Administration 37 -> exim -bf logging-filter < testmail 
Sender    = wash@???
Recipient = wash@???
Testing Exim filter file logging-filter


exim: error in forward file: missing or malformed local part (expected word or "<") in ""${lookup {$sender_address_domain}
partial-lsearch*@{/usr/local/etc/exim/static} {1}}" is 1)"
##
wash@ns2 ('tty') ~/Administration 48 -> exim -bf logging-filter -f admin@??? < testmail 
Sender    = admin@???
Recipient = wash@???
Testing Exim filter file logging-filter


exim: error in forward file: missing or malformed local part (expected word or "<") in ""${lookup {$sender_address_domain}
partial-lsearch*@{/usr/local/etc/exim/static} {1}}" is 1)"
##############


#My filter is below

if ("${lookup {$sender_address_domain} partial-lsearch*@{/usr/local/etc/exim/relay} {1}}" is 1 or
    "${lookup {$sender_address_domain} partial-lsearch*@{/usr/local/etc/exim/static} {1}}" is 1)
  then
    logfile /var/log/exim/domainemail 0644
    log "$tod_log $sender_address $message_size  >> $recipients_count"
endif


if foranyaddress $recipients ("${lookup {$thisaddress} partial-lsearch*@{/usr/local/etc/exim/relay} {1}}" is 1 or
   "${lookup {$thisaddress} partial-lsearch*@{/usr/local/etc/exim/static} {1}}" is 1)
  then
    logfile /var/log/exim/domainemail 0644
    log "$tod_log $thisaddress $message_size  << "
endif



TIA

-Wash

--
Odhiambo Washington
Wananchi Online Ltd.,
wash@??? 1st Flr Loita Hse.
Tel: 254 2 313985 Loita Street.,
Fax: 254 2 313922 PO Box 10286,00100-NAIROBI,KE

Forgive, O Lord, any little jokes on Thee, and I'll forgive Thy great big one
on me.
-Robert Frost