Gmail – How Gmail Detects Executable Files in Encrypted Files

gmail

I encrypted a folder with this command:

tar -zcf - rails_project | openssl des3 -salt -k 123456 | dd of=rails.tar.gz

Attached it to a mail, press send, and voila, error message that I can't attach executable files. How in the world can Gmail know what's inside!?

Best Answer

See this Gmail help page: Some file types are blocked

I'm guessing the "Gmail does not allow you to send or receive files that are corrupted" part is what applies here (but the Gmail programmer neglected to give a more specific error message for this case). That is, Gmail is checking your .tar.gz file and finding that it's invalid.

I'd suggest using a different extension so Gmail doesn't think it's a corrupt tarball. I just tested this hypothesis, and it seems to be correct. I used the .gpg extension, though I'm sure any number of extensions not on their blacklist would work just as well.