[Exim] ip address mask operation in expansions

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jakob Hirsch
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] ip address mask operation in expansions
Hi!

Unrelated to another writer's problem with ip masking I have also one
with it. I'm using Exim 3.36 and want to filter out the IP-Address of
internal hosts on the received_header_text. That works fine for external
mail, but if I mail from the mailserver's command line,
$sender_host_address is undefined so the expansion fails with '...
(received_header_text) failed: "" is not an IP address'. Even when I try
to catch this condition with def:sender_host_address like in this (used
for testing):

received_header_text = "Received: \
  ${if def:sender_host_address \
    {${mask:$sender_host_address/24}} \
    {undefined} \
  }"


It seems that Exim tries to expand mask before evaluating the condition
(which would not make much sense in my eyes) and fails because
$sender_host_address is not defined. Or do I have to do this in another
way?



Bye, Jakob