What is EICAR?
The EICAR test file is a standard antivirus test signature designed by the European Institute for Computer Antivirus Research. It is not actual malware — it is a safe, 68-character string that every major antivirus engine recognises and flags as a threat.
Because every compliant scanner treats this string as malicious, the EICAR test file is the industry-standard way to verify that virus scanning is working correctly — without introducing any real risk to your systems.
This makes it perfect for testing EmailConnect's attachment scanning on your Business+ plan. You can confirm that infected files are detected, flagged, and excluded from webhook payloads before going into production.
You can download the official test files from eicar.org.
How to test
Download the EICAR test file
Go to eicar.org and download the test file. The .zip version works best as it bypasses most email client filters that would otherwise strip the attachment before sending.
Send an email with the EICAR file attached
Compose an email and attach the EICAR .zip file. Send it to your Business+ alias (e.g. test@in.yourdomain.com).
Check your webhook endpoint
The infected attachment will be flagged and rejected in the webhook payload. You will see the excluded and excludeReason fields on the attachment object, and the top-level security.virusScan summary will report the threat.
What the payload looks like
When EmailConnect processes an email with attachments on a Business+ plan, each attachment includes a virusScan object. Here is the difference between a clean file and an infected one:
Clean attachment (normal file)
{
"filename": "invoice-1042.pdf",
"contentType": "application/pdf",
"size": 48210,
"downloadUrl": "https://app.emailconnect.eu/attachments/.../download",
"virusScan": {
"status": "clean"
}
}Infected attachment (EICAR test file)
{
"filename": "eicar_com.zip",
"contentType": "application/x-zip-compressed",
"size": 184,
"excluded": true,
"excludeReason": "virus-detected",
"status": "rejected",
"virusScan": {
"status": "infected",
"threat": "Eicar-Test-Signature"
}
} Notice that the infected attachment has no downloadUrl. The file is excluded from the payload entirely — your application never receives the malicious content.
The security summary
Every Business+ webhook payload includes a top-level security.virusScan object that summarises the scan results for the entire email. This gives you a single place to check whether any threats were found:
{
"security": {
"virusScan": {
"scanned": true,
"engine": "clamav",
"engineVersion": "1.5.1",
"attachmentsScanned": 1,
"threatsFound": 1
}
}
}scanned— whether virus scanning was performed (alwaystrueon Business+ plans)engine— the antivirus engine used (clamav)engineVersion— the ClamAV version at the time of the scanattachmentsScanned— total number of attachments that were scannedthreatsFound— number of attachments that tested positive for malware
Handling rejected attachments in your webhook
Your webhook handler should check for rejected attachments and handle them appropriately.
// Express webhook handler
app.post('/webhook', (req, res) => {
const { message, security } = req.body
if (security?.virusScan?.threatsFound > 0) {
console.warn('Threats detected:', security.virusScan.threatsFound)
}
for (const attachment of message.attachments) {
if (attachment.excluded && attachment.excludeReason === 'virus-detected') {
console.warn(`Rejected: ${attachment.filename} — ${attachment.virusScan.threat}`)
continue
}
// Process clean attachment
processFile(attachment)
}
res.sendStatus(200)
})Related
Need help setting up virus scanning? Get in touch at hello@emailconnect.eu.