[exim] Skip router if local network

Top Page
Delete this message
Reply to this message
Author: Leigh Dodd
Date:  
To: 'Exim-Users \(E-mail\)'
Subject: [exim] Skip router if local network
Tried various configurations over the last 5 days, none have worked :-(
(see few hashed out below)

Can anyone tell me why the latest
{!eq {${mask:$sender_host_address/24}}{194.184.196.0/24}}
Gives me a LOG PANIC ?

I know I'm testing the config vi the local machine, and therefore
sender_host_address WOULD be blank, but it's should not give a PANIC
message.

How do I a "remote" test AND use a separate config file
(only have one mail machine?)
(run aother exim -C ... on a different port?)

Tried various flags like -bh -bt but routers don't get called.



Router test

        condition =  \
                ${if and \
                { \
                {!def:h_X-DSPAM-Check:} \
                {!eq {$received_protocol}{spam-ITRI-scanned} } \
                {!eq {${mask:$sender_host_address/24}}{194.184.196.0/24}} \
#               {!match {mask:$sender_host_address/24}{194.184.196.0} } \
#                {!eq {mask:$sender_host_address}{194.81.196.0/24} } \
                } \
                {1}{0}} 


Results from
exim -d-all+expand -C /usr/local/exim/dspam lsd @ itri.bton.ac.uk



xpanding: Sender host address = $sender_host_address
result: Sender host address =
Sender host address =
expanding: /raid/dspam/opt-in/${local_part}.dspam
result: /raid/dspam/opt-in/lsd.dspam
expanding: $received_protocol
result: local
expanding: spam-ITRI-scanned
result: spam-ITRI-scanned
expanding: $sender_host_address/24
result: /24
failed to expand: ${mask:$sender_host_address/24}}{194.184.196.0/24}} }
{1}{0}}
error message: "/24" is not an IP address
failed to expand: ${if and { {!def:h_X-DSPAM-Check:} {!eq
{$received_protocol}{spam-ITRI-scanned} } {!eq
{${mask:$sender_host_address/24}}{194.184.196.0/24}} } {1}{0}}
error message: "/24" is not an IP address inside "and{...}" condition
LOG: MAIN PANIC
failed to expand condition "${if and { {!def:h_X-DSPAM-Check:} {!eq
{$received_protocol}{spam-ITRI-scanned} } {!eq
{${mask:$sender_host_address/24}}{194.184.196.0/24}} } {1}{0}}" for
dspam_router router: "/24" is not an IP address inside "and{...}" condition
expanding: $home/.forward${local_part_suffix}