XF2.1 + CentOS7 + PostFix + G Suite for email - how to configure on the Xenforo side?

CZ Eddie

Active member
Hi folks,

I have Postfix able to send emails using Google G Suite just fine.
But I'm unsure of how to make Xenforo use this for email?
I left the "Email options" configuration in Xenfor default and then tried a test email but have not gotten anything.
The only other option other than Default is SMTP which appears to want Google's info, not the info for Postfix?
 
Okay, I went ahead and used the SMTP setup options.
I set it to Localhost and Localport.
But it won't work if I try to use TLS or SSL.
I also tried both those options + putting in Postfix/password for username/password authentication.
If I do either of those two things then I get these errors:

Code:
[*]src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:140
[/LIST][/TD]
[/TR]
[TR]
[TD]Email to xxx@xxx.com failed: Connection could not be established with host labusas.org [ #0]
[LIST]
[*]18 minutes ago
[*]src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:277
[/LIST][/TD]
[/TR]
[TR]
[TD]Job XF:Feeder: Please enter a valid URL.
[LIST]
[*]19 minutes ago
[*]src/XF/Service/Feed/Reader.php:35
[/LIST][/TD]
[/TR]
[TR]
[TD]Email to czeddie@xxx.com failed: Connection could not be established with host labusas.org [ #0] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host labusas.org [ #0] (code: 0)
[LIST]
[*]20 minutes ago
[*]src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:140
[/LIST][/TD]
[/TR]



Server error log
[LIST]
[*]Swift_TransportException: Email to czeddie@xxx.com failed: Connection could not be established with host localhost [ #0] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host localhost [ #0] (code: 0)
[*]src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:140
[*]Generated by: Admin
[*]Dec 28, 2018 at 5:42 PM
[/LIST]
Stack trace
#0 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(152): Swift_Plugins_LoggerPlugin->exceptionThrown(Object(Swift_Events_TransportExceptionEvent))
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php(132): Swift_Events_SimpleEventDispatcher->_bubble(Object(Swift_Events_TransportExceptionEvent), 'exceptionThrown')
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(361): Swift_Events_SimpleEventDispatcher->dispatchEvent(Object(Swift_Events_TransportExceptionEvent), 'exceptionThrown')
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(115): Swift_Transport_AbstractSmtpTransport->_throwException(Object(Swift_TransportException))
#4 src/XF/Mail/Mailer.php(276): Swift_Transport_AbstractSmtpTransport->start()
#5 src/XF/Mail/Mail.php(347): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SmtpTransport))
#6 src/XF/Admin/Controller/Tools.php(246): XF\Mail\Mail->send(Object(Swift_SmtpTransport))
#7 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Tools->actionTestEmail(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'TestEmail', 'html', Object(XF\Mvc\ParameterBag), 'tools', Object(XF\Admin\Controller\Tools), NULL)
#9 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#11 src/XF.php(329): XF\App->run()
#12 admin.php(13): XF::runApp('XF\\Admin\\App')
#13 {main}
Request state
array(4) {
["url"] => string(27) "/admin.php?tools/test-email"
["referrer"] => string(46) "https://labusas.org/admin.php?tools/test-email"
["_GET"] => array(1) {
["tools/test-email"] => string(0) ""
}
["_POST"] => array(2) {
["email"] => string(17) "czeddie@xxx.com"
["_xfToken"] => string(8) "********"
}
}

Delete

191478
 
Ahh, you know what... I bet this is working as designed since Postfix will take care of the pre-configured cert/SSL/TLS stuff for Xenforo.
So all Xen is doing is just saying "here, take this letter and do something with it".
Then Postfix securely hands it off to the Googles.

Being a first-time web admin is stressful learning.
 
Back
Top Bottom