Email forwarding with SES
By default, SES requires the sender's email to be verified and this is not working with email forwarding. i.e. I receive an email from 'notverified@exmaple.com' and it's forwarded to 'email@mydomain.com' this won't work because of the mentioned reason as 'notverified@exmaple.com' is not verified with SES.
I'm trying to update the headers before sending emails so that they are sent from my verified emails on my domain, not users' emails.
this didn't work the headers were not changed so I tried to update custom_begin_pre_recipient:
This worked with most of the headers but not all and SES still detects the sender ad 'notverified@exmaple.com'. These are the headers I received:
I get this error:
Is it possible to remove this email 'notverified@example.com' from the headers and make it as if it's sent from 'email@mydomain.com' or an alternative way to send incoming emails to other emails?
ses_forwarded_smtp:
driver = smtp
port = 587
hosts_require_auth = *
hosts_require_tls = *
headers_remove = From:Sender:Return-Path:Return-path:DKIM-Signature:Reply- To:Envelope-From:Received:X-Authenticated-Sender
headers_add = Envelope-From: $local_part@$domain
headers_add = X-Authenticated-Sender: $local_part@$domain
headers_add = Reply-To: $sender_address
headers_add = X-Original-Sender-Address: $local_part@$domain
headers_add = From: $local_part@$domain
headers_add = Sender: $local_part@$domain
headers_add = Return-Path: $local_part@$domain
max_rcpt = 1
return_path = ${srs_encode {SRS_SECRET} {$local_part@$domain} {$domain}}
this didn't work the headers were not changed so I tried to update custom_begin_pre_recipient:
warn
domains = +local_domains
remove_header = From
remove_header = Sender
remove_header = Return-Path
remove_header = Return-path
remove_header = DKIM-Signature
remove_header = Reply-To
remove_header = Envelope-From
remove_header = X-Envelope-From
remove_header = X-Authenticated-Sender
add_header = Envelope-From: $local_part@$domain
add_header = X-Authenticated-Sender: $local_part@$domain
add_header = Reply-To: $local_part@$domain
add_header = X-Original-Sender-Address: $local_part@$domain
add_header = From: $local_part@$domain
add_header = Sender: $local_part@$domain
add_header = Return-Path: $local_part@$domain
add_header = Return-path: $local_part@$domain
add_header = X-Envelope-From: $local_part@$domain
remove_header = ReceivedThis worked with most of the headers but not all and SES still detects the sender ad 'notverified@exmaple.com'. These are the headers I received:
Return-Path:
Delivered-To: email@mydomain.com
Received: from hostname.mydomain.com
by hostname.mydomain.com with LMTP
id P1OrDxKyg8AZjHKjQ
(envelope-from )
for ; Tue, 18 Jul 2023 15:38:58 +0000
Return-path:
Envelope-to: email@mydomain.com
Delivery-date: Tue, 18 Jul 2023 15:38:58 +0000
Date: Tue, 18 Jul 2023 15:38:08 +0000
To: email
Subject: Subject
Message-ID:
Feedback-ID: 21140702:user
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_4wAzkOkVR8ZDkTtuq7xT8pYLfUNrQEvrE"
Envelope-From: email@mydomain.com
X-Authenticated-Sender: email@mydomain.com
Reply-To: email@mydomain.com
X-Original-Sender-Address: email@mydomain.com
From: email@mydomain.com
Sender: email@mydomain.com
Return-Path: email@mydomain.com
Return-path: email@mydomain.com
X-Envelope-From: email@mydomain.com
X-Spam-Status: No, score=2.7
X-Spam-Score: 27
X-Spam-Bar: ++
X-Ham-Report: Spam detection software, running on the system "hostname.mydomain.com",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
root\@localhost for details.
Content preview: Sent from mobile
Content analysis details: (2.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit
[notverified[at]example.com]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider
[notverfied[at]example.com]
0.0 HTML_MESSAGE BODY: HTML included in message
2.0 PYZOR_CHECK Listed in Pyzor
(https://pyzor.readthedocs.io/en/latest/)
0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict
Alignment
-0.0 T_SCC_BODY_TEXT_LINE No description available.
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
X-Spam-Flag: NOI get this error:
SMTP error from remote mail server after end of data: 554 Message rejected: Email address is not verified. The following identities failed the check in region EU-WEST-1: ==de=example.com=notverified@example.comIs it possible to remove this email 'notverified@example.com' from the headers and make it as if it's sent from 'email@mydomain.com' or an alternative way to send incoming emails to other emails?
-
Hi, I am facing the same issue when SES configured with cpanel and forwarding enabled to receiver email account. Here is the case details - example.com is the primary domain of cpanel and it's verified in SES for sending mail. Forwarding enabled from cpanel example@domain.com to forwarded@domain2.com Sending mail from sender@gmail.com to example@domain.com. It delivered to example@domain.com but failed to deliver on forwarded@domain2.com Error forwarded@domain2.com (example@domain..com) R=send_via_ses T=ses_smtp H=email-smtp.us-east-1.amazonaws.com [x.x.x.x] X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=yes: SMTP error from remote mail server after end of data: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: sender , sender@gmail.com I have followed this document - if someone able to resolve this issue please send the solution. THanks 0 -
@theme2html - that last support document you linked indicated that configuration isn't possible with cPanel, so that would be the final word there. If there are other workarounds, they would need to happen outside the supported cPanel tools, but I'm not aware of such a thing on my end. 0
Please sign in to leave a comment.
Comments
3 comments