I have successfully used fetchmail and the MTA exim4 to receive mail 
on a Debian 9 machine for several years.  I am now trying to migrate 
this to Debian 11, but fetchmail no longer talks to exim4.
systemctl status fetchmail reports
  ● fetchmail.service - LSB: init-Script for system wide fetchmail daemon
     Loaded: loaded (/etc/init.d/fetchmail; generated)
     Active: active (running) since Sun 2022-07-10 15:08:22 CEST; 
24min ago
     Process: 1113 ExecStart=/etc/init.d/fetchmail start (code=exited, 
status=0/SUCCESS)
     ...
  Jul 10 15:31:06 titan fetchmail[1127]: pop.free.fr: upgrade to TLS 
failed.
  Jul 10 15:31:06 titan fetchmail[1127]: Unknown login or 
authentication error on
roger.price@free.fr@pop.free.fr
  Jul 10 15:31:06 titan fetchmail[1127]: socket error while fetching from
roger.price@free.fr@pop.free.fr
  Jul 10 15:31:06 titan fetchmail[1127]: Query status=2 (SOCKET)
  Jul 10 15:31:06 titan fetchmail[1127]: 6 messages for 
mailbox@rogerprice.org
                                         at mail.gandi.net (40156 
octets).
  Jul 10 15:31:06 titan fetchmail[1127]: reading message
                mailbox@rogerprice.org@mail.gandi.net:1 of 6 (8954 
octets)
  Jul 10 15:31:06 titan fetchmail[1127]: Connection errors for this poll:
                                         name 0: connection to 
localhost:smtp
                                         [127.0.0.1/25] failed: 
Connection refused.
                                         name 1: connection to 
localhost:smtp
                                         [127.0.0.1/25] failed: 
Connection refused.
  Jul 10 15:31:06 titan fetchmail[1127]: SMTP connect to localhost 
failed: Query status=10 (SMTP)
Is anyone listening on port 25? On Debian 9 command ss -lnt | grep :25 
reports
   LISTEN   0   20   127.0.0.1:25   *:*
but on Debian 11 reports nothing.  Try again with command telnet 
localhost 25. On Debian 9 I saw:
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   220 maria ESMTP Exim 4.89 Sun, 10 Jul 2022 14:21:24 +0200
but on Debian 11 I get
   Trying 127.0.0.1...
   Trying ::1...
   telnet: Unable to connect to remote host: Address family not 
supported by protocol
systemctl status exim4 reports
  ● exim4.service - LSB: exim Mail Transport Agent
    Loaded: loaded (/etc/init.d/exim4; generated)
    Active: active (exited) since Sun 2022-07-10 15:08:22 CEST; 25min ago
    Process: 856 ExecStart=/etc/init.d/exim4 start (code=exited, 
status=0/SUCCESS)
    ...
    Jul 10 15:08:22 titan systemd[1]: Starting LSB: exim Mail 
Transport Agent...
    Jul 10 15:08:22 titan exim4[856]: Starting MTA: exim4.
    Jul 10 15:08:22 titan exim4[856]: ALERT: exim paniclog 
/var/log/exim4/paniclog
                                      has non-zero size, mail system 
possibly broken
    Jul 10 15:08:22 titan systemd[1]: Started LSB: exim Mail Transport 
Agent.
Is exim4 listening on port 25? Configuration file /etc/defaults/exim4 
shows:
   # Options for the SMTP listener daemon. By default, it is listening on
   # port 25 only. To listen on more ports, it is recommended to use
   # -oX 25:587:10025 -oP /run/exim4/exim.pid
   SMTPLISTENEROPTIONS=''
so exim4 is configured to listen on default port 25. The file 
/var/log/exim4/paniclog contains multiple copies of the message
   IPv6 socket creation failed: Address family not supported by protocol
Is this my problem?  My file /etc/default/grub contained the line
   GRUB_CMDLINE_LINUX="log_buf_len=1M ipv6.disable=1 net.ifnames=0 3"
I removed the ipv6.disable=1 and rebooted, but this made no difference.
Any hint as to why fetchmail cannot talk to exim4 will be much 
appreciated, particularly since this has been running for several 
years on Debian 9.
Roger