In Mac Mojave, when I want to focus on work then I switch all email accounts in Mail.app to offline mode. I could of course close the application, for better focus, but can not do it since I need to find reference material in some email folders. But the thing is, even in all accounts are set to offline, I am still getting new emails. How can I fix this?
Mail: all accounts set to offline but still receive emails
emailmail.app
Related Question
- MacOS – Email alerts (dock icon and app sidebar) arent showing up in any more in 10.9
- MacOS – Mail.app refuses to set accounts online
- IPhone – How to organize/receive emails on one account while sending from another
- IMac – Apple mail with multiple accounts, sender not correct
- IOS Mail: Emails are listed in wrong order
- ICloud – Apple Mail: Move thousands of locally stored mails to IMAP accounts
Best Answer
You can define your firewall to block mail.app when activated, then toggling it on/off when needed.
You could also use another app (like Radio Silence) to only block mail.app and keep your firewall running (and I'd personnaly go with that solution). I don't believe Radio Silence has a shortcut but it's really easy to set up & use (literraly launch Radio Silence, drag Mail.app into it and toggle on/off button when needed).
If you prefer to set up an automator script to enable/disable the firewall to block mail.app
First of all set the firewall to block Mail.app:
After that, you can use this script to toggle the firewall:
(this AppleScript allows a user to turn on or off the built in firewall. The script reads and then displays the current state and then presents an option for changing that status. The change happens immediately but the Systems Preference pane needs to be closed out and reopened in order to visually see that change. I found it here)
Finally, you can save it into an
.command
and active it by a click or use terminal withosascript /Users/USERNAME/Desktop/YOURSCRIPT.applescript
Or set up Automator to create a Mac Application that you can double click, add to the dock, etc.:
Run
button in upper right corner to test it.File > Save
to create the Application.