aws-lambda-ses-forwarder icon indicating copy to clipboard operation
aws-lambda-ses-forwarder copied to clipboard

SPAM checking/detecting/filtering #99

Open peterhough opened this issue 5 years ago • 5 comments

Implemented Tharit's code from https://github.com/arithmetric/aws-lambda-ses-forwarder/issues/99 Included tests and config option.

peterhough avatar Jul 21 '20 22:07 peterhough

Having slept on this - an improvement could be that the config allows you to specify which spam checks to fail on e.g. Spam & Virus only.

Also, is throwing an error the right action? People might have CloudWatch Alarms for errors.

Guidance appreciated.

peterhough avatar Jul 22 '20 17:07 peterhough

@peterhough, thanks for this contribution. It looks good, and I will give it a try.

I like your idea to allow configuration of the spam checks that block the message. The verdicts list with all of the checks is a good default if no configuration is given.

Also I agree that if a spam message is blocked, it would be better not to trigger the same type of error thrown for unexpected failures. To silently discard messages that do not match a forwarded address, the transformRecipients function uses return data.callback(); to call the Lambda's callback function to signal completion of the script.

arithmetric avatar Jul 29 '20 20:07 arithmetric

Just wondering about the status of this PR. @peterhough did you have any thoughts on that feedback? I'd personally love to get this merged so I'm willing to take over the PR if you've run out of bandwidth.

ajhodges avatar Oct 29 '20 17:10 ajhodges

Hi @ajhodges

Thanks for the nudge; the feedback all makes sense to me. Those tweaks just need to be implemented and tested.

At the moment I'm on a limited development environment so if you're happy to pick this up I'm more than happy for you to pick this up.

Cheers

peterhough avatar Nov 01 '20 20:11 peterhough

@peterhough thx for this update; I ended up taking Joe's great work here and updated it to be TypeScript and set it up to be released via the AWS CDK if you are interested (https://github.com/cbschuld/aws-lambda-ses-forwarder-cdk).

cbschuld avatar Jun 25 '22 20:06 cbschuld