The condition is working, if the domain has no TXT record then it does
nothing to the sender address.
The problem I am having is I am also adding a header to the router:
headers_add = "X-SRS: Sender address rewritten from <$sender_address> to
<${quote_local_part:${local_part:$address_data}}@${domain:$address_data}>"
That header is being added to every message, even if the sender address was
not altered. I thought it would only do that if the conditions(s) for the
router were met but apparently not.
So 2 questions:
1) Can I fix this easily with some command?
2) I think I can do it by wrapping a condition into the headers_add option
(based on some searching), that option seems complex to figure out - but
more importantly would the router do the DNS check two times? Once for the
condition on the router itself and again to figure out if the headers_add
would be added?