Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to simplify e-mail account configuration on Mac OS, after a lot Googling I think this work can be done by generating a template profile file (.mobileconfig) from iPCU and deploying this profile.

When I installed the .mobileconfig file, I found the email address in Mail's account setting is not the same as I wrote in iPCU.

Here is a part of .mobileconfig files generated by iPCU:

<key>EmailAccountDescription</key>
<string>alimailtest</string>
<key>EmailAccountName</key>
<string>fullname</string>
<key>EmailAccountType</key>
<string>EmailTypeIMAP</string>
<key>EmailAddress</key>
<string>testuser@testcompany.com</string>
<key>IncomingMailServerAuthentication</key>
<string>EmailAuthPassword</string>
<key>IncomingMailServerHostName</key>
<string>imap.testcompany.com</string>
<key>IncomingMailServerPortNumber</key>
<integer>993</integer>
<key>IncomingMailServerUseSSL</key>
<true/>
<key>IncomingMailServerUsername</key>
<string>testuser@testcompany.com</string>

But unexpectly, after installing this profile, I got "testuser@testcompany.com@imap.testcompany.com" as email address in Mail's account setting. It seems Mac appends the incoming server name after email address mistakenly, this causes failure on mail outsending.

Are there any ways to correct the profile installing? Or one step back, modify Mail's account setting by some program after installing. Or even config Mac Mail's setting without .mobileconfig mechanism?

Anyone help please?

share|improve this question

migrated from stackoverflow.com Dec 19 '12 at 8:14

This question came from our site for professional and enthusiast programmers.

    
Someone has met same problem: link –  caogtaa Dec 19 '12 at 5:53

1 Answer 1

up vote 1 down vote accepted

I finally work around this problem by wrapping the config process with an App.

  1. Prompt a dialog for user to input the email address, remember this value for later use
  2. Write user email address to profile template, the profile template was generated by IPCU and have some sections filled by placeholders
  3. Import profile by "/usr/bin/profiles -I -F %profilename%" command
  4. Open ~/Library/Mail/V2/MailData/Accounts.plist and update the wrong email address with the one in step-1. Done.

Password is required when user launch Mail.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.