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

Ignore selected IMAP folders using Mail.app Apps
I use Mail.app to read my personal mail via POP and my work email via IMAP. The problem is that my server at work has a lot of IMAP public folders than I am not interested in reading. If you have ever looked in any of the folders, Mail.app will always check the folder for new messages each time it checks for new mail. This is annoying when I am connected via a slow link or simply do not care to check those folders.

There are several ways to avoid unwanted updating of IMAP folders:
  1. Never look in the folder and Mail.app will not try to update the contents (according to my observation - may not actually be true).

  2. If you have looked in the folder, navigate to the ~/Library/Mail directory and delete the corresponding .imapmbox file and/or the sub-folder containing additional .imapbox files.

  3. Create a link to /dev/null in place of the folder you want to ignore. For example, say there is an IMAP folder called "WorkOrders" you don't want to read, do the following:
    ln -s /dev/null ~/Library/Mail/WorkOrders
    Even if you click on the "WorkOrder" IMAP folder, Mail.app does not attempt to read the messages so there is no delay. If you ever decide to want to see the contents of the folder again, simply delete the link and Mail.app will update the contents when you next open the folder.
I'm not sure of any side effects to linking to /dev/null but everything appears to be fine so far.
    •    
  • Currently 2.60 / 5
  You rated: 3 / 5 (5 votes cast)
 
[18,088 views]  

Ignore selected IMAP folders using Mail.app | 12 comments | Create New Account
Click here to return to the 'Ignore selected IMAP folders using Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Ignore selected IMAP folders using Mail.app
Authored by: mahakali on Apr 24, '03 10:58:57AM
I think you can take the IMAP account offline from menubar > Mailbox > Take "someAccount" Offline. When you take the account offline, it'll appear grey and it won't update when you check new mails.

[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: geofflane on Apr 24, '03 12:44:54PM

In this case the idea is to ignore a single folder on the server and not the whole account.

The is a total hack of course, since IMAP has the notion of 'subscribed' folders which would allow you to choose which ones you want to view and which ones you want to ignore.

I encourage everyone who uses IMAP to request this from Apple (I did).



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: Greedo on Apr 24, '03 01:19:49PM

I also suggest that you ask Apple to add the ability to check all your IMAP folders when you check for new mail.

AFAICT, Mail.app only checks the Inbox ... although it will check subfolders if you go into them, as the original author suggested.

Oh, and if you need to change your subscribed folders (which you can't do within Mail.app), you can probably look for a hidden file called .mailboxlist in your home directory on the IMAP server, and change it. However, that file is used (I think) by all your IMAP clients ... so it might not be easy to subscribe to one set of folders from your work machine, and another set from your home machine.



[ Reply to This | # ]
You can say that again
Authored by: rootpoot on Apr 24, '03 02:24:13PM

The fact that Mail.app only checks my Inbox has been driving me nuts since day one. I've complained to Apple about it with every new release of Mail.app, but so far they've ignored my pleas.

If Mailsmith ever gets IMAP support, I'm all over it.



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: mike3k on Apr 24, '03 11:29:39PM

Unfortuately Mail.app ignores the .mailboxlist file and displays
all IMAP folders whether you subscribe to them or not.



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: jaysoffian on Apr 25, '03 03:11:26AM
Here's a work-around to the fact that Mail.app doesn't check all the folders. Save the following applescript as an application using the script editor:

on checkMail()
	tell application "Mail"
		set everyAccount to every imap account
		repeat with eachAccount in everyAccount
			tell eachAccount
				set include when getting new mail to false
				set include when getting new mail to true
			end tell
		end repeat
	end tell
end checkMail

on run
	checkMail()
end run

on idle
	checkMail()
	return 60
end idle

I run this whenever Mail.app is running. This causes every imap account to scan all the folders once a minute. I'm using it with three imap accounts succesfully.

One thing I've noticed though is that the INBOX's sometimes don't update when using just this script, so you may have to run this script in addition to telling Mail.app to check your mail on a regular basis.

---
j.


[ Reply to This | # ]

Ignore selected IMAP folders using Mail.app
Authored by: rotaiv on Apr 25, '03 02:26:36PM

I compiled this script as an Application and it works just great. I
had to select "Application" under "Format" and click the "Stay
open" checkbox for it to work correctly.

For those who want to use this script on a regular basis, you
could remove the Mail.App icon from your Dock and replace it
with this script. This script will automatically start the Mail.app
application, check all IMAP folders and continue to run in the
background.



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: mahakali on Apr 24, '03 04:01:29PM

Gotcha! I have actually requested this feature to sync only inbox
or selected folders (like in Entourage) a while back. It's time
consuming to wait it to sync them all (and who the heck cares
about syncing the Trash & Junks folders.)



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: miles_thatsme on Jan 11, '04 11:26:18PM

Every time I checked my mail, an IMAP folder would get repopulated with a ".lastlogin" message. Deleting the message or enclosing folder didn't work--it respawned. So I did this:

Open the ~/Library/Mail/ folder. Find the offending IMAP subfolder. Drag that subfolder into the "Find in Specific Places" part of the "Find Window". Search for visible and invisible items for ".lastlogin". Get info on that file, and lock it. Presto.



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: alt-adam on Jul 19, '05 07:20:20PM

I was unable to get any of those to work above. I was working on a system that is using Tiger. I ended up doing something similar to the last post.

I locked the "Publc Folders" folder under the IMAP user account folder.



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: treolx on Aug 08, '05 10:55:41AM

And pray how exactly do you do this?

[code] Create a link to /dev/null in place of the folder you want to ignore. For example, say there is an IMAP folder called "WorkOrders" you don't want to read, do the following:

ln -s /dev/null ~/Library/Mail/WorkOrders
[/code]



[ Reply to This | # ]
Ignore selected IMAP folders using Mail.app
Authored by: genericuser on Mar 06, '06 10:16:52AM

This hint doesn't work reliably enough.

I didn't find imapproxy usable enough on a mobile Mac with various methods of connecting to hosts.

So I figured out a better way:

http://kvet.ch/articles/2006/03/03/hack-for-using-exchange-with-mail-app-or-so-long-and-thanks-for-all-the-public-folders



[ Reply to This | # ]