<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Aleksandr,<div class=""><br class=""></div><div class="">ja Lua was the way I’m planning to go. But just wasn’t sure to use dnsdist or recursor, but probably does not matter in that case.</div><div class=""><br class=""></div><div class="">Does the file gets loaded for every request with io.open and could this become a performance issue in your opinion? All DNS requests from a fairly good used mail gateway would be sent to this resolver.</div><div class=""><br class=""></div><div class="">I think I’ll give it a try with dnsdist and see what happens.</div><div class=""><br class=""></div><div class="">Best regards.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 14.12.2018 um 12:55 schrieb Aleksandr Rogozin <<a href="mailto:arogozin@squarespace.com" class="">arogozin@squarespace.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div dir="auto" class="">Hi Michael,</div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">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)" class="">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)" class="">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)" class=""> 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" class=""><br class=""></div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Dec 14, 2018 at 01:53 Bit World Computing - Michael Mertel <<a href="mailto:michael.mertel@bwc.de" class="">michael.mertel@bwc.de</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="">
<br class="">
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 class="">
<br class="">
The number of zones to spoof is currently not defined, could be dozens if not hundreds.<br class="">
<br class="">
I would usually do this kind of stuff with dnsdist (which I love), but would the recursor a better choice here?<br class="">
<br class="">
Thanks for any advice.<br class="">
<br class="">
—Michael<br class="">
<br class="">
_______________________________________________<br class="">
Pdns-users mailing list<br class="">
<a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank" class="">Pdns-users@mailman.powerdns.com</a><br class="">
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank" class="">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class="Apple-interchange-newline"></div></div></div></div></div></div></div></body></html>