Content9 min read

Attachments in email: PDF, DOCX, ZIP — which triggers spam?

Some file types are blocked outright (.exe, .bat). Others are sandboxed (.zip, .docx). PDF is generally safe but not exempt. The attachment risk hierarchy and the cloud-link alternative every modern sender should default to.

Attachments are a malware-delivery vector and have been since the "ILOVEYOU" era. Every major mail provider treats them with suspicion. The level of suspicion depends entirely on the file type, the sender's reputation, and increasingly on what the sandbox scanner finds when it opens the file. For cold outreach the answer is simple: don't attach anything, link to cloud storage. For ongoing business correspondence it's more nuanced.

TL;DR

.exe / .bat / .cmd / .scr / .vbs are blocked everywhere. .zip is heavily scrutinised, password-protected zip is heavily penalised. .docx with macros gets sandboxed. .pdf is usually accepted but adds latency and weight. For cold outreach use cloud links instead — every time.

The attachment risk hierarchy

From most to least dangerous, by what filters do:

  1. Blocked outright: .exe, .bat, .cmd, .scr, .vbs, .ps1, .js, .jse, .wsf, .msi, .dll, .com, .pif. Gmail rejects these at SMTP. Outlook quarantines. Most enterprise gateways delete them entirely.
  2. Heavily scrutinised: .zip, .rar, .7z (especially password-protected — sandbox can't open them). Macro-enabled Office files: .docm, .xlsm, .pptm.
  3. Sandboxed but usually accepted: .docx, .xlsx, .pptx (modern Office formats, can carry macros and OLE payloads). .iso disk images.
  4. Generally safe: .pdf (still scanned for embedded JS), .csv, .txt, .png, .jpg.
  5. Effectively risk-free: .ics calendar invites, .vcf contact cards, structured RFC content.

Why .exe and friends are blocked

Executable attachments have been the primary email-borne malware vector for 25 years. Every major provider, and almost every enterprise mail gateway, blocks them at the protocol layer. Gmail's policy is documented and explicit.

Renaming an .exe to .pdf doesn't help — content-type and magic-byte sniffing catches it. Putting it inside a .zip helps only briefly: filters extract and scan zips. Putting it inside a password-protected zip with the password in the email body is a known-pattern phishing vector and triggers the heaviest penalty available.

ZIP archives — the password-protected trap

Zip files in legitimate business email are common — packaging a few documents, sending source code, archived deliverables. Filters open them, scan contents, and apply the per-file scoring rules to whatever is inside.

The problem case is password-protected zips:

  • The sandbox can't scan inside.
  • The pattern is heavily abused by ransomware delivery campaigns.
  • Including the password in the same email is exactly what attackers do.
  • Heavy penalty applied; many enterprise gateways block outright.

If you genuinely need to send sensitive files: use a cloud storage link with proper access controls. Don't password-protect a zip and expect to inbox.

Office documents and macros

Modern Office formats (.docx, .xlsx, .pptx) are XML-based and sandbox-scanned for embedded macros, OLE objects, and remote template references. The score impact:

  • Plain document with no macros, no objects: minimal impact.
  • Document with macros (.docm, .xlsm explicit, or macros inside .docx via legacy format): heavy penalty. Many gateways quarantine.
  • Document with remote template / external content reference: heavy penalty (this is a known phishing technique to fetch payload after delivery).
  • Old binary formats (.doc, .xls): legacy sandbox handling, generally accepted but added scrutiny.

For business correspondence, .docx and .xlsx are fine. Avoid sending macro-enabled formats unless absolutely necessary, and warn recipients out-of-band when you do.

PDFs are usually safe — but not exempt

PDF is the most common business attachment and the most accepted by filters. But PDFs can carry JavaScript, embedded files, and fillable form actions. Filters scan for these:

  • PDF with embedded JavaScript: penalty.
  • PDF with embedded executable: blocked.
  • PDF over ~5MB: minor penalty, also user-experience issue (Gmail clip warning, slow render on mobile).
  • PDF with a single full-page image (no extractable text): treated similarly to image-only emails — moderate penalty.

For most business uses — invoices, contracts, reports — PDF is the right answer. Generate clean PDFs from text-based source, keep them under 2MB where possible, and they'll inbox.

File size and message size limits

Hard limits per provider:

  • Gmail: 25MB per message (50MB receive when from Google).
  • Outlook.com: 20MB per message; Outlook 365: 150MB.
  • Yahoo: 25MB.
  • Most enterprise gateways: 10–25MB, varies.

Soft limits matter too. Above ~5MB, latency increases and some mobile clients warn the user before downloading. Above ~10MB, recipients on metered cellular connections may not download at all. For anything above ~5MB, cloud storage links are kinder to recipients regardless of filter behaviour.

Cloud storage is the modern default

Drop a Drive / OneDrive / Dropbox link instead of attaching. Permissions are controllable, file is updateable, you get download tracking, and the email itself is small and clean. For cold outreach: never attach. For business correspondence above 2MB: link instead.

Attachments in cold outreach: don't

Specifically for cold outreach, don't attach anything, ever. Reasons:

  • Attachments from unknown senders are inherently more suspicious — filters apply additional scrutiny when the sender has no relationship history with the recipient.
  • Attachments often won't open in mobile preview, so the recipient bounces without engaging.
  • Recipients are trained to view attachments from unknown senders as risky — they may delete unread.
  • A linked landing page lets you measure interest, version the content, and update without resending.

Cold outreach copy that says "PDF deck attached" is cold outreach with measurably lower reply rates and worse deliverability than the same offer with a calendar-booking link.

What sandbox scanning actually does

Major filters (Gmail's VirusTotal-derived scanner, Microsoft Defender, Mimecast, Proofpoint) open attachments in an isolated VM and watch what they do:

  1. Static scan: signatures, magic bytes, embedded payloads.
  2. Dynamic scan: open in a sandboxed Office / PDF reader, watch for suspicious actions (network calls, file system writes, process spawns).
  3. Reputation: file hash checked against known-good and known-bad databases.

This adds 30 seconds to several minutes of latency to delivery of attachment-bearing messages — another reason to avoid attachments for time-sensitive cold outreach.

Practical rules

  • Cold outreach: zero attachments. Use cloud links.
  • Business correspondence: PDF preferred for documents, .docx for editable, .xlsx for tables.
  • Never password-protect zips delivered via email.
  • Never include macros unless out-of-band agreed.
  • Stay under 5MB; use cloud link for anything larger.
  • Don't rename file extensions to hide types — magic-byte detection catches it instantly.

Frequently asked questions

Can I attach a PDF on a cold email if it's a media kit?

Technically yes, in practice no — your reply rate will be lower than the same email with a hosted media-kit page link. The attachment friction (download, open, no clear way to share with colleague) outweighs the convenience.

Why does my password-protected ZIP keep going to spam?

Because that's exactly the pattern ransomware uses. Filters can't scan inside, the password-in-body convention is a known abuse pattern, and the combination triggers heavy penalties everywhere. Use a cloud storage link with access controls instead.

Do calendar invites (.ics) trigger spam filters?

No — .ics is structured calendar data, well-understood by filters, and treated as benign. Calendar invites from unknown senders may still be filtered for unrelated reasons (recipient hasn't accepted you), but the file format itself is risk-free.

Are inline images (cid: references) treated as attachments?

Yes — they're technically attached parts in MIME terms. They're also scanned. Inline images are far less suspicious than attached documents because they're part of the rendering, not a separate downloadable file. Use them freely; they don't add measurable spam risk.
Related reading

Check your deliverability across 20+ providers

Gmail, Outlook, Yahoo, Mail.ru, Yandex, GMX, ProtonMail and more. Real inbox screenshots, SPF/DKIM/DMARC, spam engine verdicts. Free, no signup.

Run Free Test →

Unlimited tests · 20+ seed mailboxes · Live results · No account required