Difference between revisions of "Kmail Sanitize and Decrypt Mails"

From Trinity Desktop Project Wiki
Jump to: navigation, search
(mod)
 
Line 2: Line 2:
  
 
Now here is how to do that:
 
Now here is how to do that:
# save this file [[File:kmail-decrypt-and-sanitise-mail]] in your ~/bin folder or any place else suitable for you.
+
# save the codeblock below as [[File:kmail-decrypt-and-sanitise-mail]] in your ~/bin folder or any place else suitable for you.
 
# chmod a+x /where/you/saved/the/file/kmail-decrypt-and-sanitise-mail
 
# chmod a+x /where/you/saved/the/file/kmail-decrypt-and-sanitise-mail
 
# Open kmail, go to "Settings/Configure Filters ..."
 
# Open kmail, go to "Settings/Configure Filters ..."

Revision as of 08:51, 31 July 2018

This is an example how to create a filter in kmail that removes unwanted headers and automaticly decrypts incomming mails. The decrypt feature was a long standing item on my wishlist: I only need encrypted mails for transport, but not not on my disk.

Now here is how to do that:

  1. save the codeblock below as File:Kmail-decrypt-and-sanitise-mail in your ~/bin folder or any place else suitable for you.
  2. chmod a+x /where/you/saved/the/file/kmail-decrypt-and-sanitise-mail
  3. Open kmail, go to "Settings/Configure Filters ..."
  4. Create a new filter, name it as you like and move it to the top of the list
  5. On the tab "General" leave "Filter Criteria" empty.
  6. set "Filter Actions" to "Pipe Through" and set the program path to /where/you/saved/the/file/kmail-decrypt-and-sanitise-mail.
  7. On the tab "Advanced" uncheck "If this filter matches, stop processing here"

Now all incomming mails get decrypted by default (if a key is present), and some tags are removed (X-UI-Filterresults:, X-GMX-Antivirus:, ... you find them in line 45)

You can of course use the program to change other aspects of mails, you could trigger automatic actions ... whatever you like :)


Enjoy.