Mail.app Assumes Google is the Desired Service for a Self-Hosted Domain I am migrating from Google Apps for Domains to a self-hosted service. After removing my Google account from Mail, and attempting to add my self-hosted account, Mail and System Preferences always default to Google as the provider for my email. DNS records have been switched (mail flow works fine from my self-hosted service).

Every time I attempt to add a new account, it assumes I want the Google account it discovers and not my personal email.

I have uninstalled Gmail from the Google Apps for Domains control panel, but this has not helped (yet). I have also removed my preferences folder for Mail.app, but this does not help either.

I cannot delete or rename this Google account; other services are attached to it.

Any suggestions?

I had previously thought that by changing the passwords to differ after uninstalling Gmail, it was working. However, while it lets you add a different IMAP account, the type is still "Google IMAP", which causes issues when trying to setup the accounts properly (most notably because I also have a self-hosted CalDAV account).

After further testing, I have found that any IMAP account I attempt to create is set as a "Google IMAP" account once I provide the self-hosted domain (meaning, even if I create it with fictitious information and later supply the domain only when I have to). How can I address this?
I was able to finally resolve this. Here's a simplified version of the breakdown (in a corrected order), in hopes that it is helpful to anyone trapped in this in the future:


Setup the self-hosted service
Switch DNS records to point to the self-hosted service
Ensure your Mac or iOS device is aware of this DNS change (e.g. dig domain.com mx in Terminal returns what you expect to see)
Uninstall Gmail and Calendar from the Google Apps for Domains Control Panel (your data will not be lost; you can reactivate them later)
Remove the Google Apps account from your device
Add a new email account with the correct information:

After clicking "Continue" on the screen where you enter your name, email address and password, immediately press "Cancel", then
"Continue" again. This ensures no automatic search for services is
done. (Apparently in a different way than holding the option key
does...)
On each subsequent screen, hold down the option key when clicking
continue and ensure the advanced settings are correct
Confirm the account displays as "IMAP" or "POP" and not "Google
IMAP" or "Google POP"

Add any other accounts.


If you experience trouble with the above, verify that you are certain your local device sees the correct DNS information, remove all accounts from Mail and delete ~/Library/Mail.

Hopefully this helps someone else.