I manage a service that recently switched to AWS/EC2 but we have several IP addresses with great email reputation that we'd like to keep sending the email through. We've set up exim to be a satellite on the EC2 instances so that email sent with sendmail locally on that machine will be sent through our existing SMTP server outside of AWS. This works well.
The only problem is that our emails no have the AWS/EC2 hostnames in the message envelopes. This causes problems with people who report the emails as spam which get sent to AWS. For instance, here are example headers I want to not exist:
Received: from ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com ([XX.XX.XXX.XXX]:XXXXX helo=www2.server.com)
by server.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128
(Exim 4.80.1)
(envelope-from <bounce@server.com>)
id XXXXXX-0003Sm-Ex
for user@host.com; Wed, 09 Apr 2014 11:52:43 -0400
Received: from www-data by www2.server.com with local (Exim 4.80)
(envelope-from <bounce@server.com>)
id XXXXXX-0003Kv-9F
for user@host.com; Wed, 09 Apr 2014 11:52:43 -0400
I don't mind the 2nd Received
header, but I need to remove the first one. Is there anyway to set that up?
Update: it seems that the headers_remove: Received
is the right directive to use. But I'm not totally sure where to put it in the config file (actually using WHM/CPanel to manage this server).