<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=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 15.12.2018 um 09:50 schrieb bert hubert <<a href="mailto:bert.hubert@powerdns.com" class="">bert.hubert@powerdns.com</a>>:</div><br class="Apple-interchange-newline"><div class="">On Sat, Dec 15, 2018 at 09:42:21AM +0100, Bit World Computing - Michael Mertel wrote:<br class=""><blockquote type="cite" class="">Hi Aleksandr,<br class=""><br class="">I’am somewhat lost, I’am able to set a rule to have the Lua function called for MX requests, but how do I return a response? Spoof ist just for A-records, but not for MX.<br class="">addLuaAction(QTypeRule(dnsdist.MX), luarule)<br class=""></blockquote><br class="">Hi Michael,<br class=""><br class="">As far as I know, dnsdist can't generate MX records, so you'll have to do<br class="">this in the PowerDNS Recursor. Sorry!<br class=""><br class="">In the Recursor it is not very hard to do though, use postResolve to<br class="">override all MX records you see in responses.<br class=""><br class="">This makes sure you don't invent MX records for domains that don't have<br class="">them.<br class=""><br class="">Also be aware that if there is no MX record for a domain, a mail server<br class="">might decide to send email directly to the A record.<br class=""><br class="">Good luck!<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Bert<br class=""></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="">Thanks Bert you saved my day, will switch over to recursor.</div><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=""></div><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="">—Michael</div></div></div></div></div></div></body></html>