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

InvalidParameterValue: Duplicate header 'Delivered-To'

Open BuffMcBigHuge opened this issue 5 years ago • 2 comments

I'm seeing this error on several emails. Any insight?

BuffMcBigHuge avatar Jul 05 '19 20:07 BuffMcBigHuge

Is that an error from SendRawEmail?

Download the message from S3 and look for that header. Maybe compare to some messages that are working?

There is a bunch of code that removes headers from the messages. You might just need to add a line for this one too.

Examples:

  // Remove the Return-Path header.
  header = header.replace(/^Return-Path: (.*(?:\r?\n\s+.*)*)\r?\n/mg, '');

  // Remove Sender header.
  header = header.replace(/^Sender: (.*(?:\r?\n\s+.*)*)\r?\n/mg, '');

  // Remove Message-ID header.
  header = header.replace(/^Message-ID: (.*)\r?\n/mig, '');

cregkly avatar Jan 21 '20 09:01 cregkly

Are there any update on this issue? I found some old docs which highlights that Delivered-To header used to prevent loops in some mailing systems. Not sure how AWS handles this headers but if I filter them will it trigger repeated email sending?

sashkeer avatar Dec 22 '22 08:12 sashkeer