// how to fix
Gmail "552-5.7.0 ... content presents a potential security issue": blocked attachments fixed
Gmail blocked your email because of a risky attachment: executable, script, macro or protected archive. See which files are blocked and how to share them.
What it means
Gmail refused your email because of its content, almost always an attachment that Gmail considers dangerous. The bounce usually looks like this:
552-5.7.0 This message was blocked because its content presents a potential 552-5.7.0 security issue. Please visit 552-5.7.0 https://support.google.com/mail/?p=BlockedMessage to review our 552 5.7.0 message content and attachment content guidelines.
This is not about your IP or domain reputation. The same email without the risky file would usually be delivered.
Why it happens
Malware is often sent as attachments, so Gmail blocks whole families of files, even if yours is harmless:
- Executable and script files, such as
.exe,.msi,.bat,.cmd,.com,.scr,.js,.vbs,.ps1,.jar,.dlland.lnk. - Disk images like
.iso,.imgor.vhd. - Archives containing these files: a
.zip,.raror.7zwith an executable inside is blocked too, even if you renamed the file. - Password-protected archives that Gmail cannot scan, especially when they contain other archives.
- Documents with malicious macros, such as some Word or Excel files from old templates, or files flagged by antivirus.
- Links to sites known for malware or phishing can also trigger this error.
Google publishes the full list of blocked file types in its Gmail help pages.
How to check
- Look at the attachments of the email that bounced. Check the real extension (Windows hides known extensions by default) and what is inside any archive.
- Send the same email to Delivmail: on the home page (
/), copy your unique test address and send the exact same message. The report shows the SpamAssassin result and the links found, which helps spot a suspicious link. - Send it again without the attachment to the Gmail address. If it arrives, the file was the cause.
- Scan the file with antivirus software. If it is infected, do not send it at all.
How to fix it
- Share the file with a link instead. Upload it to a cloud storage service (Google Drive, OneDrive, Dropbox or your own website) and send the link. This is the recommended way for software and installers.
- Do not rename extensions (for example
setup.exetosetup.txt) to get past the filter. Gmail inspects file contents, and this looks exactly like what malware does. - Avoid password-protected archives for normal documents. If you need confidentiality, use a secure sharing link.
- Remove macros from documents. Save Word and Excel files as
.docxor.xlsx(no macros) or export to PDF. - Check your links. Remove links to domains that appear on blacklists; you can test them on
/blacklists. - If your system sends automated emails with attachments (invoices, reports), make sure it sends standard formats like PDF and that the generating server is not infected.
Check that it is fixed
Send the new version of the email (with a link or a safe file format) to a new Delivmail test address and check that the report looks clean. Then send it to the Gmail address that bounced. The effect is immediate: there is no reputation to rebuild for this error.
Check that it is fixed
DNS changes can take from a few minutes to a few hours. Then send a new test email or scan your domain again.
Related guides
- Move DMARC from p=none to quarantine or reject safelyp=none only watches. To really stop fake emails using your domain, move step by step to quarantine and reject, without blocking your own emails.
- Your sending IP address is on a blacklistA blacklist is a public list of IP addresses known for sending spam. Find out if the IP is yours, fix the cause, then ask for removal.
- Your domain is on a blacklist (Spamhaus DBL, SURBL, URIBL)Domain blacklists list domain names seen in spam. They follow your domain wherever you send from. Find the cause, clean up, then request removal.
- Gmail and Yahoo bulk sender requirementsSince 2024, Gmail and Yahoo require large senders to authenticate their emails, offer one-click unsubscribe and keep spam complaints very low. Here is the checklist.
- Your emails land in Gmail's spam folderWhen Gmail sends your emails to spam, the cause is almost always authentication, reputation or content. Here is how to find which one and fix it.