email privacy

Volker Wysk post at volker-wysk.de
Tue Apr 10 13:21:29 BST 2018


Hi!

Am Montag, 9. April 2018, 21:54:06 CEST schrieb E. Hakan Duran:
> Dear all,
> 
> I am trying to improve my email privacy and thought that this would be a great platform to ask questions to a bunch of smart people. I would love to be able to do all this using Kontact/Kmail, so it is not totally off-topic in my opinion.
> 
> The idea is to delete emails from the server upon download, just like the default case for POP3, to decrease their exposure to surveillance by interested parties. However, this has the disadvantage of not being able to access those emails from multiple clients, like smart phone, tablet, etc. One solution I thought as a workaround for this disadvantage was to set up a mail server at home LAN, which would keep the (presumably) only copy of these emails and be accessable by multiple clients. Does anybody here have sucha a set up? Do you think it would work? Does anybody have a more practical/easier solution? I am not too excited about setting up and maintaining a home email server with my level of expertise. I believe it is not within the limits of ISP contract to run an email server at home either, which may potentially  get one in trouble. Additionally, this home email server may get blacklisted, if not set up or maintained correctly, as far as I can tell.Would SMTP relay help prevent it? If SMTP relay is used, will there be a copy of sent emails in the original account's Sent folder?
> 
> Another question is how would this home email server download and delete the copy on the original email account? Would this task require automatic email forwarding by the original account instead? Or would it require another piece of middle man software?

Here is a good guide for what you have in mind:

IMAPS gateway with getmail and dovecot
https://joel.porquet.org/wiki/hacking/getmail_dovecot/

I've done what you are asking for, using dovecot and getmail. Additionally, I've set up a spam filter. This is a short summary which I have posted in the getmail mailing list:

----------
1. I've set up getmail for mail fetching. I'm running it as a Systemd User Service Unit. This means, that the user(s) are in control of their mail fetching and spam filters. All the configuration files are owned by the respective users. And all programs (getmail, bmf, dovecot-lda) run as the user, and not as root - except for the dovecot server, but including dovecot-lda.

2. I've set up bmf to filter the mail. It is run as a filter by getmail. This was simple.

3. Getmail calls dovecot-lda to deliver the mail. This requires some tweaking of file ownerships. Also, rotation of the logfiles need to be set up, because they quickly grow very large.

4. The messages get stored by dovecot. The user's sieve script is applied. Its last sieve rule moves messages, which have been marked as spam by bmf, to the spam folder.

5. The IMAPSieve standard is used to train the spam filter when a message is moved from or to the spam folder. This means, that four scripts (sieve and bash) need to be set up. This way,  bmf, the spam filter, can be trained by moving messages to or from the spam folder, respectively. 

6. However, Kmail brings two buttons named "Spam", and "Ham". It can be configured, what they are to do, by using kmail's filters. I've configured the "spam" button to move the messages into the spam folder (what causes it to be trained as spam). And made the "ham" button to cause the message to be moved to INBOX (causing it to be trained as ham).

7. So we're done. Only one spam filter for all three of my devices (desktop, laptop, smartphone). And it can even be trained by all devices alike.
----------

Bye
Volker




More information about the kdepim-users mailing list