Re: [exim] Extracting values from a wildlsearch

Top Page
Delete this message
Reply to this message
Author: Dave Lugo
Date:  
To: exim-users
Subject: Re: [exim] Extracting values from a wildlsearch
On Thu, 15 Mar 2012, Todd Lyons wrote:
>
> Is there a way to do it the way he wants? Does he have to use
> something other than wildlsearch? Or just a different regex? Or is
> the only solution (without external scripts) going to be to slurp the
> file in with readfile and transform it with sg?
>


I don't think this isn't exactly what you want, but there may be
some stuff here you can tweak:

I use this for allowing certain MAIL FROMs from certain hosts:

macro:

ALLOWED_HOSTS =
${lookup{$sender_address_domain}lsearch{/path/to/domain-table}}

in the relevant allow acl stanza:

  hosts          = +ignore_unknown : +ignore_defer : ALLOWED_HOSTS



(use ignores or not - I added them to avoid errors in logs)


format of the domain-table file I use is:

domain.com    1.2.3.4,2.3.4.0/24,some.fqdn.com



-- 
--------------------------------------------------------
  Dave Lugo     dlugo@???      No spam, thanks.
  Are you the police?  . . .  No ma'am, we're sysadmins.
--------------------------------------------------------