dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit fe0edaff831757ccbe2372339df4f63cd51b8489
parent a0fed7c5c222bf561185c1f4a7e02705e3e5c098
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Fri, 10 Jun 2016 18:52:01 +0000

.gnus.el: remove User-Agent header.

User-Agent header is removed before sending outgoing messages.

Diffstat:
.gnus.el | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/.gnus.el b/.gnus.el @@ -87,6 +87,21 @@ (add-hook 'message-setup-hook 'rsd/gnus/gpg-setup) +;; headers +(defun rsd/ignored-mail-headers () + "Return regex for headers to be ignored before sending message. + +This function adds 'User-Agent' to the existing regex stored at +`message-ignored-mail-headers'. +" + (let* ((ignored message-ignored-mail-headers) + (ignored-start (substring ignored 0 -3)) + (ignored-end (substring ignored -3))) + (concat ignored-start "\\|User-Agent" ignored-end))) + +;; remove the vanity header for outgoing messages. +(setq message-ignored-mail-headers (rsd/ignored-mail-headers)) + ;; duh, add the vanity header when reading messages. (require 'gnus-art) (setq gnus-visible-headers (concat gnus-visible-headers "\\|^User-Agent:"))