title: How to encrypt all mails in a maildir / IMAP-Account with S/MIME or PGP?
body: <p>Hi,</p>
  
  <p>I would like to encrypt all my existing mails at my IMAP Account.
  If a hacker is entering my account, he would be unable to read any of my mails.</p>
  
  <p>I have tried to get a tool, encrypting all mails in a local maildir,
  but did not found a well solution.
  Most solutions encrypt incomming or outgoing mails.</p>
  
  <p>Still encrypted mails should be excluded.
  Does anyone know a such a tool or a good java libary for working with mails including attachments?</p>
  
  <ul>
  <li>Encryption of all not encrypted mails in the dir / account.</li>
  <li>Decryption with default S/MIME or PGP tools is possible</li>
  <li>One Key is used: for example "Archive2017"</li>
  </ul>
  
  <p>Thanks in Advance</p>
  
  <p>Same idea like here:
  <a href="https://serverfault.com/questions/238717/script-encrypting-mails-on-server-maildir-gpg">https://serverfault.com/questions/238717/script-encrypting-mails-on-server-maildir-gpg</a></p>