There are some non-data-harvesting (at least what they claim) providers for low or no cost (like the blackfriday deals or zoho free-tier before 2018) which can be considered for the host of those less important mailboxes. Such providers are usually not in the country I am living and it will get complicated if sh*t happens. Therefore, I consider those mailboxes less trustable and do not store critical content there. Even in this situation, it is still worth to minimize the information leakage. For instance, the mail provider I am with or moving to can read or scan all history of my mail contents, or run any algorithm on my mail storage any time they want; a person guessed or cracked my login password can read all conversation details.
The fundamental trust problem does not need to be (neither can be) solved. However, an encryption of mails, even just from the client side, reduces the leak of the privacy at least in the situations mentioned above. Besides, copying these post-encrypted mails between IMAP servers does not reveal the mail body to the target server anymore. Time to merge the university emails during my bachelor/master from an offline backup (since the university accounts have been expired) to my current main IMAP box, so that they become searchable again.
I am using mutt since 2007. Its searching
function, batch operations and customizability are much better than the others;
while having all features, it is still simple and fast. Especially, it became
the only acceptable mail client in the last 13 years whenever my PC hardware
was outdated, on a remote machine or when a precise control of the mails is
needed. Mutt has
commands, but no encryption of an existing mail is possible.
After digging in GitHub, I found the script
Mike Cardwell and modified it for my purpose.
The mutt configuration is as follows:
apt install libmail-gnupg-perl libparse-mime-perl
~/.mutt/postencrypt.muttas follows, replace
email@example.com your GPG key or email
# vi:ft=muttrc set firstname.lastname@example.org set my_editor=$editor set editor="perl $HOME/.mutt/postencrypt.pl $my_recipient +%s" pushHere, “push” is used instead of “exec”, since “exec edit”
and “set editor” does not work together in sequence. "<edit><enter-command>set editor=\$my_editor<enter>"
E’) in the muttrc:
macro index E "<enter-command>source $HOME/.mutt/postencrypt.mutt<enter>" "Encrypt an email"