AmazonSES throttling

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
JohnHace
Normal user
Normal user
Posts: 33
Joined: 2015-05-02 21:13

AmazonSES throttling

Post by JohnHace » 2021-01-04 21:10

I am running HMailServer on an Amazon EC2 instance. I was using SMTP Relay to Sendgrid but I switched to Amazon SES. I send a little over 1,000 emails on Monday and Wednesday through Friday. On those days the counts look correct on Amazon. Every Tuesday I send about 8,000 emails. The count I'm seeing on Amazon is around 3,000. My daily limit on SES is 50,000. My account on Amazon is limited to 14 emails/second. Their support said I may be hitting the limit but they could not say for sure. Last Tuesday, I put 1/10 second delay between each email as I send them to hmailserver but it did not help. Is there a way to limit the relays going out to less than 14/second?

User avatar
johang
Senior user
Senior user
Posts: 441
Joined: 2008-09-01 09:20

Re: AmazonSES throttling

Post by johang » 2021-01-04 21:38

JohnHace wrote:
2021-01-04 21:10
I am running HMailServer on an Amazon EC2 instance. I was using SMTP Relay to Sendgrid but I switched to Amazon SES. I send a little over 1,000 emails on Monday and Wednesday through Friday. On those days the counts look correct on Amazon. Every Tuesday I send about 8,000 emails. The count I'm seeing on Amazon is around 3,000. My daily limit on SES is 50,000. My account on Amazon is limited to 14 emails/second. Their support said I may be hitting the limit but they could not say for sure. Last Tuesday, I put 1/10 second delay between each email as I send them to hmailserver but it did not help. Is there a way to limit the relays going out to less than 14/second?
is your problem between your mailburst application and hmailserver ?
or
hmailserver and Amazon SES ?

i did not understand.. or have you verified hmailserver accepting 8000 emails and verified it sending 8000 ?

if hmailserver hit the limit at Amazon SES.. you should get mails in a queu waiting for delivery and making ndr:s if not being able to send... surely Amazon dont accept mail.. and throw it away ...

(what i am saying is that my guess is your mailburst application floods the hmailserver which cant swalllow everything and perhaps your mailburst application lacks error handleing so it just floods the hmailserver whether it answers or not.. ? )
___________________________________________________________end of the line

JohnHace
Normal user
Normal user
Posts: 33
Joined: 2015-05-02 21:13

Re: AmazonSES throttling

Post by JohnHace » 2021-01-04 22:44

johang wrote:
2021-01-04 21:38

is your problem between your mailburst application and hmailserver ?
or
hmailserver and Amazon SES ?

i did not understand.. or have you verified hmailserver accepting 8000 emails and verified it sending 8000 ?

if hmailserver hit the limit at Amazon SES.. you should get mails in a queu waiting for delivery and making ndr:s if not being able to send... surely Amazon dont accept mail.. and throw it away ...

(what i am saying is that my guess is your mailburst application floods the hmailserver which cant swalllow everything and perhaps your mailburst application lacks error handleing so it just floods the hmailserver whether it answers or not.. ? )
I don't think the problem is between the application and hmailserver. I was using them both when I was sending 8,000 relayed through Sendgrid and Sendgrid always showed over 8,000 every Tuesday. I have only been on SES for a month and it is showing a little over 3,000 each Tuesday. I did put a 1/10 second pause in the application before last Tuesday so it should not be sending more than 10/sec to hmailserver but I don't know how hmailserver sends. Does it send out as it receives each email? Or, does it create a batch and send many at once?

mikedibella
Senior user
Senior user
Posts: 384
Joined: 2016-12-08 02:21

Re: AmazonSES throttling

Post by mikedibella » 2021-01-04 22:53

Try enabling awstats logging and compare the number of successful emails logged in hmailserver_awstats.log with the number in SES. You don't need the AWStats log parser to do that. Just open the file in Excel or similar and count the number of records with 220 result code. Failures will have a different code.

The format of the file is:

time fromaddress toaddress sourceip relayhost "SMTP" "?" resultcode bytessent

JohnHace
Normal user
Normal user
Posts: 33
Joined: 2015-05-02 21:13

Re: AmazonSES throttling

Post by JohnHace » 2021-01-04 23:41

mikedibella wrote:
2021-01-04 22:53
Try enabling awstats logging and compare the number of successful emails logged in hmailserver_awstats.log with the number in SES. You don't need the AWStats log parser to do that. Just open the file in Excel or similar and count the number of records with 220 result code. Failures will have a different code.
I seem to be getting about half 250 and half 550. But no 220.

mikedibella
Senior user
Senior user
Posts: 384
Joined: 2016-12-08 02:21

Re: AmazonSES throttling

Post by mikedibella » 2021-01-05 00:01

Sorry, successfully submitted relay's will have code 250. 550 is an error.

Search for "RECEIVED: 550" in the hMailServer event logs and you'll see the reason these emails are failing.

JohnHace
Normal user
Normal user
Posts: 33
Joined: 2015-05-02 21:13

Re: AmazonSES throttling

Post by JohnHace » 2021-01-06 23:07

So I have found the problem. Sendgrid did not have this limitation, but SES will not send with a FROM email that they have not verified. I thought I was using a FROM email that was verified, but I was adding a bounceaddress. I wanted bounce to go to my customers so they could fix the bad emails. I found that SES sees the bounceaddress as the FROM and rejected almost all of them. It had nothing to do with the speed or throttling.

mikedibella
Senior user
Senior user
Posts: 384
Joined: 2016-12-08 02:21

Re: AmazonSES throttling

Post by mikedibella » 2021-01-07 00:59

I think if you request release from the SES "sandbox" you can send from any address on a verified domain. You still need to verify the domain, but you don't have to opt-in individual addresses.

I've only used SES in the free tier, so I haven't had luck getting getting out of the sandbox.

Post Reply