February 19, 2017

Gmail Blocks JavaScript Attachments

If you try to send a JavaScript attachment using Gmail or if you want to download a .js attachment, you'll get a new anti-virus warning: "Blocked for security reasons", "1 attachment contains a virus or blocked file. Downloading this attachment is disabled".


.JS has been added to the long list of file types that are blocked by Gmail for security reasons. The full list: .ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JS (NEW), .JSE, .LIB, .LNK, .MDE, .MSC, .MSI, .MSP, .MST, .NSH .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH. "To prevent against potential viruses, Gmail doesn't allow you to attach certain types of files, including: certain file types (listed above), including their compressed form (like .gz or .bz2 files) or when found within archives (like .zip or .tgz files), documents with malicious macros, archives whose listed file content is password protected, archives whose content includes a password protected archive."

The GSuite Blog informs that "for inbound mail, senders will get a bounce message explaining why the email was blocked. If you still need to send .js files for legitimate reasons, you can use Google Drive, Google Cloud Storage, or other storage solutions to share or send your files."

You can still send JavaScript files using Gmail if you change the extension. What about downloading old .js attachments? Try the workarounds from this post.