Skip to content

Take email from SparkPost Inbound Relay webhooks and passes attachments through malware scanners

License

Notifications You must be signed in to change notification settings

tuck1s/inbound-relay-malware-scanner

Repository files navigation

Inbound relay malware scanner

This currently uses AttachmentScanner.com , which is a free service (I think it uses ClamAV internally at the moment).

Environment variables

Variable Example value Remarks
SPARKPOST_API_KEY abcdef Get a free account from SparkPost
FROM_EMAIL [email protected] Used for automated service replies. Could be anything you like. Needs to be a sending-domain you've registered with SparkPost
ATTACHMENTSCANNER_API_KEY abcd Get from AttachmentScanner signup
HELPDESK_ENDPOINT https://example.com RequestBin or Runscope makes a great display endpoint, if you don't have one of your own
MAX_ATTACHMENT_SIZE 4194304 Maximum size (bytes) of any single attachement that should be accepted

Notes

AWS Lambda has an annoyingly small Invoke request body payload size limit of 6MB. If you send emails into this service which (with MIME encoding and JSONification) produce a payload that's too large, SparkPost will just keep trying to deliver to your endpoint on a retry schedule. Your code will never see the payload because Lambda rejects it upstream returning a 413 error.

About

Take email from SparkPost Inbound Relay webhooks and passes attachments through malware scanners

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages