[exim] re-use looked up data in a router

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Maarten van Baarsel
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] re-use looked up data in a router
Hi,

I've got a redirect router like this halfway my config, to redirect a received
mail to another separate address:


pipes_forward:
   driver                     = redirect
   domains                    = +pipe_domains
   data                       = ${lookup mysql{\
               SELECT `forward_copy` \
               FROM `pipes` \
               WHERE `domainname`='${quote_mysql:$domain}' \
               AND (`user`='*' OR `user`='${quote_mysql:$local_part}') \
               AND NOT `forward_copy` IS NULL} \
                                 {$value}fail}
   unseen


which works quite OK. I'd like to add the address that I've just queried to
the 'To' header.

I thought I could do this with:

headers_remove = To\nDKIM-Signature
headers_add = To: $header_to:


But I'm stumped for a variable that has the value from the query in it and I'd
like to not do the query again. I'm reading the documentation as we speak but
as you hopefully can imagine 'data' is not a very useful word to be searching for.

Is there a way?

thanks,
Maarten.