[exim] combining string expansion items (lookup, extract)

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Chris Knadle
Ημερομηνία:  
Προς: Exim
Αντικείμενο: [exim] combining string expansion items (lookup, extract)
I'm trying to do a custom DNS lookup checking for $sender_address_domain DMARC
rules, and I seem to be missing some fundamental understanding of how to
combine string expansion items. I've been reading manual sections 9.10 and
Chapter 11.

Right now I have the following:

acl_check_data:
   [...]
  warn
    set acl_m_dm1 = ${lookup dnsdb{>\n,; txt=_dmarc.$sender_address_domain}\
                     {$value} fail}
    set acl_m_dm2 = ${extract {p}{$acl_m_dm1}}
    #condition = ${if def:acl_m_dm1}
    condition = ${if and{ {def:acl_m_dm2} {!eq {$acl_m_dm2} {none;}} }}
    logwrite = $sender_address_domain DMARC lookup = $acl_m_dm1 :: $acl_m_dm2



And instead I'd like to be able to combine these operations and store the
result in a single variable, such as:

    set acl_m_dm1 = ${extract { \
         ${lookup \dnsdb{>\n,; txt=_dmarc.$sender_address_domain} \
           {$value} fail}
       }{p}{$acl_m_dm1} }


... but this always seems to lead to an error "missing or misplaced { or }"
even when the {'s match the }'s, so I think I'm missing something else
concerning how to combine these.

Any information on how to do this would be appreciated.
Thanks.

-- Chris

--

Chris Knadle
Chris.Knadle@???