Beware of header filtering, when sending to iCloud

Sep 6, 2014 13:40 · 98 words · 1 minute read

It’s well documented that Apple/iCloud has a very obscure filtering policy. Emails are delivered to the server and then disappear.

After switching our mailserver, I ran into another problem that iCloud made all my emails disappear. After playing around with my recently added header checks in Postfix, I found that iCloud expects some of those headers to be present:

/^User-Agent:/  IGNORE
/^X-Mailer:/    IGNORE
/^X-MimeOLE:/   IGNORE
/^X-MSMail-Priority:/   IGNORE
/^X-Sanitizer:/     IGNORE
/^X-Originating-IP:/    IGNORE


On the other hand, removing the internal IP is OK:

/^\s*(Received: from)[^\n]*(.*)/ REPLACE $1 [] (localhost [])$2


Hope this helps, if you run into the same problem.