Delta Chat draining battery with lots of IP queries when blocked

Ahoy. Running Delta Chat on GrapheneOS, using RethinkDNS app as a firewall and DNS blocker to ensure only vetted traffic gets out from device. For Delta Chat, I have allow listed the domains for the chatmail relays, I block anything else. Globally, I block all IP calls which haven’t been resolved via DNS first.

Delta Chat version

2.62.0

Expected behavior

Not exactly sure, but not what it is doing:

Actual behavior

Delta Chat hammers my firewall with connection requests to IP addresses which might have been associated with relay servers sometime ago but which are blocked by my firewall “DNS bypass block”. This can go on for minutes or hours and has actually drained my battery today.

Questions

Is that intended behaviour?

What is it trying to do? How can I stop it?

Also, Delta Chat seems to try and connect to my local DNS resolver despite RethinkDNS being set on using a public resolver… can I stop that?

Delta Chat caches DNS responses. This is on purpose, to avoid “server not found” errors when DNS resolver is not available. This was originally added for a user with faulty DNS resolver that timed out randomly, and we have not seen any “server not found” problems reported since.

There is a similar discussion on GitHub. It may be unexpected for a server admin who changed the IP address in DNS that users sometimes still connect to the old address, but for existing users it is usually an improvement because they don’t lose connection if DNS is misconfigured or if the resolver is broken.

I think you should just allow all Delta Chat connections in RethinkDNS, deltachat is safe enough. blocking connections may just cause Delta Chat to keep retrying, wasting battery and delaying messages. so let the app work instead of making it fight your firewall.

by the way, background activity can increase GrapheneOS’s attack surface, so i think it’s better to close it