mu icon indicating copy to clipboard operation
mu copied to clipboard

[mu4e rfe] A way to display whether or not a given message has a valid DKIM signature

Open kuba-orlik opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

I often receive spoofed emails and I have to look into the message source to see whether or not the message is properly DKIM-signed

Describe the solution you'd like In the Article view, display a "DKIM SIGNED" next to headers that were properly signed with DKIM

Describe alternatives you've considered Downloading the .eml file and checking validity of DKIM outside emacs

kuba-orlik avatar Oct 14 '22 16:10 kuba-orlik

I think this should be possible use a custom header which invokes some DKIM tool, i.e., see: https://www.djcbsoftware.nl/code/mu/mu4e/HV-Custom-headers.html

I'd be happy to add it as an example to the manual.

djcb avatar Oct 15 '22 08:10 djcb

Thanks!

I used it to create a custom header like so:

(add-to-list 'mu4e-header-info-custom
  '(:dkim .
     ( :name "DKIM status"  ;; long name, as seen in the message-view
       :shortname "DKIM"           ;; short name, as seen in the headers view
       :help "Whether or not the message is properly signed with DKIM" ;; tooltip
       :function (lambda (msg)
		  (message (format "opendkim -t '%s' | rev | cut -d: -f1 | rev" (mu4e-message-field msg :path)))
		  (shell-command-to-string (format "opendkim -t - < '%s' | rev | cut -d: -f1 | rev" (mu4e-message-field msg :path)))
))))

(needs to have the opendkim package installed)

kuba-orlik avatar Oct 17 '22 17:10 kuba-orlik

Nice. Might be a nice addition for the manual :-)

djcb avatar Oct 25 '22 16:10 djcb