How to rescue blocked files from Gmail

by @edent | # # # # | Read ~144 times.

Six years ago, I developed Android apps (APKs) which I emailed to myself. When I try to download them from Gmail today, I get this rather annoying error.

Anti-virus warning – 1 attachment contains a virus or blocked file. Downloading this attachment is disabled.

Google, in its efforts to protect me from myself, have retroactively blocked certain filetypes from being downloaded.

If you try to forward the mail somewhere else, you get this error.

For security reasons, Gmail does not allow you to use this type of file as it violates Google policy for executables and archives.

Here's how to circumvent their block.

  1. Open up the message.
  2. Click on the on the top right of the message
  3. Select "Show Original" Show Original option in Gmail
  4. Select "Download original" Gmail download screen.
  5. This will download a file called message.eml (Or whatever the subject of your email was).
  6. Install the munpack tool using sudo apt install mpack (Or whatever arcane commands your OS uses).
  7. Run munpack message.eml
  8. Ta-Da! you will now see a message like
    AttachmentName.apk (application/vnd.android.package-archive)
    the blocked file is now downloaded.

I suppose it makes sense for your mail admin to block potentially harmful files. It's just annoying when I file I wrote myself, which I emailed myself, can't be retrieved by myself.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.