Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove MS Exchange Public Folders from Mail.App Apps
In an older hint, I explained how to avoid Mail.App checking Exchange Public Folders by linking the folder to /dev/null. While this tip works to some extent, it was never an ideal solution I was comfortable deploying to all of our Mac users. Recently, this has posed a problem for our Tiger users, who have to click 'OK' multiple times to avoid permission errors when Mail.App tries to poll all of the public folders.

Just recently, I was told of another way to completely remove Exchange Public Folders from appearing when using Mail.App (or any IMAP client). This is not exactly a 'Mac OS X' hint, as it involves making a change in Windows Active Directory. Therefore, you'll have to coordinate with your network administrators and request this change. Since I am also the Network Administrator, I was able to make this change myself ;).

Here's what I did:
  1. As a Domain Administrator, you have to run the "Active Directory Users and Computers" MMC snap-in.
  2. Find the user account you wish to change and select "Properties".
  3. Select the "Exchange Features" tab.
  4. Select "IMAP4" then click "Properties..."
  5. Un-check "Use protocol defaults."
  6. Un-check, "Include all public folders when a folder list is requested."
  7. Click "OK" twice to save changes.
After a few minutes, and after closing and opening Mail.App a few times, my "Public Folders" completely disappeared (I'm not sure the exact sequence required). The beauty of this solution is that this only affects "IMAP clients," so when I use the full PC Outlook (or even the web-based Outlook client), I can still access the public folders.
    •    
  • Currently 3.33 / 5
  You rated: 5 / 5 (6 votes cast)
 
[36,089 views]  

Remove MS Exchange Public Folders from Mail.App | 15 comments | Create New Account
Click here to return to the 'Remove MS Exchange Public Folders from Mail.App' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remove MS Exchange Public Folders from Mail.App
Authored by: MacMuse26 on Oct 11, '05 06:49:52AM
... after closing and opening Mail.App a few times, my "Public Folders" completely disappeared ...
The delay is natural, and a result of domain replication/synchronization. If you control all domain servers in the AD environment, you can force a replication from the "AD Sites & Services" MMC, but that will be of limited impact since the Exchange server must "see" the new settings and that can't really be rushed. In general, just give it 10-15 minutes and let nature take its course.

[ Reply to This | # ]
Another Option
Authored by: googoo on Oct 11, '05 07:54:45AM
I found another solution (I can't remember where, though). Quit Mail. Go to ~/Library/Mail/YourImapFolder in the Finder, and get info on the folder Public Folders. Change your permissions to read only, and apply it to the enclosed items (under the Details section). If you would rather do this in the terminal, navigate to the IMAP folder and enter the command

% chmod -R u=r,go= "Public Folders"

When you start Mail, you no longer get those annoying messages about permissions and public folders.

-Mark

[ Reply to This | # ]

Another Option
Authored by: soosy on Oct 12, '05 10:10:22AM

I'm still getting an "examine" error dialog in Mail after I did this... which is too bad, because this would be simplest. :(



[ Reply to This | # ]
Remove MS Exchange Public Folders from Mail.App
Authored by: makern on Oct 11, '05 08:44:15AM

I accomplished the same thing by entering the root folder name of my account name in the IMAP Path Prefix field found on the Advanced tab of Account Preferences for my Exchange account. I logged into my Exchange account via webmail and copied the Account name (ours happens to be in the form Lastname comma Firstname). Then I pasted this into the IMAP Path Prefix field of Mail.app. I quit Mail.app then relaunched. All the Public folders no longer appear.
This will prevent access to your original folder list such as Sent & Deleted items but new folders will be created once you send and delete a single message. To move your old mail to this new structure, you will have to create these new new folders, remove the IMAP Path Prefix entry then quit & relaunch Mail.app to revert back to the original folder structure. Manually move all your Sent Items and other special folders from the original structure to the newly created subdirectory. Finally re-enter the IMAP Path Prefix and one last quit & relaunch.
This worked for me. Hope it works for others.



[ Reply to This | # ]
Remove MS Exchange Public Folders from Mail.App
Authored by: innate on Oct 11, '05 09:12:42AM
What do you mean when you say you copied the account name? Was it something like DOMAIN\Smith, Jason? An example would help.

[ Reply to This | # ]
Remove MS Exchange Public Folders from Mail.App
Authored by: PancakeMan on Oct 11, '05 12:32:08PM
Okay, first of all, to makern... thank you thank you thank you thank you thank you thank you thank you thank you for helping me accomplish what I've been trying to do for months!!!

To innate: I found the prefix that worked for me by:
  • firing up Entourage (which was set up for an Exchange acct)
  • go to account settings
  • select the mail account and hit "edit"
  • in the first tab ("Account Settings"), copy what appears in the "Account name" box (for me, it was my username in all caps)

    That is what I put in the IMAP prefix box in Mail.app preferences. Good luck!

    [ Reply to This | # ]
  • Remove MS Exchange Public Folders from Mail.App
    Authored by: wackazong on Oct 12, '05 12:26:49AM

    On http://www.larseggert.de/software.html you will find a very nice (and working) perl script which installs an IMAP proxy, with the ability to filter the public folders according to your preferences. Works like a charm, also under Tiger. For launching it under Tiger you should use launchd, and you have to install some perl libraries via Fink, but that is nothing an experienced macosxhints reader should be afraid of :-) I have been using it for about three months now and it works perfectly.



    [ Reply to This | # ]
    Remove MS Exchange Public Folders from Mail.App
    Authored by: makern on Oct 17, '05 07:49:10PM

    You're welcome



    [ Reply to This | # ]
    Remove MS Exchange Public Folders from Mail.App
    Authored by: makern on Oct 17, '05 07:47:42PM

    I have very little experience with Exchange Server as an admin. My account name, as set up by our mail admins, is, using you example, SMITH, JASON (no domain). Yours might be set up differently.
    If you log into your Outlook Web Access server (ie WebMail) using your browser, you will be shown your Inbox. Below the Exchange buttons at the top of the page but above your email list you should see: Account Name: Inbox (ex Smith, Jason: Inbox). This is the account name you should enter in the IMAP Prefix field.



    [ Reply to This | # ]
    The hint that keeps on giving
    Authored by: SuperCrisp on Aug 18, '07 01:36:55PM

    Thanks for this hint. I just used it to make Mail.app usable at a university that insists on putting all its public mail in one domain so that Mail was trying to chew through 80,000 messages when I cranked it up. Argh. Now I can once again check for e-mail from students while swilling coffee off-campus.



    [ Reply to This | # ]
    Remove MS Exchange Public Folders from Mail.App
    Authored by: larse on Oct 12, '05 02:49:56AM
    You can get my IMAP-filtering proxy from http://larseggert.de/software.html, which can filter and hide arbitrary folders, including all or just a subset of the Public Folders.

    [ Reply to This | # ]
    Remove MS Exchange Public Folders from Mail.App
    Authored by: carlivar on Jan 10, '06 09:42:25PM

    I've modified this script to do nothing but change IMAP LIST commands sent by Mail.app to LSUB instead. LIST lists all folders; LSUB only lists subscribed folders. So, run Thunderbird or another email app to set your folder subscriptions, then use Mail.app normally.

    I've sent my changes to Lars and hopefully this will be a command-line option in his excellent script soon.



    [ Reply to This | # ]
    Remove MS Exchange Public Folders from Mail.App
    Authored by: carlivar on Feb 06, '06 12:15:46PM
    Caution when using the described imapfilter.pl
    Authored by: moritzh on May 22, '06 08:05:46AM

    When using Thunderbird.app (running normally) instead of Mail.app (running with the described imapfilter.pl) for the first time after a long time, I discovered that there were more messages in my inbox than displayed in Mail.app! I tried all sorts of things in Mail.app like rebuilding mailboxes, deleting cache files, synchronizing the account, disabling message rules, but nothing fixed it.

    Then I created another account in Mail.app, this time omitting the local imapfilter.pl, and then the missing messages were also shown. I.e. then I had two accounts, one with and one without the imapfilter.pl, and the one without was showing all messages while the one with the filter omitted some messages.

    Ergo: To me it appears that imapfilter.pl is the cause for several messages not showing up in Mail.app, which I very much regret since I had been using this useful filter for a long time, seemingly without problems. Luckily, most of the messages I missed were not crucial. For now, although I'd like to do otherwise, I cannot recommend to use the filter. I have contacted the author about this.

    P.S.: I am using the following version of the script: $Id: imapfilter.pl,v 1.8 2005/10/05 09:34:26 eggert Exp $



    [ Reply to This | # ]
    update: it seems to be a bug in Mail.app's implemtation of "Exchange server", not imapfilter.pl
    Authored by: moritzh on May 22, '06 10:01:21AM

    I spent hours trying everything I could think of before posting the above and `blaming' imapfilter.pl, but of course I could only find the reason afterwards...

    It seems to be a bug in Mail.app's implementation of the "Exchange" account type. Reasons:
    1) When I created a new account of type "IMAP" rather than "Exchange", either using imapfilter.pl or not, I could see all messages.
    2) When I changed my existing "Exchange" account to an "IMAP" account, it worked too. (Note: You can't change it in the GUI. I made the change directly in the com.apple.mail.plist file. It's a bit ugly because you have to re-enter your username and password and you first get a prompt for user '(null)' etc., but it eventually worked for me.) And it stopped working again when I changed the "IMAP" account to an "Exchange" account.
    3) Other steps (deleting cache files, deleting the local copies of the messages on the server, recreating the file "Envelope Index", rebuilding all mailboxes etc.) did not help.

    Note: When you try do repeat anything I did like modify com.apple.mail.plist, ***make a backup of your entire ~/Library/Mail folder!***

    P.S.: My server *is* an Exchange Server of course...
    P.P.S.: Most of the messages I could not see in the beginning were mail delivery failure notifications from my mail system, *but not all*. There were also some `normal' messages in between.



    [ Reply to This | # ]