XF 2.2 Configure Amazon SES in our Xenforo forum

Sadiq6210

Well-known member
Hi

I created new amazon SES account, verified the domain, created SMTP, and moved the account out of the sandbox. I think that our SES is ready.

Then in Email options, I changed the method to SMTP with SES information:

1650880117685.webp

1650879893437.webp

1650880287115.webp

Now when I try to send test email through Contact page, I got this error in admincp and the message is not delivered to "Contact email address"

Code:
Swift_TransportException: Email to ***@***.com from ***@***.com failed: Expected response code 250 but got code "554", with message "554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: *** <****@live.com> " src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:459
Generated by: *** 25 Apr 2022 at 12:29 PM
Stack trace
#0 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(344): Swift_Transport_AbstractSmtpTransport->assertResponseCode('554 Message rej...', Array)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(305): Swift_Transport_AbstractSmtpTransport->executeCommand('
.
', Array, Array, false, NULL)
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(406): Swift_Transport_EsmtpTransport->executeCommand('
.
', Array)
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(502): Swift_Transport_AbstractSmtpTransport->streamMessage(Object(Swift_Message))
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(518): Swift_Transport_AbstractSmtpTransport->doMailTransaction(Object(Swift_Message), 'support+74cb150...', Array, Array)
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(206): Swift_Transport_AbstractSmtpTransport->sendTo(Object(Swift_Message), 'support+74cb150...', Array, Array)
#6 src/XF/Mail/Mailer.php(312): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#7 src/XF/Mail/Mail.php(458): XF\Mail\Mailer->send(Object(Swift_Message), Object(XF\Mail\SmtpTransport), NULL, true)
#8 src/XF/Service/Contact.php(197): XF\Mail\Mail->send()
#9 src/XF/Pub/Controller/Misc.php(86): XF\Service\Contact->send()
#10 src/addons/OzzModz/ContactusLog/XF/Pub/Controller/Misc.php(87): XF\Pub\Controller\Misc->actionContact()
#11 src/XF/Mvc/Dispatcher.php(352): OzzModz\ContactusLog\XF\Pub\Controller\Misc->actionContact(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'Contact', Object(XF\Mvc\RouteMatch), Object(OzzModz\ContactusLog\XF\Pub\Controller\Misc), NULL)
#13 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\ContactusLog\XF\Pub\Controller\Misc), NULL)
#14 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#16 src/XF.php(524): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}
Request state
array(4) {
  ["url"] => string(19) "/forum/misc/contact"
  ["referrer"] => string(41) "https://www.***.com/forum/misc/contact"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["_xfToken"] => string(8) "********"
    ["subject"] => string(6) "test2b"
    ["message"] => string(14) "test2b message"
    ["_xfRedirect"] => string(29) "https://www.***.com/forum/"
    ["_xfRequestUri"] => string(19) "/forum/misc/contact"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

Did I miss anything in configuration?
 
I have the knowledge easily.. but I really would not prefer to have to expend the resources when I can meet the needs by SES.

Explain how that's any different than me needing to go out and get a separate server instance ($30-$50 in value) with a dedicated IP and then me needing to go through the process of making sure the IP is clean.


It's not that expensive to have a dedicated server, but I guess that is subjective. Our server has 5 IP addresses and is 70.00/mo. See- See- https://bit.ly/DediOutlet
As far as the clean IP addresses, I've never had a provider that did not have clean IP addresses to start with, all you may have to do is contact Yahoo and AT&T one time if you send out thousands of emails and give them your IP address and then you are set for life or until you switch IP addresses.

server.jpgDediOutlet
 
It's not that expensive to have a dedicated server, but I guess that is subjective. Our server has 5 IP addresses and is 70.00/mo.
And for around $35 a month you can get a dedicated IP... and once you show "need" I'm sure they would upgrade the account... so you still would save $35 a month... and if you can't administer your own MTA server, you can add another $40-$75 to that cost.

As for clean IP's... wish on... most "cheap" providers (which is what most admins will lean towards) are going to have dirty IP's. Digital Ocean - dirty.
LiNode - dirty.
SYS - dirty.
OHS - dirty.

The simple fact of life is.. cheap VPS/dedi providers will have dirty IP's as that's what spammers tend to use (and cost conscious admins trend towards). Even your DediOutlet service has IP's listed as being dirty.
Just one IP from their service

Screen Shot 2023-11-14 at 8.37.36 AM.webp
 
The simple fact of life is.. cheap VPS/dedi providers will have dirty IP's as that's what spammers tend to use (and cost conscious admins trend towards). Even your DediOutlet service has IP's listed as being dirty.
Just one IP from their service
All that is irrelevant. It's a fact we sent out 100,000k+ emails a month with no issues.

We have no issues with our five IP addresses or email delivery issues, if we did, they would have just given us other ones. That's the entire point of having your own IP address, it doesn't matter what someone else is doing. This particular provider actually had a problem recently with spammers and locked down port 25 which was nice! They manually approve anyone wanting to use the port now.
 
All that is irrelevant. It's a fact we sent out 100,000k+ emails a month with no issues.
It may be irrelevant to you... but to the majority.. it's not.
There are plenty of folks who do the same with SES and other dedicated providers... so the simple fact is... it doesn't require a dedicated server with a dedicated IP to do the same.

The fact remains... if one depends on an IP that others use, then one is subject to those issues. But the cost of a dedicated SES IP is 1/2 of what you are paying for your hosting provider. And the majority of admins do NOT have the ability to run their own MTA service reliably. And that SES service does NOT depend on the ability of someone (other than Amazon) to administer the MTA server, unlike a dedicated MTA service setup does.

In the ultimate scheme of internet life.. you (and I) are a minority.
 
Last edited:
if I remember correctly there is a post that explains how to configure amazon ses and xf.
does anyone remember the url?
There is this one also
 
My initial request to move out of the sandbox failed also. This is what I sent initially:

Automated emails will be sent to XXX.com discussion forum members using Xenforo software. Typically, these messages are registration confirmations, replies for password reset, and various notification messages that users have requested though their user profile configuration. XXX.com. the domain name owner, is a 501(c) 7 not for profit corporation. XXX, Inc. operates & administers the forum for the benefit of timeshare owners for the purpose of building community and educating forum members on the use of their timeshare ownership. XXX, Inc. does not sell any product.

We anticipate the daily volume of outgoing email messages to be approximately 300-400 per day although this is an estimate because we do not currently have a method of counting outgoing messages. We will have a better estimate after a week or two of using SES.

Our mailing list resides on the Xenforo software. We do not send emails to anyone who has not requested to be a member of the forum. Xenforo has built-in automated capability to handle bounces and unsubscribe (opt-out) requests. When an email is bounced or receives an unsubscribe request, the software will not send further email messages to that address. We also have the capability to manually monitor bounces and complaints.

This is the response: I received from Amazon:

Hello, thank you for submitting your request to increase your sending limits. We would like to gather more information about your use case. If you can provide additional information about how you plan to use Amazon SES, we will review the information to understand how you are sending and we can recommend best practices to improve your sending experience. In your response, include as much detail as you can about your email-sending processes and procedures. For example, tell us how often you send email, how you maintain your recipient lists, and how you manage bounces, complaints, and unsubscribe requests. It is also helpful to provide examples of the email you plan to send so we can ensure that you are sending high-quality content that recipients will want to receive. You can provide this information by replying to this message. Our team provides an initial response to your request within 24 hours. If we're able to do so, we'll grant your request within this 24-hour period. However, we may need to obtain additional information from you, and it might take longer to resolve your request. Thank you for contacting Amazon Web Services.


So I replied with this:

Additional information for production request:
  • XXX.com sends email messages daily to users of the XXX.com discussion forum.
  • The recipient mailing list is maintained in our Xenforo software. The software sends messages related to password reset, registration verification, and messages pertaining to specific forum events which users can choose to receive or not receive.
  • Email bounces are processed by the Xenforo software. Currently bounced emails are considered a “bounce” for 2 unsuccessful delivery attempts over a 5 day period. After the 2nd unsuccessful delivery attempt the user is moved to a “Email invalid” state and no further emails are sent until the user changes his/her email address. The software also informs the user of such action via a message to that user placed on the forum itself, not via email.
  • Unsubscribes are also handled by the Xenforo software. All outgoing messages have an unsubscribe option. For unsubscribe requests, the software adjusts the user’s profile so that further email messages are not sent to that user’s email address. Complaints would be in the same category as an unsubscribe since any user can unsubscribe to unwanted emails. A complaint is basically an unsubscribe request.
  • Generally, we have had good results sending email messages with our current arrangement except for Yahoo.com and AOL.com. Apparently, some of the servers used by our website shared server hosting arrangement are blacklisted by Yahoo/AOL which is a primary reason we are moving to Amazon SES.
  • Attached is a sample outgoing message that is bounced for reason "spam" by a small percentage of email servers.

I don’t know how much of that detail is really necessary, but it worked. Here is Amazon's reply which I received within 24 hours:

Thank you for submitting your request to increase your sending limits. Your new sending quota is 50,000 messages per day. Your maximum send rate is now 14 messages per second. We have also moved your account out of the Amazon SES sandbox. This takes effect immediately in the US West (Oregon) region.

Is there a reason you've chosen 2 unsuccessfully delivered attemps? Currently mine is set to default.

1700517463966.webp
 
Is there a reason you've chosen 2 unsuccessfully delivered attemps? Currently mine is set to default.

View attachment 294209
Prior to moving to SES, I was having a problem with bounced emails (particularly with Yahoo & AOL...same company).

So, when I moved to SES I was concerned that if my forum generated a high number of bounces that Amazon would issue a "warning" or cut me off. I didn't see a particular reason for allowing three soft bounces, so I lowered the number to two. Amazon has some criteria regarding bounces & complaints.

Perhaps two soft bounces is over-reaction on my part, but that configuration seems to be working fine. My SES "hard" bounce rate is .07% and my "complaint" rate is .05%. SES adds bounces to a "suppression list" and will not send further emails received from XF to that address (unless you remove the address from your suppression list).

There are so many reasons for bounced emails...I do not have the time to read all of them in the XF bounced email log....reasons are, for example, no such mailbox exists, could not send after 240 minutes, invalid domain status, unrouteable address, etc., etc., and this: "Amazon SES did not send the message to this address because it is on the suppression list for your account. For more information about removing addresses from the suppression list, see the Amazon SES Developer Guide at https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-email-suppression-list.html
Status: 5.1.1".

The XF default values may be fine also. Here are my current settings which are working OK for me.

1700521907693.webp

Amazon SES has significantly helped my email bounce problem.
 
I set all 3 to 2. It's useless to send emails to people whose emails are bouncing. One, I can be ok with, but if it's not just a rare thing then I don't want to spend money to email you.

FYI, SES will automatically keep its own hard-bounce blocklist, but ignores soft bounces.
 
Prior to moving to SES, I was having a problem with bounced emails (particularly with Yahoo & AOL...same company).

So, when I moved to SES I was concerned that if my forum generated a high number of bounces that Amazon would issue a "warning" or cut me off. I didn't see a particular reason for allowing three soft bounces, so I lowered the number to two. Amazon has some criteria regarding bounces & complaints.

Perhaps two soft bounces is over-reaction on my part, but that configuration seems to be working fine. My SES "hard" bounce rate is .07% and my "complaint" rate is .05%. SES adds bounces to a "suppression list" and will not send further emails received from XF to that address (unless you remove the address from your suppression list).

There are so many reasons for bounced emails...I do not have the time to read all of them in the XF bounced email log....reasons are, for example, no such mailbox exists, could not send after 240 minutes, invalid domain status, unrouteable address, etc., etc., and this: "Amazon SES did not send the message to this address because it is on the suppression list for your account. For more information about removing addresses from the suppression list, see the Amazon SES Developer Guide at https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-email-suppression-list.html
Status: 5.1.1".

The XF default values may be fine also. Here are my current settings which are working OK for me.

View attachment 294214

Amazon SES has significantly helped my email bounce problem.
Thank you for your thorough answer, i will lean up against your settings. See how it works out for me.
 
I wrote @GW2 lyrics and they unlocked my account 🎉
I've configured email and website but I can't figure out how to make it all work...
Could someone help me privately? 🙏
Thanks
 
Back
Top Bottom