


In iOS and iPadOS, when you swipe a short distance right on an unread message (from left to right), Mail displays a Read button. It’s an efficient way to work through email quickly. Regardless of whether you’re using iOS, iPadOS, or macOS, you can swipe on messages in the message list to perform various actions-some of which you can customize. To restore the settings from the backup, move all get too much email, and while Mail can’t help you get less (other than by making it easy to unsubscribe from mailing lists), it does provide shortcuts for processing your mail more quickly. Running the above in Terminal will kill the Mail process, then regardless of whether that succeeded or not, it will copy the Mail.app preferences property list from its location in the container to your Desktop and empty the property list in its original location, and if this succeeds it will open Mail.app. You could do this by clicking on Mail, or using open -a Mail as we do in the command. Using defaults delete we can delete the entire domain, but since this is within the container we need to provide the full path. You should probably move this elsewhere if you wish to keep it. Using cp to copy the preferences file, a backup is created on your Desktop. Make a backup of the existing settings.Using AppleScript tell application … to quit we can automate this, and ignore if it fails (usually because Mail isn’t running) using the semicolon.

Mac Mail has the bundle identifier so settings are stored in the plist with that name, within the sandbox container for that app. In macOS, preferences can be edited using the command line tool defaults. This creates a backup of the current settings on your Desktop then resets your Mail settings. Osascript -e 'tell application "Mail" to quit' 2> /dev/ null cp ~ /Library/Containers//Data/Library/Preferences/ ~ /Desktop & defaults delete ~/Library/Containers//Data/Library/Preferences/ & sleep 3 & open -a Mail Code language: JavaScript ( javascript )
