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?
 
One thing I think that probably needs to be done (and I haven't enabled it in my setup) is to disable DKIM signing in XF unless you have SPECIFICALLY told Amazon SES to use your custom DKIM configuration. They sign all the outbound themselves... and I had to set it up for my SMTP to use a sub-domain for my main domain.. then do all the associated DNS entries for said sub-domain.
I've got it set up, and it wasn't really that hard if following their documentation.. but it DOES take some knowledge of what they are talking about - slightly more than "I know my SMTP login credentials".
 
Anyone have any success with SES and XenForo 2.2?

I migrated my forum to AWS over the weekend, and thought it would be simple to use SES for emails rather than setting up email on my Ubuntu EC2 instance.

But SES is stuck in Sandbox for me still which means the recipients email address needs to be verified with the AWS Region, not just our email address, meaning all emails fail because the recipient's email address is not verified.

I put in a support ticket to move our SES to production, and for the use case I put in "XenForo Forum Software". Amazon Support replied by pretty much saying they are unable to move us to production and lift the restrictions in place at this time because we didn't clearly define our email use case, but may be able to if we provide in detail our use case.

Do they need to know each and every way XenForo sends email, such as verify email address with new user registration, password reset emails and so on?
 
Do they need to know each and every way XenForo sends email, such as verify email address with new user registration, password reset emails and so on?
Maybe not every way but I tried to be as detail as possible when I made the request and for everyone I helped set it up for. The person approving it may think "xenForo" is too vague if they don't know or have never used it before.

Haven't had to set it up in a while though so I'm not sure if they've gotten stricter, but I think you'll get approved if you explain further.
 
Anyone have any success with SES and XenForo 2.2?

Do they need to know each and every way XenForo sends email, such as verify email address with new user registration, password reset emails and so on?
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.
 
Last edited:
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.
@GW2 Our forum is 22 years old and we own/operate a Smartermail email server on a Dedicate Windows server that only costs me 70.00/month! The key to Yahoo/AOL/Verizon (all same email server now) is to fill out a support request https://senders.yahooinc.com/contact/ and you may need to use a @gmail.com account etc to get through to them. They will take into consideration the number of emails you sent out and then unblock your dedicated IP and you should be fine after that indefinately. Also, use the Feedback loop and ban users that make false spam complaints!

Recently I switched servers/IPs and had to do this with Yahoo and ATT. We sent out 20k emails in one day via our email users every week with no issues.

ATT has an email to do this- abuse_rbl@abuse-att.net

Again BAN users that misuse the spam button!

It's a PITA but worth it and you don't have to pay Amazon anything!
 
Last edited:
@GW2... The key to Yahoo/AOL/Verizon (all same email server now) is to fill out a support request https://senders.yahooinc.com/contact/ and you may need to use a @gmail.com account etc to get through to them. They will take into consideration the number of emails you sent out and then unblock your dedicated IP and you should be fine after that indefinately. Also, use the Feedback loop and ban users that make false spam complaints!
@ActorMike Thank you for that helpful insight into Yahoo.
 
@ActorMike Thank you for that helpful insight into Yahoo.
Case in point! It never fails when I send out the weekly email there are one or two clowns per 10,000 emails that flag messages as spam instead of using the 1-click unsubscribe link in the message! I will email them and tell them instead of making false spam complaints use the unsubscribe link you were provided, it takes the same effort! Responses vary from, I sold my car, to I didn't do it. I will delete the account if they never posted, or ban them until the agree not to do it again.

People are idiots which is why Facebook and X are popular. Facebook is the WalMart of the World Wide Web.



clown.jpg
 
Yes. It works
I personally never could get the bounce reporting to work reliably with my testing. It showed as bounce on Amazon but never in XF. Changed back to my having two dedicated bounce/unsubscribe addresses and works fine on bounces now, they get reported in XF logs and acted upon.
 
Top Bottom