[Exim] mask vs regex match in filter and other questions fro…

Top Pagina
Delete this message
Reply to this message
Auteur: Jeffrey Goldberg
Datum:  
Aan: exim-users
Onderwerp: [Exim] mask vs regex match in filter and other questions from the Bedfordshire marshes.
In a system filter where I am trying to test for messages for a whether it
originated in my domain 138.250.0.0/16, I have

 if (("${if def:sender_host_address {yes}{no}}" is yes) and
     ${mask:$sender_host_address/16} is "138.250.0.0/16") then 


Would there be a performance gain for

if ($sender_host_address begins 138.250.) then

Also what happens if $sender_host_address is not defined.

Finally, how do I test a system filter for things with
$sender_host_address ? I tried playing with a combination of -bF and -bh
but -bh always got me talking SMTP.

In case you are wondering, the filter is an attempt to get a sense of how
much mail is generated by different MUAs, and this bit of the filter is

if (first_delivery and not error_message ) then

...

 if (("${if def:sender_host_address {yes}{no}}" is yes) and
     ${mask:$sender_host_address/16} is "138.250.0.0/16") then
   logfile /var/spool/exim/log/mailer_log
   logwrite "${if def:h_x-mailer:{X-Mailer: $h_x-mailer:}{Message-ID: $h_message-id:}}"
 endif
endif


This bit is wrapped in a larger

-j

-- 
Jeffrey Goldberg              
 Until June 9:  Cranfield Computer Centre   +44(0)1234 750 111 x 2826
 See http://www.goldmark/jeff/contact.html for change of address info
Relativism is the triumph of authority over truth, convention over justice.