I would like to disable inline attachment previews by default, and instead view all attachments as icons in Mac's Mail app in macOS Mojave.

In High Sierra, the following terminal command was sufficient:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

However this command does not work in Mojave.

How can I accomplish this in Mojave?

  • 1
    You should clarify "does not work". Does the command fail with some kind of error message or does the command succeed but Mail still shows inline attachments? – Max Dec 8 '18 at 14:42
  • In my case it does not produce an error but cannot change the behavior of Mail. – user362752 Jul 13 at 7:48

Applications (including Terminal) do not get "full disk access" (e.g. your user files) any more in Mojave.

Try to grant Terminal access in...
System Preferences > Security & Privacy > Privacy > Full Disk Access

Unlock the system preference panel, by clicking the lock at the bottom left and filling in your password. Then either drag and drop Terminal.app onto the window, or navigate to it by clicking the plus sign (+).

Full Disk Access

Then launch Terminal and try your command again.

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

PS. Alternatively you could disable SIP (System Integrity Protection) from Recovery, run your command, check that it worked and subsequently enable SIP again. Less elegant, usually not advised (in case you forget to re-enable it again), a lot of booting in and out, but just as effective.

| improve this answer | |
  • 1
    Just as clarification: After you ran the command you can remove Terminal from Full Disk Access again as well, just like re-enabling SIP in the other, less recommended way. :) – Gero Nov 21 '18 at 14:43
  • 1
    @Gero Yes, as soon as Terminal has been allowed to write to Mail's preference file, it can be deauthorized again until you need to do the same all over again for some other command. :) – Redarm Nov 21 '18 at 14:53
  • 7
    This does not work for me. I added Terminal.app to Full Disk Access. The command goes through without an error message. – Sebastian Semmler Apr 11 '19 at 15:24
  • The format of the setting is changed defaults write com.apple.mail DisableInlineAttachmentViewing -int 1 works on Catalina - Use -int 0 to disable – Joel Duckworth yesterday

You must log in to answer this question.

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