On 2013-09-02 at 22:08 +0900, Rob Gunther wrote:
> dns:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> payments:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> postmaster:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> r:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> sales:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25

> I currently read the values of these files in my exim router and associate
> the parts to local_parts and route_list.
> 
> Can I have exim use the data read from that file to make decisions?  Maybe
> something like this:
> 
> dns:0:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> payments:0:aspmx.l.google.com::25:alt1.aspmx.l.google.com::25
> 
> So could I get the router to check if that value is a 0, do not use SRS?
> 
> Am I totally confused?  I feel totally confused.

You might want to look into the ${extract...} expansion item and the
address_data variable and router option.

dns: spf="0" smarthosts="aspmx.l.google.com:25; alt1.aspmx.l.google.com:25"

Then you might use:

  address_data = ${lookup{$sender_address_local_part}lsearch{/path/to/file}}

This will be available in subsequent routers, and in transports.  You
might instead use an $acl_m_foo variable, set in an ACL.  Just note that
you can't meaningfully reference $address_data in a *pre-condition* in
the same Router which might later set it.  (Well, not unless you're doing
hideously complicated chaining of value setting.)

You can then get the 'spf' field with:

  ${extract{spf}{$address_data}}

and you might use the smarthosts with:

  route_data = <; ${extract{smarthosts}{$address_data}}

(I think route_data will use list separator changers, to avoid needing
 to double colons for ports, but I might be misremembering)

-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to