Mail servers reject incoming messages carrying attachments that can run code on the recipient's computer. It is the single most common way malware spreads by email.
Refused file types include programs and scripts such as:
.exe .bat .cmd .com .pif .scr .vbs .js .jse .wsf .wsh .msi .msp .reg .dll .sys .cpl .hta .chm .jar .class .lnk .inf .ins .asp .cgi .pl .sh
Office documents that can carry macros — .dot, .xlm, .mdb and their relatives — are refused too.
The message is rejected at the server, so it never reaches the mailbox. The sender gets a bounce explaining why.
Sending one of these files anyway
- Put it in a cloud folder and send a link. This is the safest and works everywhere.
- Rename it before sending —
setup.exetosetup.ex_— and tell the recipient to rename it back. - Zip it, but note that many organisations also refuse archives containing programs.
Note
A ZIP with a password is not a good answer: it can't be scanned, so more and more mail systems refuse it outright.