Take the 2-minute tour ×

I got a lot of emails with uncompressed formats (like bmp, txt, ...) that I want to keep inside my IMAP-inbox, so I can access them from all my devices (Windows, Linux, ios, Android).

Those emails take much disk space and bandwidth on synchronizing.

How could I compress them retrospectively?

1. workaround

One workaround for me is to compress them after I received them:

  1. Move the email into the drafts folder.
  2. Edit the email there. (For example, remove the attachment and add a it again after you compressed it, or use the Auto Compress File Addon in Thunderbird)
  3. Save the draft email
  4. Move it from your draft-folder back to your inbox. (without sending it)

There are two big drawbacks in this approach:

  1. The timestamp changes, so the mail seems to be received just now.
  2. The sender-email changes to your own.

2. workaround

Another, a bit better workaround would be to forward that email to myself and compress the attachment this time.

Then I could delete the attachment from the original mail and will only see it if I look at the whole conversation.

Is there a solution to this?

I don't want to archive the attachments outside of Thunderbird.

I want to keep them inside my IMAP-mail-folder, so I have them on all my email-clients on all my devices.

The best way would be a Thunderbird addon that does the job where I could press "compress Attachment" on every email. (But there only exist addons that compress before sending.)
see also https://bugzilla.mozilla.org/show_bug.cgi?id=852095

share|improve this question
If on windows, you could simply compress the directory where thunderbird stores your mail. On Linux, you can do this also but need something like Fusecompress code.google.com/p/fusecompress. In either of these cases, this is only compressing the actual email messages and would not be as good (in the case of BMPs) as converting them to jpegs with compression. But it is transparent and fairly easy. –  SuperMagic Mar 7 '13 at 15:14
For IMAP you are looking for a solution on the server. So which server OS and email are you using? –  harrymc Mar 11 '13 at 18:49
I use debian squeeze, courir, postgres. But I would rather solve this with an email-client program, so I could use that solution in every server configuration. –  rubo77 Mar 11 '13 at 19:08
There is still no acceptable solution to this. I need a solution, that really compresses the attachment inside the email that stays on the IMAP folder –  rubo77 Mar 18 '13 at 9:52
if you have mails which are signed, compress attachment will destroy the data integrity, and make signature invalid –  LiuYan 刘研 Mar 18 '13 at 12:51

2 Answers 2

If on windows, you could simply compress the directory where Thunderbird stores your mail.



share|improve this answer
An upvote for this nice idea, but no solution for me, cause I would have to install this compression on all my clients (difficult on android and my iphone) –  rubo77 Mar 7 '13 at 17:18
What? You're running thunderbird on an iphone? So... assuming you're not running Thunderbird on IOS (since I'm pretty sure there isn't such a beast, but could be wrong :-) it now sounds like you're, perhaps, keeping copies of these bmps on... multiple devices for "documentation purposes"? Is that right? Or are these "clients" the ones sending you the bmps? If that's the case, then compressing your mail folder on your computer will compress the email you've received. as stored on disc. If that not what you wanted to do? Can you clarify the situation? –  SuperMagic Mar 7 '13 at 17:28
you are right, the tag "Thunderbird" is obsolete here, i will edit the question, the mail client is not important. BMP is only one uncompressed format, I receive. I also get large TXT files and so on at work. And I would like to keep those mails all in my IMAP folder. –  rubo77 Mar 7 '13 at 17:34
Well, if you're keeping them on the IMAP server, then compression on your computer, or sender's is irrelevant. Compression then would need to be done on the IMAP server to see any savings (except when you download an attachment/message to your local device, that'll still require a full download of the appropriate size). If you control the IMAP server, then use the same compression techniques I already mentioned to compress the directory where it stores email. Are you saving the BMPs and large text messages on the server, or just the text? –  SuperMagic Mar 7 '13 at 17:40
Ok... so compression of the directory the server stores mail in is a partial solution. You may also be able to hook emails on arrival at the server and convert/compress attachments, but that's a whole other ball of WTF, I'm sure, and very dependent on the actual mail server and what it allows to happen on mail-receipt. This would happen at the same time as AV hooks. IMAP does support a COMPRESS extension (deflate), but that's probably on a server-by-server basis, and perhaps depends on the clients supporting the option. But I'd guess most newer ones do. No idea, alas, how to enable that. –  SuperMagic Mar 7 '13 at 17:52

If you have your own server you can install MailScanner and set "Zip Attachments = yes" in the configuration - this will combine all incoming attachments into a single .zip file.

When it comes to a client-specific solution you might be out of luck as incoming email integrity happens at the server-side unless you have a server that allows you to explicitly change that.

share|improve this answer
The client-integrity is not given at all, see Thunderbird Addon Subject Manager that changes the subject of emails inside Thunderbird: addons.mozilla.org/de/thunderbird/addon/subject-manager –  rubo77 Mar 18 '13 at 12:09
Unfortunately the MailScanner solution wouldt't help compressing the attachments retrospectively inside my already 1.5GB large IMAP folder. –  rubo77 Mar 18 '13 at 12:16
What the client can do to it's own files (client-integrity) is separate from what the server can do to the files stored on it. If the client wants to modify emails (or attachments within emails) that are on the server and can be retrieved by other devices the server has to allow that to happen - changing it on the local machine doesn't cut it and if you aren't hosting your email yourself it's incredibly unlikely to be an option. –  CoryG Mar 18 '13 at 12:16
MailScanner sits betwween the outside world and your email server, you didn't mention wanting to retroactively scan them (it would be possible if you changed servers and imported all your existing mail via SMTP from the old server's database through MailScanner, but modifying the existing attachments is something you would probably have to end up scripting. –  CoryG Mar 18 '13 at 12:18
That's an idea: If I would install MailScanner and then create a new IMAP account on my server, then move all my existing emails to that account inside Thunderbird. would the MailScanner be effective in that procedure and zip all my attachments? –  rubo77 Mar 18 '13 at 12:23

Your Answer


