2

I have an email address that I can access via POP3, but which I rarely use. Though it receives quite a bit of email. I cannot use a forwarding feature for this account.

Yet I want to forward incoming mail to my iCloud account.

I do have a dedicated root server running somewhere, which for example could run fetchmail to collect mail from the POP3 server and do something with it. The question is, can fetchmail -- or some other program -- directly forward that email to my iCloud account?

1

I got it working with fetch mail and msmtp. My target was iCloud, so I will leave in the MX of iCloud. First the .fetchmailrc:

poll pop.gmx.net
with proto POP3
user "user@pop-server"
there with password "secretpassword"
mda "/usr/bin/msmtp -- someuser@icloud.com"
options
no keep
ssl
sslcertck
sslcertpath /etc/ssl/certs
set daemon 300

Then the .msmtprc:

account default
host mx6.mail.icloud.com
port 25
auto_from off
from "user@localdomain"
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
domain mx.of.localdomain

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.

0

If you run a local smtp server, this works great:

set daemon 300
poll pop.remote.tld tracepolls proto pop3 uidl auth password port 110 timeout 60
    user "your_username" keep pass "youpassword" smtpname your_other_account@other.tld

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.