Auto Setup Mail 10.8.X for Exchange with current user

FastGM3
Contributor

I'm looking for some setup examples to automate the process of configuring Mail at login to use Exchange with the current logged in AD account, OSX 10.8.x. I see some managed preferences in the JSS but they appear to be a little dated.

Is anyone doing this, if so how?

Thanks,
Chuck

16 REPLIES 16

blackholemac
Valued Contributor III

For what it's worth, we have AutoDiscover set up on the Exchange Server and to set up on the client, all we have to do is have the user put in their username, Full name and password. I'm guessing it is possible to automate that somehow. I'm guessing you've already got AutoDiscover though. I'll think on it.

jarednichols
Honored Contributor

~/Library/Mail/V2/MailData/Accounts.plist contains some items that you could try pre-populating and see if it'll work all magic-like. Looks like a lot of the key ones could be pulled from your user's AD info if you're using mobile accounts.

EDIT: Correct path

FastGM3
Contributor

Auto Discover is on. We're going for the magic, it's either magic or hand holding. One (me) would think making the magic happen in Outlook would have been sufficient, but no now we have users that want Apple Mail magic as well. UGH.

Thanks Jared, I'll look at those files.

mm2270
Legendary Contributor III

I'm not sure if the location just changed in 10.8.x but on my box I see it in ~/Library/Mail/V2/MailData/Accounts.plist. Not in the user Preferences folder.
The thing is, that folder path and file don't exist until an Apple Mail account is set up, so you may need to create a blank profile that you deploy to your clients up front, possibly put it into the User Template directory, similar to the Outlook aug setup process from William Smith, and then populate the plist upon login with PlistBuddy in a script for example.

jarednichols
Honored Contributor

You're right, it was ~/Library/Mail.

I just tried an experiment. I took a freshly imaged Mac, no Mail setup yet, and simply copied over ~/Library/Mail/V2/MailData/Accounts.plist from my existing setup with Mail to it. I had to create the V2 and MailData folders.

I opened Mail and all the folder structure in ~/Library/Mail was created, but no mail flowed in. I went into the account settings and saw everything filled in, except for the account password. Once I dropped that in and saved, it worked perfectly.

Looks like there's promise here.

clifhirtle
Contributor II

Can anyone enlighten me on what the difference between pushing down a user-level Exchange setup via Config Profile in Casper vs configuring via (presumably here) MCX/plists? Just tried pushing out an Exchange CF and it appears to configure Contacts (?!) on the target machine but nothing else. Odd.

roiegat
Contributor III

Anyone had any success with this? Were looking to automate the setup process a bit and I think setting up mail for the user would be nice. I've looked at the accounts.plist file but I'm worried about modifying it and sending it to other users since it seems to have unique id's in there.

FastGM3
Contributor

I found this jewel of a python script and some template files yesterday created by our friends in Sweden and IKEA. I haven't incorporated it into deployment via the JSS yet, but after editing a couple files following the instructions in the .py file and running it manually on an AD bound computer it worked very very well.

I was so impressed, I wanted to share it right away. It will configure 10.6, 10.7 and 10.8 Mail.app, AddressBook & iCal with our Exchange server based on the current logged in user. It took a few tries at editing but if you know just enough to be dangerous like me, I'm sure you can get it to work. If you need any help feel free to ask.

Now to figure out how to push this out either the JSS or to just use launchd in my image.

http://code.google.com/p/mail-setup-ews/ click on the downloads link.

Again, not my work so I take no credit. But it was like finding an easter egg ;-)

Good Luck,
Chuck

justinworkman
Contributor

I made a script using PlistBuddy that pre-populates all the information in Accounts.plist. It's not for an exchange account, it's for an IMAP account from a 10.6 mail server, but it works great! If anyone is interested, I'd be happy to share it.

perrycj
Contributor III

@FastGM3 Thanks for the script. Definitely want to use it but couple quick questions..does the templates folder provides in the zip file have to place on each mac in a certain directory? And for the UserData variable, is asking just to name it as a .plist file? Let me know what you think, thanks.

clifhirtle
Contributor II

Tried mod'ing this for 10.9 by adding in additional if-then routines, but I'm now just getting repeated "cannot read iCal_template.plist" messages in the terminal. Anybody else seeing this or running successfully under 10.9?

arlomiller
New Contributor

Justin, I'd love to get that script to try it for deploying IMAP and SMTP (if possible) settings for my users.

Matt
Valued Contributor

Feature Request ;)

bgreeno
New Contributor III

@FastGM3 Sorry to bug you on an old thread, but Exchange via Config Profile is not working well for me and I came across the script you linked. That being said, I'm having some trouble getting it configured as I'm a bit of a novice. What exactly do I need to edit in the script to have it function properly.

Thanks!

ethomas74
New Contributor II

justinworkman I would like the script you use. I am trying to set this up for my students on their MacBook Airs.

listec
New Contributor III

@justinworkman ,

I'd like your script too... even if it might be outdated.

Muito obrigado!