1 [[!meta date="Thu, 07 May 2015 12:34:56 +0000"]]
2 [[!meta title="Claws Mail leaks plaintext of encrypted emails to IMAP server"]]
3 [[!pagetemplate template="news.tmpl"]]
5 [[!tag security/fixed]]
7 We discovered that *Claws Mail*, the email client in Tails, stores
8 plaintext copies of all emails on the remote IMAP server, including
9 those that are meant to be encrypted.
11 - When sending an email, *Claws Mail* copies the email in plaintext to
12 the sending queue of the IMAP server before encrypting the email.
13 *Claws Mail* deletes this plaintext copy after sending the email.
14 - *Claws Mail* drafts in plaintext on the server. An email can be
15 saved as draft either:
16 - Manually by clicking on the **Draft** button when composing an email.
17 - Automatically if you selected the **automatically save message to
18 Draft folder** option in the writing preferences. This option is
19 deselected by default in Tails.
21 **All users of *Claws Mail* using IMAP and its OpenPGP plug-in are affected.**
23 Users of *Claws Mail* using POP are not affected.
27 To know if you are using IMAP or POP, choose <span class="menuchoice">
28 <span class="guimenu">Configuration</span> ▸
29 <span class="guimenuitem">Edit accounts…</span></span> and refer
30 to the <span class="guilabel">Protocol</span> column in the list of
35 Unfortunately, we were not yet able to fix the problem automatically and
36 for everybody. This would require to either modify *Claws Mail* or to
37 migrate to a different application. Refer to the workarounds section to
38 solve this problem in your setup and please warn others around you.
45 Verify the content of your **Drafts** folder
46 --------------------------------------------
48 First of all, verify the content of the **Drafts** folder on the server,
49 either through *Claws Mail* or through the web
50 interface of your email provider. Delete any plaintext email that might
51 have been stored against your will in this folder until now.
53 Then apply one of the other two workarounds to prevent more leaks in the future.
55 Use POP instead of IMAP
56 -----------------------
58 *Claws Mail* can connect to the email server using either the IMAP or POP
61 - With IMAP, *Claws Mail* constantly synchronizes with the server and
62 displays the emails and folders that are currently stored on the
63 server. IMAP is better suited if you access your emails from
64 different operating systems.
65 - With POP, *Claws Mail* downloads the emails that are in the inbox
66 on the server and possibly removes them from the server. POP is
67 better suited if you access emails from Tails only and store them in
68 the persistent volume.
70 To know more, see also this Yahoo! Help page on [comparing the
71 differences between POP and
72 IMAP](https://help.yahoo.com/kb/mail-for-desktop/compare-differences-pop-imap-sln3769.html).
74 POP is not affected at all by this security problem. When using POP,
75 only encrypted emails are sent to the server. So consider switching to
76 POP if you have an email account dedicated to your activities on Tails.
79 1. Choose **File** ▸ **Add mailbox** ▸ **MH…** to
80 create a local mailbox where to download your emails.
82 1. To store the mailbox in the persistent volume, specify
83 <span class="command">.claws-mail/Mail</span> as location.
84 Make sure to type the <span class="command">.</span> before
85 <span class="command">claws-mail/Mail</span>.
87 [[!img claws_mail_leaks_plaintext_to_imap/add_mailbox.png link="no"]]
89 1. Choose **Configuration** ▸ **Edit accounts…**, select
90 your IMAP account in the list of accounts, and click **Delete** to
91 delete it. Doing so does not delete any email stored on the server.
93 1. Click **New** and configure this new account as specified by your
96 - In the **Basic** tab, make sure that the **Protocol** option is set
98 - In the **Receive** tab, click on the **Browse** button of the
99 **Default Inbox** option and select the **Inbox** folder of the
100 mailbox that you created in step 2.
102 [[!img claws_mail_leaks_plaintext_to_imap/select_inbox.png link="no"]]
104 - If you want to keep a copy of the received emails on the server,
105 verify the preferences in the **Receive** tab. We recommend you to
106 disable the **Remove messages on server when received** option
107 until you make sure that the emails are stored in the persistent
110 1. Close the preferences dialog and the list of accounts to go back to
111 the main window of *Claws Mail*.
113 1. Click on the **Get Mail** button to download all emails from the
114 inbox on the server. Emails in other folders are not downloaded.
116 Use local **Drafts** and **Queue** folders
117 ------------------------------------------
119 If you want to continue using IMAP, you should configure your IMAP
120 account to use **Drafts** and **Queue** folders stored in Tails instead
121 of on the server. To do so:
123 1. Choose **Add mailbox** ▸ **MH…** to create a local
124 mailbox where to save your drafts and queued emails.
126 1. To store the mailbox in the persistent volume, specify
127 <span class="command">.claws-mail/Mail</span> as location.
128 Make sure to type the <span class="command">.</span> before
129 <span class="command">claws-mail/Mail</span>.
131 [[!img claws_mail_leaks_plaintext_to_imap/add_mailbox.png link="no"]]
133 1. Choose **Configuration** ▸ **Edit accounts…**, select
134 your IMAP account in the list of accounts, and click **Edit** to edit
137 1. Select **Advanced** in the left pane.
139 1. Select the **Put queued messages in** option, click **Browse**, and
140 select the **Queue** folder of the **MH** mailbox.
142 1. Select the **Put draft messages in** option, click **Browse**, and
143 select the **Drafts** folder of the **MH** mailbox.
145 [[!img claws_mail_leaks_plaintext_to_imap/local_folders.png link="no"]]
150 As for the possible long term solutions to this problem, we are
153 - Getting the development team of *Claws Mail* to [fix the problem upstream](http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2965).
154 We contacted them about this
155 problem already. Please help them provide a technical
158 - Replacing *Claws Mail* with *Icedove* (the name of *Mozilla Thunderbird* in
159 Debian). We have been willing to do so for years and this problem
160 motivates us to move faster.
165 Leak through the sending queue
166 ------------------------------
168 When sending an email from an IMAP account, *Claws Mail* does the following:
170 1. It connects to the IMAP server and stores a plaintext copy of the
171 email in the **Queue** folder on the server.
173 1. It encrypts the email locally.
175 1. It sends the encrypted email through the SMTP server.
177 1. It connects to the IMAP server and stores an encrypted copy of the
178 email in the **Sent** folder on the server.
180 1. It connects to the IMAP server and deletes the plaintext email
181 saved in step 1 from the **Queue** folder.