Re: [exim] Detecting MessageLabs and avoiding

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: exim-users
Subject: Re: [exim] Detecting MessageLabs and avoiding
* on the Wed, Jun 25, 2014 at 04:01:59PM +0100, Gary Stainburn wrote:

>> You can look at the MX records using ${lookup dnsdb{mxh=$domain}} and act
>> based on that. If you can supply a couple of example domains that are
>> pointing at Message Labs it probably wont be difficult to come up with
>> a recipe.
>
> Thanks for this. Some example domains are:
>
> nationwidevehiclecontracts.co.uk
> windmillleasing.com
> lesliney.com
> hyram.com


The MX records for three of those domains point to (from this machine):

cluster8a.eu.messagelabs.com
cluster8.eu.messagelabs.com

You could pick those out with this:

 smarthost:
     driver     = manualroute
     condition  = ${if forany{ \
                    ${lookup dnsdb{>:mxh=$domain}} \
                  }{ \
                    match_domain{$item}{*.messagelabs.com} \
                  }}
     transport  = remote_smtp
     route_data = mail.my.isp
     no_more
     no_verify


However, the MX record for nationwidevehiclecontracts.co.uk is:

nationwidevehiclecontracts-co-uk.mail.protection.outlook.com

So wouldn't be picked up by the above recipe. If you wanted to
include MX record matching that too, you would update the
match_domain part of the above recipe to:

match_domain{$item}{*.messagelabs.com:*.protection.outlook.com}

-- 
Mike Cardwell  https://grepular.com https://emailprivacytester.com
OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3   B0CF 70A5 F512 0018 461F
XMPP OTR Key   8924 B06A 7917 AAF3 DBB1   BF1B 295C 3C78 3EF1 46B4