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?

  • I can't replicate this. There's no "online/offline" mode, but you can Enable the account. I'm assuming you've unticked this box in Accounts. Instead of doing this - have you tried "Do Not Disturb" in the Notification center? It will silence notifications so you can focus. If it's really critical that you be offline - look at the Outlook Mail app. It has a "Work Offline" feature that you're describing.
    – Allan
    Nov 7, 2020 at 15:56
  • "do not disturb" is useless for me, since I will still be able to see new incoming emails in the inbox. Nov 8, 2020 at 21:46
  • You could try to set up a firewall for mail.app when needed ? (under System Preferences -> Security and Privacy -> firewall)
    – Edd Growl
    Nov 9, 2020 at 20:25
  • Can one define a keyboard shortcut for that ? Nov 9, 2020 at 23:33

3 Answers 3

  • 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:

  1. Go to System Preferences -> Security and Privacy -> Firewall
  2. Click on the lock on the bottom left to make change
  3. Click on "Firewall Option..."
  4. Click on + and add "Mail.app", then choose "block incoming connections" (like transmission in the picture below)

enter image description here

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)

set firewallState to do shell script "defaults read /Library/Preferences/com.apple.alf globalstate"
if firewallState = "0" then
    set firewallStatus to "The firewall is currently set to off (or allow all incoming connections)"
else if firewallState = "1" then
    set firewallStatus to "The firewall is currently set to allow access for specific services and applications"
else if firewallState = "2" then
    set firewallStatus to "The firewall is currently set to allow only essential services"
end if

#change status of the firewall: 0=off 1=on for specific services and 2=on for essential services

display dialog firewallStatus & return & return & "Do you want to enable the firewall?" buttons {"Cancel", "Turn Firewall Off", "Turn Firewall On"} default button 1 with icon 2
set the userChoice to the button returned of the result

if the userChoice is "Turn Firewall Off" then
    do shell script "defaults write /Library/Preferences/com.apple.alf globalstate -int 0" with administrator privileges
end if

if the userChoice is "Turn Firewall On" then
    do shell script "defaults write /Library/Preferences/com.apple.alf globalstate -int 1" with administrator privileges
end if

Finally, you can save it into an .command and active it by a click or use terminal with osascript /Users/USERNAME/Desktop/YOURSCRIPT.applescript

Or set up Automator to create a Mac Application that you can double click, add to the dock, etc.:

  1. Open Automator application
  2. Choose "Application" type
  3. Type "run" in the Actions search box
  4. Double click "Run Shell Script"
  5. Click the Run button in upper right corner to test it.
  6. File > Save to create the Application.

enter image description here

  • thanks! did you check that when you activate this, and all the accounts are offline, you can browse emails in offline mode and the connection does not go back online as @sf71 commented below? Nov 14, 2020 at 7:44
  • You do not need to get your account offline. I believe that you can't browse into disconnected emails account because when you uncheck the box in mail pref (or system pref) mail.app will cut the connection into the mail server and delete all mail to be seen on the computer until connection to the server will be made again.
    – Edd Growl
    Nov 14, 2020 at 8:59
  • But by getting a firewall to block connection, mail.app will still thinks that it's connected to the server and will not erase anything. It will only wait for the server to be back online to receive new mail.
    – Edd Growl
    Nov 14, 2020 at 9:00
  • Ok I see, then I will check all this, thanks Nov 14, 2020 at 9:55

There is not an offline online mode in apple's own mail app as I know, only if you are not connected or you have a problem with auth, it shows as offline mode.

However, you can use LuLu, a 3rd party utility for this task to cut the connection of Apple Mail to WWW. I prefer this, open-source ftw.


I hope this helps you focus :)

  • thanks. curiously, this can not "see" the Mail.app Nov 14, 2020 at 7:40

There seems to be confusion about online/offline -- but i assume you are talking about the options in the top "Mailbox" menu; "Take all accounts online", "Take all accounts offline", and "Online Status". i am on Catalina so maybe those options are not exactly the same for you, but i'm guessing it's something like that.

Anyway, the bad news is: it doesn't work. not the way you would expect. you can make an account offline but as soon as you try to access any of the imap content, it brings itself back online again without asking.

the only way i have found to avoid this without too much inconvenience -- don't get me wrong, this is still very inconvenient -- is to go to "Mail" > "Accounts..." (or "System Preferences" > "Internet Accounts") and select your account, and un-check "Mail". this will render the account disabled but you can bring it back without losing anything by re-checking "Mail" for that account when you are ready for it to be active again.

This is yet another disappointing Mail.app bug that will probably never be fixed because no one recognizes that it exists. but i hope this hacky work-around can help.

EDIT: after trying this again, now i can not see offline content for the disabled account. it was still able to view it when i tested this initially but now the account disappears when it is disabled. i'm thinking it was only working before because Mail was being buggy. i will keep trying stuff and i'll post back if i come up with anything else.

  • thanks a lot, but this is not practical, since I can not read email in "offline" mode Nov 14, 2020 at 7:33

You must log in to answer this question.

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