[Pdns-users] Spoof MX records
bert hubert
bert.hubert at powerdns.com
Sat Dec 15 08:50:01 UTC 2018
On Sat, Dec 15, 2018 at 09:42:21AM +0100, Bit World Computing - Michael Mertel wrote:
> Hi Aleksandr,
>
> 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.
> addLuaAction(QTypeRule(dnsdist.MX), luarule)
Hi Michael,
As far as I know, dnsdist can't generate MX records, so you'll have to do
this in the PowerDNS Recursor. Sorry!
In the Recursor it is not very hard to do though, use postResolve to
override all MX records you see in responses.
This makes sure you don't invent MX records for domains that don't have
them.
Also be aware that if there is no MX record for a domain, a mail server
might decide to send email directly to the A record.
Good luck!
Bert
More information about the Pdns-users
mailing list