I configured a Dovecot Postfix mailserver on Ubuntu with letsencrypt certificates. It runs fine on mail clients like MacOS mail both in imap and pop3. No errors.
However after adding two accounts to my gmail using pop3 I get 50% of the times a connection error when receiving e-mail:
Connection Error. Server returned error "Connection timed out: There may be a problem with the settings you added. Ple..."
This is the only message I get and it happens seemingly randomly at 50% of the cases the gmail server tries to connect to the server.
I tailed both the mail.log and ufw log but I cannot find anything related to an attempted connection. Turning the firewall temporary off did not change the issue either. Also in more verbose log files there is nothing to show. This makes me consider it is some sort of DNS issue:
I have an A record for IPV4 and AAA for IPV6 there is an @ TXT record for SPF:
v=spf1 a mx ip4:X.X.X.X ip6:X:X:X:X:X:X:X:X a:mydomain.com a:mail.mydomain.com -all
All together I am now running out of options what this Gmail specific problem can be. Anyone has a suggestion where or what to look for?