I'm getting bounce when I send an email to a specific address - amazon-web-services

I'm getting bounce when I send an email to a specific address using SES, from gmail the mail is delivered correctly
For Transient -> General AWS says The recipient's email provider sent a general bounce message. You might be able to send a message to the same recipient in the future if the issue that caused the message to bounce is resolved.
How can I fix the issue if I do not know the problem?
"eventType":"Bounce",
"bounce":{
"bounceType":"Transient",
"bounceSubType":"General",
"bouncedRecipients":[
{
"emailAddress":"{some_email}",
"action":"failed",
"status":"5.7.8",
"diagnosticCode":"smtp; 535 5.7.8 Error: blocked by Block Address check from 54.240.8.90"
}
],
"timestamp":"2019-07-03T19:48:56.445Z",
"feedbackId":"0100016bb962013a-6cd68815-3c51-4216-9946-50f01b923057-000000",
"reportingMTA":"dsn; a8-90.smtp-out.amazonses.com"
}

Not much you can do, seems like the recipient side is checking IP reputation and found that SES IP (sending IP) 54.240.8.90 is in the blacklist, it also sent you a bounce back with custom message "smtp; 535 5.7.8 Error: blocked by Block Address check from 54.240.8.90".
Seems like they're using SORBS SPAM .
https://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a54.240.8.90&run=toolpage
http://www.sorbs.net/cgi-bin/db
Couple of things you can try:
Remove the IP from SORBS by yourself (it may get added again)
Contact AWS to contact them to remove it from Blacklist.
Try dedicated IP pool.

Related

Get success status AWS SES

Prerequisites
I use AWS SES to send an email with event publishing to track the delivery status.
Problem
I'm looking for an event to make sure that an email is successfully sent to the end-user.
Description
Following AWS documentation, this type is suitable:
Deliveries – Amazon SES successfully delivered the email to the
recipient's mail server.
However, this event I get also in case Hard bounces.
For example, email status flow is:
Sends -> Deliveries - in case of successfull delivery
Sends -> Deliveries -> Hard bounces - in case I provide invalid recipient name, e.g. invalid#domain.com or 1234567890#domain.com
I don't expect Hard bounces after Deliveries.
If this behavior is correct then I need some additional event for sure success.
Something like this is expected in case of successfull delivery:
Sends -> Deliveries -> Success
I know that there are other "success" events like Opens, Clicks, Subscriptions, but they require additional action from the end-user.
Implementation details
I use Verified identity as an email sender.
A configuration set is used to redirect status events to SNS.
Finally, SQS is subscribed to this SNS to have all events in one place.
I tried several ways to send an email:
Java code using AWS SES SDK
Sending simulator with predefined and custom recipient's
The result is the same (as described above)
I think it is impossible to have a Success status because AWS cannot guarantee when the recipient mail server will reply with a Hard Bounce. You yourself have to define how long to you want to wait until you consider a delivery as successful. For example, if no hard bounce after 5 minutes, then it is a success.
If your use case is for analytics, I will simply capture more event types (for example log both Deliveries and Hard Bounces), and then count my success as Count of Deliveries - Count of Hard Bounces.
If your use case is for event-driven workloads, we need to define first what is considered a Success. For example, if we define Success as no Hard Bounce after 5 minutes, we can configure a Lambda function to trigger 5 minutes after a Delivery event. In the function, check if a subsequent Bounce event occurred. If not, the delivery is considered successful and then you can proceed to do what you want to do.
This is what I got from aws support about delivery status of an email.
Amazon SES will continue making several delivery attempts until
receiving a successful response from the recipient mail server, or
until 840 minutes elapse. If Amazon SES is still unable to deliver
the email/message during this period, it stops sending the email and
will then return a bounce message/notification.
According to this you can't be sure about the bounce or any other status within 5 minutes.
AWS does not have visibility to confirm if the Recipient Mail Server was able to deliver the message to the recipient email address when you get a 250 OK(it's confirmation that aws has delivered the message to recipient's mail server).
So there is no way you can be sure.

AWS SES - Bounced emails

I will try to express my question, I'm sorry if is not the correct way to do it.
I have an AWS SES configured to receive emails from my customers, sometimes the client get in a list and try to send an email too large (above 10MB), and my costumer start to receive bounced emails from all recipients in that list.
The bounce happens when my client tries to send an email for another people but the email of my company appears on CC field.
E.g:
the client sent an email:
TO: wherever#google.com
CC: mycompany#mycompany.com (this one will be sent for my SES); [a lot of other emails.........list]
This mail will be more large than 10MB (my SES must have to treat it).
This chain wil generate an bounced mail for my costumer, once that my email appears on CC list.
It's a little bit complex to express, but basicaly is it.
I'd like to know if is possible to track this attempts when the costumer receive the first bounce email from AWS. and to trigger a alert for me that the costumer is getting in a bounced list.
You can absolutely do this, SES supports notifications per type to SNS. The types are Delivery, Bounce, Complaint.
Each type can be registered to an SNS topic which you can subscribe a Lambda function to.
This Lambda function can then perform any logical decisions that you would like for your workflow.
In addition you can subscribe any email addresses you want to receive the raw notification that it was undelivered, although you will need to confirm there subscriptions before they can receive notifications. This would be ideal for a support inbox for example.
The AWS documentation contains more information about notifications

How I use custom local_part of email address in Amazon Simple Email Service?

When I first sent a test message with Amazon SES, the MAIL_FROM was 0101015825ed6274-5b0cad8d-ddb6-425b-9802-782cc554497a-000000#us-west-2.amazonses.com.
In most email programs that address is hidden in the header, and it appears to be FROM a more human-friendly address. This is not the case when using an email to MMS gateway, which displays the spammy looking MAIL_FROM address to the user.
I figured out how to change the MAIL_FROM domain, but that just changes it to something like: 0101015825ed6274-5b0cad8d-ddb6-425b-9802-782cc554497a-000000#my_domain.com.
Is it possible to change the spammy-looking string of characters in the MAIL_FROM to a customized, human-friendly, less spammy-looking local_part of the address?
It is not possible.
The local_part of the MAIL FROM address is a unique, opaque identifier that SES uses for feedback tracking -- linking backsplatter bounces from poorly-behaving mail gateways that "reject" undeliverable mail by first accepting it and then firing back a separate bounce message... as well as spam complaints and out-of-office auto-responders, back to the original sender, message, and recipient.
That's why of the configuration of a custom MAIL FROM domain involves setting the domain's MX record to point to feedback-smtp.[aws-region].amazonses.com -- it collects those responses and correlates them back to the original message.
Techniques of this nature are necessary due to weaknesses in the design of SMTP itself, where it is difficult, unreliable, or impossible to otherwise correlate such events back to the original message that actually triggered them.

AWS SES Production Access setup with Meteor

Setting up Meteor to use "out of the box" AWS SES is simple, and one can use native Meteor "Email" methods without modification.
Steps to implement this can be found here. Thanks to Brian
Shamblen for putting together a detailed answer.
But one caveat with the "out of the box" SES is you need to both verify the sender and receiver email address.
To remedy this, you can put in a request with AWS SES for what they call, Production Access.
And further, according to Brian Shamblen,
The process to get production access is rather complicated. One will
need to handle bounce and complaint notifications from SES and prevent
messages from being sent to those addresses in the future.
Question
What is the Meteor code involved in handling bounce and complaint notifications from SES and prevent messages from being sent to those addresses in the future?
EDIT: Made modifications to question for clarity.
Requesting production access is fairly straightforward. You just need to contact them and they usually give it to you in a couple of hours.
Information about the process is here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html
Load up the URL : http://aws.amazon.com/ses/fullaccessrequest/ and let them know what you will be sending via Emails, for example if you will be sending transaction based email (verification of a transaction, etc)
With production access you can either send email from:
A specific verified email address, where you will be asked to click a link to an email sent to that address to verify you own it
Any email under an entire domain. Under this process you prove you own the domain by editing its DNS records to contain a 'key'.
Most use cases are covered under production access, they typically give you 2000 emails a day and rate limit emails to 5/sec (they queue them so the maximum send rate is 5/sec). If you need more than this you can contact them to raise this additionally.
The process of verification is to stop people quickly creating AWS accounts to mass-spam users. If they allowed this straight-off then AWS IPs would be looked at as spam by other email providers.
For bounce notifications, SES tracks these, and you have to make sure that you don't get an above average bounce rate. Typically these would come from sending unsolicited email, which I wouldn't advise sending via SES.
Production access is only approved by the AWS team. Wait a bit and they should easily give you 2.000 emails/day for free.
As per bounces-unsubscribes... You'll need to have the SES API notify you of each email address which has been 'marked' with such status.
You should store all those email addresses somewhere and tell your app not to send them ANYTHING else in the future.

sleekxmpp send message to all the resource with same user name

I am trying to send a message from user-B to all the resources logged in with username user-A. But only the first resource alone that was logged in is getting the message. This is similar to presence being broadcast to all the resources within a user. Is there a way to do this using sleek-xmpp?
I tried using send_message
self.send_message(mto='userA#testserver',
mbody='sending - chat message ',
mtype='chat')
But it is received by only the first resource that was logged in .
The server that I am using is Openfire .
It is not the sender, nor the sender's server, but the recipient's server that controls which of the recipient's resources receive a message with type='chat'. Typically, this is based on the priority of the presences set by the recipient's resources.
There are some workarounds, though:
Use a type='headline' message (https://www.rfc-editor.org/rfc/rfc6121#section-5.2.2):
If the 'to' address is the bare JID, the receiving server SHOULD deliver the message to all of the recipient's available resources with non-negative presence priority and MUST deliver the message to at least one of those resources;
Ask the recipient to use clients that support XEP-0280. This allows clients to opt-in to receiving every chat message.
If you have a subscription to the recipient's presence, you can send a separate message to each resource, but that's a very bad idea in many regards (one of them: it can cause duplicates in the offline storage if some resources went offline in the mean time).