Reset custom Mail UserHeaders settings in Terminal


How do I reset the following command?

defaults write 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 UserHeaders

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

defaults write UserHeaders '{"Reply-To" = ""; }'

The defaults manual page explains other available verbs.