Email and Webmail

How do I block emails containing zip attachments

Updated January 2026 10,152 views 1 min read
Email & Webmail | Updated January 2026

If you are receiving spam or phishing emails with .zip attachments, you can create an email filter in cPanel to automatically discard or quarantine messages that contain them.

01. Create the Filter

  1. Log into cPanel > Email > Global Email Filters (applies to all accounts) or Email Filters (per account)
  2. Click "Create a New Filter"
  3. Filter Name: "Block ZIP Attachments"
  4. Rules: Set "Any Attachment" "contains" .zip
  5. Actions: Choose "Discard Message" to silently delete, or "Redirect to Folder" to send to a quarantine folder for review
  6. Click "Create"
Caution

Blocking all zip attachments will also block legitimate files people send you. If you receive zip files from trusted contacts regularly, consider using SpamAssassin instead (cPanel > Email > Spam Filters). SpamAssassin scores messages based on many factors, not just attachment type, so it is less likely to catch legitimate emails. See Greatly Reduce SPAM.

02. Block Other Dangerous Attachment Types

You can create similar filters for other risky file types. Add additional rules in the same filter using "or" logic:

  • .exe - Windows executables (almost always malware in email)
  • .scr - Screensaver files (common malware vector)
  • .js - JavaScript files (used in phishing)
  • .vbs - Visual Basic scripts
  • .bat - Batch files

Need Help With Email Filters?

If you need a more complex filtering setup, our team can help configure rules for your specific needs.

Open a Support Ticket

Quick Recap

  1. Create a filter in cPanel > Email > Global Email Filters
  2. Filter on attachment type containing .zip
  3. Discard or redirect matching messages
  4. Consider SpamAssassin instead if you receive legitimate zip files
  5. Block .exe, .scr, .js too for broader protection

Email filtering · Last updated March 2026 · Browse all Email articles

Share: X in Reddit f Email
  • 158 Users Found This Useful

Was this answer helpful?

Related Articles

Outlook: Error 0x800CCC0D-E

Email & Webmail | Updated January 2026 Outlook error codes 0x800CCC0D and 0x800CCC0E mean...

DKIM: DomainKeys Identified Mail

Email and Webmail | Updated March 2026 DKIM (DomainKeys Identified Mail) adds a digital...

Common Thunderbird Email Errors

Email & Webmail | Updated August 2026 Mozilla Thunderbird is a solid free email client,...

Gmail Send Mail As Error: 535 Incorrect Authentication Data

Email and Webmail | Updated September 2026 If Gmail bounces your message with "535 Incorrect...

Importing and Exporting Email in Horde

Email | Updated January 2026 Horde webmail includes import and export features for moving...



Save 30% on web hosting - Use coupon code Hosting30