1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email Ports

Discussion in 'Server Configuration and Hosting' started by chrishill, Dec 31, 2014.

  1. chrishill

    chrishill 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!
     
  2. rainmotorsports

    rainmotorsports Well-Known Member

    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.
     
  3. chrishill

    chrishill Active Member

    @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"
    }
    }
     
  4. rainmotorsports

    rainmotorsports Well-Known Member

  5. chrishill

    chrishill Active Member

    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.
     
  6. rainmotorsports

    rainmotorsports Well-Known Member

    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.
     
  7. chrishill

    chrishill Active Member

    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...
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    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.
     
  9. chrishill

    chrishill Active Member

    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
     
  10. motowebmaster

    motowebmaster Active Member

    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).
     
    MattW likes this.

Share This Page