fetchmail
, as the name indicates, fetches mails from other accounts, forwarding them to the local smtpd
.
Username-password-pairs for authentication are best kept inside a .netrc file, which is supported by fetchmail
.
poll pop.provider.tld proto pop3 user "blubusername" user "blub2username"
poll imap.provider.tld proto imap user "blubusername" ssl sslfingerprint "<fingerprint>" sslcertck sslcertpath /etc/ssl/certs/
The fingerprint is shown via:
fetchmail -vv
The IMAP server's certificate has to be saved using the following command:
openssl s_client -connect imap.provider.tld:995 -showcerts >/etc/ssl/certs/imap.provider.tld.pem
In the resulting file imap.provider.tld.pem
you have to truncate
'BEGIN CERTIFICATE
' and'END CERTIFICATE
'.Then the SSL-hash has to be updated using:
c_rehash /etc/ssl/certs
Verify communication goes via SSL:
fetchmail -v