GMail: Illegal Attachment Causes Bounced Messages when Sending EXE files

Certain files are not allowed to be sent through Gmail. Here is how to get through this restriction.


Google has blocked the sending of certain types of files through Gmail that have high abuse potential. You will notice this mainly when you try to send executable files such as *.exe files or archive files (*.zip) that contain executable files.

If you try to send these, your email will bounce, and you will receive an error like this:

: host gmail-smtp-in.l.google.com[64.233.xxx.xx] said: 552
5.7.0 Illegal Attachment 38si976657nzk

If you need to send the file anyway, you simple need to rename your file to something that is not blocked. I typically rename everything to *.bak. Be sure to tell the receiver of your email to rename it once they receive it.

Renaming files can be tricky because Windows hides the file extensions by default. Here is how to rename them:

    1. Open Explorer, and browse to the file you want to rename.
    2. Click the Tools menu.
    3. Click Folder Options.
    4. Click View tab.
    5. Uncheck Hide extensions for known file types.
    6. Click OK.
    7. Now, you should be able to see the extensions of your files.
    8. Right-click on the file.
    9. Click Rename.
    10. Rename the file, and change the ending. For example, change putty.exe to putty.bak.
    11. Now, you can send the file through Gmail like any other attachment.
    12. The receiver of the email will need to rename it back so that he or she can use the file correctly.

Point them to this recipe if your email reciever needs assistance.

The Conversation

Follow the reactions below and share your own thoughts.

  • Idiots

    And there I was thinking that Microsoft was the only idiot company in the world…

  • Vince Grey

    You can also zip the file twice, as in a zip file in a zip file. As it’s that stupid simple to get around, I don’t know why they even bother…

  • Nick

    I have to send a JS code which some hacker placed on a client’s website. GMail doesnt let me send that even if I copy the code to a text file and rename it to .bak as you explained.

    • Anonymous

      Put it into a word document or something. Another option is take a picture and paste the code into the comment section of the jpeg file.

  • Jay

    Good one, I was getting this frequently, now i know why, thx 4 sharing 🙂