#1001253 wl-beta: After network change, cannot fetch email

#1001253#5
Date:
2021-12-07 00:09:05 UTC
From:
To:
Dear Maintainer,

I have wl-beta to pick up Imap email from several places, over ssl.
This all works.
If I suspend my laptop, and resume it somewhere where /etc/resolv.conf
is different (home vs work for instance), any attempt to fetch email
gives:
  mailserver.name/993 Temporary failure in name resolution

Other emacs functions work properly:  I can do
   (dns-query "mailserver.name")
in a *scratch* buffer, and get the correct response.

strace shows an attempt to talk to the old nameserver.

Quitting wl and restarting it does not help.  The only solution is to
exit from Emacs and restart.

#1001253#10
Date:
2022-04-24 01:39:29 UTC
From:
To:
Because dns.el directly uses /etc/resolv.conf.

Wanderlust doesn't directly use /etc/resolv.conf.  Wanderlust uses
Emacs' open-network-stream.  It may fail, because Emacs process
caches /etc/resolv.conf by getaddrinfo/gethostbyname.

A workaround is to install a DNS server locally for caching.

Thanks,
--
Tatsuya Kinoshita