
It is hard to change the email address your email is coming from when sending email from MobileMe on the iPhone because it will not let you simply change it in settings, like it does from other IMAP accounts. I really wanted to use MobileMe, mainly for the push email and contact/calendar/bookmark synchronization. However, if it did not allow me to keep my current email address at my own domain it was going to be a deal breaker. Luckily, I found a way to still use my existing email address with the iPhone. In order to do this you will need:
- Create an alias with MobileMe
- Modify Postfix configuration
- Forward your email to the new MobileMe alias
- Modify MobileMe account on iPhone to use your Postfix SMTP server
First create an alias with MobileMe, this will be used by your mail server to forward mail to you. For example you could pick username.incoming@me.com. This is needed because we are going to ask Postfix to map your main MobileMe address to your existing one.
Next lets modify the Postfix configuration. For this we are going to use the email address joe@domain.com as our existing email address and assume the postfix configuration files are located in /etc/postfix. First lets create /etc/postfix/smtpgenericmaps with the following content:
username@me.com joe@domain.com
Then edit /etc/postfix/main.cf and add:
# SMTP Outbound From Rewrite
smtp_generic_maps = hash:/etc/postfix/smtp_generic_maps
This will cause any outbound email delivered via SMTP that have a from address of username@me.com to be rewritten as if they came from joe@domain.com. You will need to reload/restart postfix for this change to take effect.
Forward your mail to username.incoming@me.com. On my mail server we are using virtual domain maps, so I updated my virtual alias maps to forward my mail to username.incoming@me.com. You could also do the same thing by using a .forward file or procmail/maildrop. Note: Do not forward to username@me.com, it will cause a loop, do to the smtpgenericmaps and send a NDR to the sender of the email.
Lastly we need to modify the MobileMe account on the iPhone to use the Postfix as the outbound SMTP server. To do this goto Settings -> Mail, Contacts, Calendars -> Your MobileMe Account -> Account Information -> SMTP -> Add or Select your SMTP server.
There you have it! Now when you send an email from your iPhone it will appear to be sent from joe@domain.com rather than username@me.com.









