4

The Mac I use for my business is the same Mac I use for personal stuff. That's why I want certain accounts (the work related ones, not my personal ones) to go offline after working hours. My mail accounts are configured in Apple mail.app under the same user account.

How can I achieve this?

  • I don't have time to formulate a detailed answer right now. But here's at least a hint for you: it works with apple script/automator. If nobody else answers you could at least google around. you should find good tutorials. – cyphorious Sep 6 '13 at 12:16
3

Couldn't you just set Mail.app to check only specific accounts, then re-enable them when you want to check them? In the Advanced options under Accounts, you can uncheck the box to Include when automatically checking for new messages. If this box is unchecked, this account will be ignored when Mail.app checks for new email.

enter image description here

The checking/unchecking of this box can be scripted using AppleScript.

tell application "Mail"
   set enabled of account "NameOfAccount" to false
end tell

This script can then be tied to a macro in an application such as Keyboard Maestro.

  • Yes, that could be a solution. But that means I have to manually enable and disable the accounts when I start working and when I go home. I would like to automate this, if that's possible. – Stan Sep 6 '13 at 7:54
  • 1
    @Stan, see edits above. – Dave Sep 6 '13 at 15:59
  • That's super! Now I can add an event to iCal so the AppleScript will run at 9 am and 5 pm, thank you! – Stan Sep 6 '13 at 17:41
1

Try my script. It uses launchd job to invalidate user name of selected accounts so it will fail to connect to the mail server when Mail.app decides to bring itself online.

https://embswit.wordpress.com/2017/11/19/i-dont-want-to-see-new-emails-in-the-morning-macos

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .