I got it working with
fetch mail and
msmtp. My target was iCloud, so I will leave in the MX of iCloud. First the
with proto POP3
there with password "secretpassword"
mda "/usr/bin/msmtp -- email@example.com"
set daemon 300
Obviously this works only if you have your own MX for your own domain (called local domain in my example). Also if you are targeting something other than iCloud, you need to look up its MX.
I tried using authenticated SMTP with iCloud, so that I don't need to use my own domain with its MX, but that did not work. iCloud would reject the mails with a 550 5.7.0 error: the from mail address was not matching (which is of course true for mails that I received from other people).
Also, the example above runs on Debian stable, assuming some locations for the SSL certificates. You might need to tweak this, as well as the general TLS and SSL behavior.
This setup however runs well enough for me to be useful. There is a 5 minute delay in the
fetchmail polling, but that's ok.