2

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?

1
  • Someone has met same problem: link
    – caogtaa
    Dec 19, 2012 at 5:53

1 Answer 1

2

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.

1
  • Wrapping the config with an app? Do you mean an Applet with AppleScript. I have no idea how to 'Prompt a dialog for user...'. Thanks for researching this anyways!
    – user14492
    Apr 10, 2021 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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