Open Bug 142794 Opened 22 years ago Updated 2 years ago

should pick up default server values for mail settings from Mac OS Internet settings

Categories

(MailNews Core :: Profile Migration, enhancement)

PowerPC
All
enhancement

Tracking

(Not tracked)

People

(Reporter: Brade, Unassigned)

Details

In the Macintosh OS, there are "Internet" settings for various items including:
  * server type
  * incoming mail server
  * outgoing mail server

When creating a new mail account, these settings should be picked up from the OS
for default values.  It strikes me as very odd that we do pick up some settings
from there but not others (very inconsistent/unpredictable).

Please reassign to proper component/owner if needed.
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → profile-migration
thoughts?
Severity: normal → enhancement
Summary: should pick up default values for settings from OS → should pick up default values for settings from Mac OS
Valid enhancement request...
Summary: should pick up default values for settings from Mac OS → should pick up default server values for mail settings from Mac OS Internet settings
Product: Core → MailNews Core
I don't see any such preferences exposed via the Leopard system preferences pane.  There are accounts in Mail.app, but they're not framed as somehow being system defaults, so I don't think we're violating any user expectations here.  

That said, presumably the account settings are available to the system somehow, since MobileMe knows how to sync them.  It's perhaps worth investigating whether we want to participate in that system, but that sounds like a significantly larger project than what's described here.  Adding hwaara to the CC, as I suspect his Mail.app import work may have given him helpful knowledge here...
After some snooping around with lsof, and also looking through Mail's internal sqlite dbs, I found out that the answer was simpler than I thought: It's all readily available in a well-formed plist (XML) file.

See ~/Library/Preferences/com.apple.mail.plist - if you double-click it, you can browse it with the built-in Property List Editor tool.

Specifically the MailAccounts branch seems interesting. There we can see all accounts, and only care about those with isActive set to true.

There are simple Cocoa and Core Foundation APIs for "browsing" plists from code, of which I use some in the mail.app importer.  Basically what you can do is transform a subset of the plist into a hash-table (NSDictionary) that you can use to fetch the data you want.
How much of this would be solved just by hooking up the mail.app importer to the profile migration code?
(In reply to comment #7)
> How much of this would be solved just by hooking up the mail.app importer to
> the profile migration code?

If I understand you right, I don't think that would help at all; there is no code for importing settings currently. The mail.app importer only handles mail.
Having the importer handle settings too seems like a desirable feature in general.  We could potentially use this bug to track that, or spin it off somewhere else.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.