<div><div dir="auto">Hi Michael,</div></div><div dir="auto"><br></div><div dir="auto">I recommend using Lua to intercept the DNS queries. Both dnsdist and recursor should be able to support it. In Lua you can check for query type to be MX and load a list of domains from a file using ‘<span style="color:rgb(60,64,67);font-family:Roboto,HelveticaNeue,Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">io.open’. P</span><span style="color:rgb(60,64,67);font-family:Roboto,HelveticaNeue,Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)">rovide necessary DNS response</span><span style="color:rgb(60,64,67);font-family:Roboto,HelveticaNeue,Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)"> if the query matches your list of zones. Additionally, you might want to limit this operation to specific networks with NetMask or NetMaskGroup.</span></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 01:53 Bit World Computing - Michael Mertel <<a href="mailto:michael.mertel@bwc.de">michael.mertel@bwc.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I’am looking for the most efficent way to spoof the answer of a MX query. I need to redirect outgoing e-mails (specific domains only) to a smtp gateway for further processing before it leaves the local network. I cannot use any kind of transport tables at the MTA, so my approach was to use dns therefore.<br>
<br>
The number of zones to spoof is currently not defined, could be dozens if not hundreds.<br>
<br>
I would usually do this kind of stuff with dnsdist (which I love), but would the recursor a better choice here?<br>
<br>
Thanks for any advice.<br>
<br>
—Michael<br>
<br>
_______________________________________________<br>
Pdns-users mailing list<br>
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
</blockquote></div></div>