The above is just to validate you can execute commands as part of a lookup.
Final solution would be to call a script that retrieves the domain list
from an API service.
However the above does not seem to work (obviously doing something wrong or
stupid :) )
Validating an address I see
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering mc@??? >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> routing mc@???
--------> dnslookup router <--------
local_part=mc domain=test.com
checking domains
direct command:
argv[0] = echo
argv[1] = test.com
test.com in "@ : "? no (end of list)
test.com in "! +local_domains"? yes (end of list)
As you can see test.com is not in the domain list. Although it seems to
indicate that a direct command was called.