Amazon AWS Simple Email Service: some email addresses NEVER receive emails - amazon-web-services

I have posted this question on the Amazon AWS Forums, but figured I might get a quicker, better answer here. I apologize if you see it twice.
My company uses an Amazon AWS SMTP server to send emails via a Java-based web interface. This is just a small part of our application, intended to allow users to invite other users to our application.
We have discovered on a very few number of occasions that certain email addresses are not receiving the invitations. Initially we thought it was related to hyphens in the email addresses, but now I've determined that this isn't necessarily the case. I have been troubleshooting this for some time using my own email domains, and I have determined that the following two email addresses NEVER receive any emails sent using the AWS SMTP server (email-smtp.us-east-1.amazonaws.com), but there are no errors reported during the sending process -- the emails just never arrive. The second list shows similar email addresses that always DO receive invitations sent using our system. Note that the addresses on the first list NEVER receive emails, I have tried from all of our deployed instances many, many times.
ADDRESSES THAT DO NOT RECEIVE EMAIL:
jeremygoodell#jeremygoodell.com
jeremy-goodell#jeremygoodell.com
ADDRESSES THAT DO RECEIVE EMAIL:
test#jeremygoodell.com
jeremy-goodell#pinkymcberry.com
jeremy-goodell#hotmail.com
jeremygoodelk#jeremygoodell.com
There are very, very few email addresses that end up with this problem. I was somewhat lucky to find two in my own domain that are exhibiting the problem. I have of course verified that this has nothing to do with spam filtering.
The application is written in Java using the play framework. Play uses Apache Commons Email library under the hood. You can read more about this here: http://www.playframework.com/documentation/1.1/emails.
Here are some of the steps I have taken during my troubleshooting efforts:
1) Try with a different SMTP server (using my personal ISP SMTP -- smtp.gvtc.com) -- ALL addresses DO receive emails when I use this SMTP server. This would seem to isolate the problem as being specific to the AWS SMTP server.
2) Set up my own AWS account and use the SMTP settings for this account (after verifying the addresses in question) -- I have the exact same issues using my own AWS SMTP account settings. This would seem to indicate that the problem is not specific to our company's AWS account.
3) Turn on the play email debug setting (mail.debug=true in the configuration file). A great deal of information is shown in the console for each email sent by the system, but there is absolutely no difference between emails sent to good addresses and those sent to bad addresses. There is no indication whatsoever of any errors.
Here is the contents of the log for one of the emails that never arrived. Note that this is using the AWS server I set up for myself. It looks exactly the same when I use our company's AWS SMTP server except that the from email address is different. I have removed the actual email content, since it's in HTML, somewhat confidential, and not relevant to the problem.
May 15, 2013 8:44:47 AM play.Logger info
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems,
Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "email-smtp.us-east-1.amazonaws.com", port 465, isSSL false
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-376766033
DEBUG SMTP: connected to host "email-smtp.us-east-1.amazonaws.com", port: 465
EHLO 0.1.0.5
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-AUTH PLAIN LOGIN
250 Ok
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg "10485760"
DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
DEBUG SMTP: Found extension "Ok", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
AUTH LOGIN
334 VXNlcm5hbWU6
QUtJQUk3WDNURUI0NEVKNlRSU1E=
334 UGFzc3dvcmQ6
QXJwZjl4eU1FTVc1WFNFR3ZxVXVPODNhRjFkcG8xMFpSeURXY0ZsNGVHQXM=
235 Authentication successful.
DEBUG SMTP: use8bit false
MAIL FROM:<jeremy-goodell#hotmail.com>
250 Ok
RCPT TO:<jeremygoodell#jeremygoodell.com>
250 Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: "jeremygoodell#jeremygoodell.com" <jeremygoodell#jeremygoodell.com>
DATA
354 End data with <CR><LF>.<CR><LF>
Date: Wed, 15 May 2013 08:44:47 -0500 (CDT)
From: "jeremy-goodell#hotmail.com" <jeremy-goodell#hotmail.com>
Reply-To: "jeremy-goodell#hotmail.com" <jeremy-goodell#hotmail.com>
To: "jeremygoodell#jeremygoodell.com" <jeremygoodell#jeremygoodell.com>
Message-ID: <2322287.7.1368625487826.JavaMail.UGOODJ3#SAOTXWL-9X913M1>
Subject: Please join the ACT Aspire Hari AV test delivery portal
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_6_16196755.1368625487826"
------=_Part_6_16196755.1368625487826
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
>>>> HTML EMAIL BODY REMOVED <<<<
------=_Part_6_16196755.1368625487826--
.
250 Ok 0000013ea86fb2de-0bd70205-8e9a-4042-972f-ad94b28c3101-000000
QUIT
221 Bye

I'm going to follow up here with what turned out to be the solution to the problem. The Amazon AWS SMTP service maintains a "14-Day Suppression List" which is a list of email addresses that have bounced during the last 14 days. Any email sent via the Amazon SMTP service will fail when attempting to send to an address on the Suppression List. Unfortunately, they don't report the error, but instead, send an "Undeliverable" reply to the sender. So, if you have an automating sending service, you'll never know.
I happened to find it because when I set up my own AWS SMTP server, I put in one of my own email addresses as the sender of the automated email. When I logged into that email account, I saw the Undeliverable messages, which explained that the target email is on the Supression List.
Amazon does allow you to log into your Email Service Console and remove email addresses from the Suppression List. You just put in the email address, click Remove, and the address is immediately removed from the list. You have no way to see which email addresses are on the Suppression List, but you can remove any address you want.
So, in the case of my email failures, I believe what happened was that I tried to email to them before the email creation was complete, resulting in a bounce. Once the email address bounces, it goes on the Supression List. For the next 14 days any email sent via ANY AWS SMTP server (not just mine) would fail. After 14 days (apparently) the email address is removed from the Suppression List until the next bounce is encountered.
This Amazon software is very new, they actually just announced this Suppression List service in early May. So they may still need to work out a few kinks. This particular issue seems to present a somewhat serious issue for automated senders like ours. After all bounces do occur on occasion for reasons beyond our control.

Related

ionos mail server unable to send data to hotmail accounts

I have my domain-name hosted on Ionos. Along with the domain-name , I also purchased mail server from ionos.
I have migrated my nameservers from ionos to aws.
I have also added a record for my mail-servers to point to existing records on ionos. (MX record)
It all seems to work but whenever my mail servers have to send data to hotmail account this message is received at my mail-server and hotmail email account is unable to receive required data.
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of
its recipients. This is a permanent error. The following address(es)
failed:
abc#hotmail.com:
SMTP error from remote server for MAIL FROM command, host: hotmail-com.olc.protection.outlook.com (some-ip) reason: 550 5.7.1 Service unavailable, Client host [my-ip] blocked using S
pamhaus. To request removal from this list see https://www.spamhaus.or
g/query/ip/my-ip (AS3130). [BN8NAM12FT047.eop-nam12.prod.prote
ction.outlook.com]
--- The header of the original message is following. ---
Received: from [127.0.0.1] ([aws-ip]) by mail server name
(mreue109 [some-ip]) with ESMTPSA (Nemesis) id
some-id-value for <abc#hotmail.com>; Date
Content-Type: text/html; charset=utf-8
From: mail server
To: abc#hotmail.com
Subject: Welcome
Message-ID: <xyz>
Content-Transfer-Encoding: quoted-printable
Date: --------
MIME-Version: 1.0
X-Provags-ID: some junk values
X-Spam-Flag: YES
X-UI-Out-Filterresults: some junk values
I have tried to contact both Ionos and AWS Team regarding this issue , so far I have not received any help .
I am looking for guidance on how to solve this issue.
Hotmail.com is notorious for "eating" mails. I am also using Ionos and I am usually not able to send mails to hotmail addresses.
For some unknown reason hotmail has blacklisted ionos as spammer and nobody seems to know how to fix it.
I hoped that they managed to fix it over the last years, but reading your post that seems not to be the case. At least you got an answer. I have sent mails to hotmail and neither I nor the receiver got any information that the mail failed.

Exim, define alternate router for forward mail, by user forward address

I have a problem, I am using the SES AWS service, for the delivery of my email; this works without problems; the problem arises when I want to send forwarding mail from one mailbox to another destination account, receive the following error:
Mailfromuser_sernder#domain.tld
(ultimately generated from usermail_forwarder#domain.tld)
host ses-smtp-us-west-xxxxxxx.xxxxx.us-west-2.elb.amazonaws.com
SMTP error of the remote mail server after the end of the data:
554 Message rejected: the email address is not verified. The following identities could not be verified in the US-WEST-2 region:
Mailfromuser_sernder#domain.tld
Investigate the issue and the reason is that the SRS (Service Rewrite Scheme) is not compatible with SES AWS. reference here.
I asked Cpanel for support because I use the Cpanel on my server, not even a drop of help, they answered that it was a technical problem.
The only solution that think, is forwarder mail by any local user and size is more than 10 mb is sending by another router.
He there my problem, as I define it; in the router section use these lines and it serves only for one domain, he researched and you can read the headers of the email, but I do not know how
sender_redirect:
driver = dnslookup
domains = domain.tld
transport = remote_smtp
no more
I know it's wrong, but I do not know how to declare the functions to do nex requeriments:
That, if is forwarding mail by any mailbox, I sent it by this
router and not by amazon ses
The message is greater than 10 mb, sending by this router and not by
amazon ses

Partially Delivered Email Causes Error in CF10

My company just turned on sender validation for the SMTP relay. So in the old days, I could send an email to nobody#company.com and it would not result in any error. Now, that email results in this:
"Error","scheduler-2","10/31/16","09:04:49",,
"com.sun.mail.smtp.SMTPSendFailedException:
250 2.0.0 xxxxxxxx-1 Message accepted for delivery ;
nested exception is: com.sun.mail.smtp.SMTPAddressFailedException:
550 5.1.1 User Unknown on Mail Relay"
Is there anything I can do via JVM arguments or anything else to ignore these errors and consider the email sent? There's a box where we send out 2-3K emails a day and there's about 1K of "undelivered" emails now on a daily basis. :(
The exception SMTPAddressFailedException is a result of a failed authentication on the mail server, so this is not related to the JVM configuration at all. ColdFusion simply builds mail content and adds it to the mail spooler. Due to the async. nature of a spooler, you cannot catch these errors at runtime.
Your only option is to communicate with the actual mail server before using cfmail (and ask if the sender is legit). However, as far as I know there is no built-in function/tag/tool in CF to do so.

How to investigate SMTP mail sent?

I follow this doc to enable wso2is to sent email for self user registration :
https://docs.wso2.com/display/IS520/Self+Sign+Up+and+Account+Confirmation
But I am not receiving any email.
I would like to investigate but there is no message in the log althoug I add the following logger in log4j.properties :
log4j.logger.org.apache.axis2.transport.mail=DEBUG
log4j.logger.com.sun.mail=DEBUG
And also put -Dmail.debug=true in server.sh but nothing about smtp error or mail execption shows up in the log...
How can I fix it and investiguate ?
Regards
If you are using a gmail account for sending emails, you have to go to [1] and select "Turn on" option for allowing 3rd party apps to send emails using gmail.
However if that is not the case, you can enable debug logs for following.
log4j.logger.org.wso2.carbon.identity.mgt=DEBUG
and identify the issue based on the logs.
[1] https://www.google.com/settings/security/lesssecureapps
It might even be that a virusscanner blocks the gmail port (587) for spamming.
Using DevNullSmtp.jar helps to see what is going out.
See also
https://www.yenlo.com/blog/wso2easy-errors-sending-otp-emails-in-wso2-identity-server

Redmine email sending stops after changing from smtp to async_smtp

I have setup redmine and configure email sending feature with smtp.
It takes around 15 seconds for any user action to complete if email is enabled( sending email takes time at our smtp server as it has a configured delay).
So I have tried using async_smtp as shown below.
production:
delivery_method: :async_smtp
async_smtp_settings:
enable_starttls_auto: true
address: "smtp.xxx.com"
port: 25
domain: "smtp.xx.com"
authentication: :plain
user_name: "yyy#xxx.com"
password: "xxx!"
Redmine shows that email is sent, but I couldn't see the email. Log also doesn't show any error.
Can someone help?
Adding more detail below:
with the above settings, I get success log as shown below:
Sent email "Redmine test" (16ms) to: [email]
Redirected to http://[ip]/redmine/settings?tab=notifications Completed 302 Found in
328ms (ActiveRecord: 0.0ms) Started GET
"/redmine/settings?tab=notifications" for [ip] at 2015-10-05 15:13:04+0530
note: I have replaced ip and email with [ip] and [email]
I made it work!
I found that you need to add extra level in the config file, email_delivery. Its hinted at elsewhere in the file, but all the examples on redmine.org miss it out. Seems that only async requires it.
production:
email_delivery:
delivery_method: :async_smtp
async_smtp_settings:
address: ...
It's look like it's the same problem I had, your smtp server can't reroute your request. I had to let my configuration to smtp instead of async_smtp as our smtp server can't handle it.
Is it your own smtp server or a hotmail, gmail, etc?
BTW can you try to add this config.action_mailer.logger = nil to your config/environments/production.rb configuration file, and give us the output of log/production.log
EDIT: Look like redmine have problem handling certain SSL certificate.