Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacFrag

macrumors member
Original poster
Jul 24, 2015
73
33
The Netherlands
Does anybody know how to edit the X-Mailer header on all emails when you send mail?

I want to hide which email program I use.

Now (by default), on every email I send with the Mail program it inserts:

X-Mailer: Apple Mail (2.3445.6.18)

In Thunderbird this is done very easily by creating an empty value of general.useragent.override, but I want to use Apple mail also.
 
Thank you chown33!

I Googled before but did not used the right *key words* apparently (blush).

After setting X-Mailer it still leaks your Mail client info by the Mime-Version header.

To fix that also you can add Mime-Version also to UserHeaders.

Used "Outlook" for example purposes only.

Code:
defaults write com.apple.mail UserHeaders '{"X-Mailer" = "Outlook";"Mime-Version" = Outlook; }'
 
This doesn't work for me with Version 12.4 (3445.104.11)

Also tried:
defaults write com.apple.mail UserHeaders '{"X-Mailer" = "";"Mime-Version" = 1.0;}'

But still showing the version and the client within the header :(
 
Try using the exact example given in post #3. That is, use "Outlook" for both values.

Reboot after changing it. The setting might not take effect immediately.

Copy and paste this command into Terminal:
Code:
defaults read com.apple.mail UserHeaders
Then copy and paste the entire exact output into a post here, to confirm it was set.

If nothing works, then it's possible Apple removed the setting. This has happened before with other apps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.