Darren Pilgrim:
> > if ipv4 is still working you could
> > - modify your local dns resolver to strip the AAAA part in it's answer
> > for the hosts in question
>
> I thought about that, but the domains in question use DNSSEC and I
> generally try not to break other people's protective measures. :)
>
> > - modify your local firewall to *reject* outbound connections to the
> > IPv6 address in question
> > both are not perfect any may have unwanted side effects.
>
> Considered this as well, but I'm trying to get away from maintaining a
> static list of non-static things. Maintaining a host pattern still has
> that problem, but it at least gets me some automation if they renumber
> or rename their MXes, which I've seen them do.
It could be kludged together with a transport map based on tcp_table
or socketmap, plus some clever scripting to generate the right
transport map responses.
Otherwise this requires new Postfix code. Giving this a few minutes
of thought I came up with two designs.
My simplest design is a new configurable DNS reply filter that can
be used to ignore Google AAAA records (but it can also be used to
ignore other results).
/etc/postfix/
main.cf:
smtp_dns_reply_filter = pcre:/etc/postfix/smtp_dns_reply_filter
/etc/postfix/smtp_dns_reply_filter:
#
aspmx.l.google.com. 300 IN AAAA 2607:f8b0:400d:c03::1b
/^\S+\.google\.com\s+\S+\s+\S+\s+aaaa/ ignore
This would go into the Postfix DNS library, where it can be used
to filter queries by all Postfix programs, and provide a new kind
of rope that people can shoot themselves into the feet with.
Downside of this is that it can filter only on things that Postfix
asks for. For example, it cannot be used to filter on Google's NS
records because the Postfix SMTP client does not ask for those.
My not-so-simple design involves a new DNS-based lookup table and
a configurable SMTP client policy table.
/etc/postfix/
main.cf:
smtp_policy_maps = pipemap:{dns:mx, pcre:/etc/postfix/dnsmx.pcre}
/etc/postfix/dnsmx.pcre:
/\.google\.com$/ inet_protocols=ipv4
Query the DNS for MX records for the next-hop domain (usually the
recipient domain). Feed the results one line at a time into the
PCRE table. Disable IPv6 if at least one MX host is a Google host.
This PCRE map should probably not support $number expansions.
This feature makes its own DNS lookups, so it can make queries
that the Postfix SMTP client would not make, such as NS records.
For now, I think that the DNS reply filter is sufficient. It is
a lot simpler.
Wietse