[exim] modification of router for empty return-path

Top Page
Delete this message
Reply to this message
Author: Jonathan Gilpin
Date:  
To: exim-users
Subject: [exim] modification of router for empty return-path

Hi,

I have a router as follows:

virtual_local_spamw:
driver = accept
condition = "${if eq{$h_X-Spam-Flag:}{YES} {1}{0}}"
senders = ! ${lookup mysql {MYSQL_Q_WHITELIST}{$value}}
domains = ${lookup mysql {MYSQL_Q_LOCSPAW}{$value}}
transport = virtual_local_spamw_delivery


The problem is that it does not match if senders is blank ie: <>

E.G

2019-06-28 13:28:16.942 [35595] 1hgpzD-0009G7-6X SA: Action: flagged as Spam but accepted: score=10.9 required=4.4 (scanned in 1/1 secs | Message-Id: WIN-LT7PHN443AFp8AR00019ec2@WIN-LT7PHN443AF). From <> (host=NULL [185.222.58.147]) for blahblahblah@???
2019-06-28 13:28:16.943 [35595] 1hgpzD-0009G7-6X <= <> H=(WIN-LT7PHN443AF) [185.222.58.147]:54994 I=[195.78.94.150]:25 P=esmtp K S=5076 M8S=0 RT=0.001s id=WIN-LT7PHN443AFp8AR00019ec2@WIN-LT7PHN443AF T="jonathan@??? Monthly Account Security Update.(Action Required!)" from <> for blahblahblah@???
2019-06-28 13:28:16.965 [35656] 1hgpzD-0009G7-6X => blah <blahblahblah@???> F=<> P=<> R=virtual_local_mailbox T=virtual_local_md_delivery S=5174 QT=1.762s DT=0.002s
2019-06-28 13:28:16.965 [35656] 1hgpzD-0009G7-6X Completed QT=1.762s

I think I might need to change the senders conditional so it still works if senders is null?

Could anyone help me understand how to change it to achieve this?

Kind Regards,

Jonathan Gilpin