Quote:
Originally Posted by Maticks
|
Good post. There is a work around for this, if your personal domain is hosted on a mailserver you have control of. I'll give an example, based on what I did.
Warning: The following is quite technical. Unless you're in the same situation as me, and run your own mailservers, you're probably going to be SOL trying to do what I've done here. I can't take any responsibility if you screw up your mail by following these instructions either.
Firstly, some background. I have a domain, stupendous.net, which I host on my own server in a datacenter in QLD. Its nice and fast, I can run whatever I like, and until I had my iPhone I was perfectly happy with just running my own IMAP server on there.
When I got the iPhone I wanted push email for stupendous.net, but you can't do that. You can only fetch every 15/30/60 minutes, which drains the battery. So I worked out a better way.
There are two problems.
1) MobileMe doesn't accept mail for any domain other than me.com and mac.com.
Obviously the solution for me was to forward everything off my account to my me.com address. In my exim .forward file in my home directory, after all of the rules I use to filter mailing lists, I have
Code:
deliver xxxxx@me.com
This happily sends on mail to me.com. The bonus to this is that they do additional spam checking on top of all barrage of spam filtering I do, so I've been getting very little spam in my account.
2) When sending mail from the iPhone, you cannot set the From: address to another domain. MobileMe requires you to send from a me.com or mac.com address.
The dodgy hack here was to configure another SMTP MTA on the iPhone and point it to my server, disable the me.com MTA, and then on my MTA I rewrite the From: address to my stupendous.net address. I only rewrite the From: address, so that bounces go back to my me.com address directly (its bad form to completely obscure the sender).
On my Debian system, it keeps the rewrite rules in /etc/exim4/conf.d/rewrite. So I added a new file there:
Code:
[root@mars] /etc/exim4/conf.d/rewrite# ls -l
-rw-r--r-- 1 root root 230 2007-07-11 16:15 00_exim4-config_header
-rw-r--r-- 1 root root 568 2008-07-17 13:24 31_exim4-config_rewriting
-rw-r--r-- 1 root root 38 2008-07-17 13:24 32_rewrite_domain
32_rewrite_domain:
Code:
xxxxxx@me.com xxxxxx@stupendous.net h
It's numbered 32 to load after the exim4 default rule.
And thats it! If you look at headers for a mail sent from my iPhone, you'll see:
Code:
Return-path:
Received: from smtpin133.mac.com ([10.150.68.133])
by ms022.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14
2008; 64bit)) with ESMTP id <0K44004B3SA3HUH0@ms022.mac.com> for
xxxxxx@me.com; Wed, 16 Jul 2008 20:27:39 -0700 (PDT)
Original-recipient: rfc822;xxxxxx@me.com
Received: from mars.stupendous.net ([202.60.77.116])
by smtpin133.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar
14 2008; 32bit)) with ESMTP id <0K4400DBASA0MY10@smtpin133.mac.com> for
xxxxxx@me.com (ORCPT xxxxxx@me.com); Wed, 16 Jul 2008 20:27:39 -0700 (PDT)
Received: from [123.208.38.83] (helo=[10.164.69.219])
by mars.stupendous.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.69) (envelope-from < xxxxxx@me.com>)
id 1KJK9X-0000LE-3R for xxxxxx@stupendous.net; Thu, 17 Jul 2008 13:27:36 +1000
From: Nathan
Not sure why I bothered obfuscating my email address, as it's pretty obvious. Oh well. Maybe it will confuse the spammers.
Its possible that some other company provides a sender rewriting authenticated SMTP server service. Hell, if you were to offer me money I'd be happy to set one up for you. :P Is there anyone who would be interested in an authenticated SSL SMTP relay with sender address rewriting?
