Reset custom Mail UserHeaders settings in Terminal

emailterminal

How do I reset the following command?

defaults write com.apple.mail UserHeaders '{"Reply-To" = "reply-to@address"; }'

I had to use this workaround for a problem with the hosting provider that used the same IP address for all outgoing mail. Because of that, my mails kept ending up in Junk mailboxes. That problem is solved now. So how do I reset this command?

Best Answer

To remove all customisations to UserHeaders, use the delete verb in your defaults command:

defaults delete com.apple.mail UserHeaders

To replace the single Reply-To value with a blank entry, use:

defaults write com.apple.mail UserHeaders '{"Reply-To" = ""; }'

The defaults manual page explains other available verbs.