Email Ports

SoManyPosts

Active member
Hi Everyone,

I have looked everywhere but cannot find anything definitive telling me which ports to use for XenForo. I have a firewall that blocks all inbound except for CloudFlare and special services. I am wondering if this would effect default email sending? If it does, which ports are needed for XenForo to send emails?

Thanks!
 
This is not xenforo specific at all. I assume outgoing smtp then port 25. Any PHP test mail script should help you confirm this is working.
 
@rainmotorsports I added that to the incoming firewall and my outgoing is allow all. So, the port is all open yet it won't send email. I am getting this error:

Zend_Mail_Transport_Exception: Email to chrishillz@icloud.com failed: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137
Generated By: user, A moment ago
Stack Trace
#0 /usr/share/nginx/html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /usr/share/nginx/html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /usr/share/nginx/html/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
#3 /usr/share/nginx/html/library/XenForo/ControllerPublic/Misc.php(217): XenForo_Mail->sendMail(Object(Zend_Mail))
#4 /usr/share/nginx/html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Misc->actionContact()
#5 /usr/share/nginx/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /usr/share/nginx/html/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
["url"] => string(48) "http://redacted.tld/index.php?misc/contact"
["_GET"] => array(1) {
["misc/contact"] => string(0) ""
}
["_POST"] => array(7) {
["subject"] => string(4) "test"
["message"] => string(4) "test"
["_xfToken"] => string(8) "********"
["redirect"] => string(35) "http://redacted.tld/index.php"
["_xfRequestUri"] => string(10) "/index.php"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
I ran the test file and it told me "text email sent" – yet I did not receive any mail. This server was created from an image used on another domain name, maybe that will shed some light on the issue.
 
Im not really good with checking the mail programs myself. My most recent server I used postfix and just followed a guide. If you have never had any php driven software on the server sending email it might not be configured yet. Out of the box an email "server" is not necessarily set up. Testing a few distros I happened upon the fact the Cent OS 7 install from DO happened to have it setup already.
 
Since this install was nearly fresh but imported from an image, I'm just going to install it again and see if this fixes it, I think it should.

I need to figure out the best MySQL setup now since I do need remote access available...
 
CloudFlare should not intercept any of the outbound ports, only the inbound (outbound would be any firewall in effect on the server itself).
If you are on a VPS, you need to review your mail log and see if there are any connection errors there.
 
Yeah this is still not working – new users are having the same issue here. Does anyone know what modules on my server that I might be missing for this to work properly?

Code:
Zend_Mail_Transport_Exception: Email to edhernan7144@gmail.com failed: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137
Generated By: Charcoal7144, Yesterday at 3:56 AM
Stack Trace
#0 /usr/share/nginx/html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /usr/share/nginx/html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /usr/share/nginx/html/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
#3 /usr/share/nginx/html/library/XenForo/Mail.php(152): XenForo_Mail->sendMail(Object(Zend_Mail))
#4 /usr/share/nginx/html/library/XenForo/Model/UserConfirmation.php(136): XenForo_Mail->send('edhernan7144@gm...', 'Charcoal7144')
#5 /usr/share/nginx/html/library/XenForo/ControllerPublic/AccountConfirmation.php(103): XenForo_Model_UserConfirmation->sendEmailConfirmation(Array)
#6 /usr/share/nginx/html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_AccountConfirmation->actionResend()
#7 /usr/share/nginx/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /usr/share/nginx/html/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(63) "http://architecturemc.net/index.php?account-confirmation/resend"
  ["_GET"] => array(1) {
    ["account-confirmation/resend"] => string(0) ""
  }
  ["_POST"] => array(5) {
    ["_xfToken"] => string(8) "********"
    ["_xfConfirm"] => string(1) "1"
    ["_xfRequestUri"] => string(28) "/index.php?register/register"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Delete...Clo
 
Have you tested sending an email from the command line, outside of Xenforo? If that works, then check your virtual host domain versus the domain in your hosts file. Outbound mail from your XF installation shouldn't be dependent on inbound firewall rules, but temporarily disabling your firewall, and doing an email test from the command line, will prove that for you.

If you continue to have difficulty; either spin up a separate instance on Digital Ocean and download/install iRedMail or consider setting up a free account on Mailgun. iRedMail is a complete email server package, and even the free version will provide impressive reports. It helped me better understand what I was doing wrong (when I managed my own email server).

My development site/server still uses Mailgun for outbound email notifications (which is free), but I use Rackspace's Cloud Email service to handle outbound emails from my Xenforo site ($2/mo per mailbox, $10/mo minimum).
 
Back
Top Bottom