Learn about Centmin Mod LEMP Stack today
Become a Member

Xenforo Not confirming emails? is it getting blocked?

Discussion in 'Forum software usage' started by saigoncrypto, May 25, 2020.

  1. saigoncrypto

    saigoncrypto New Member

    23
    2
    3
    Nov 14, 2017
    Ratings:
    +2
    Local Time:
    12:21 AM
    So I am using Sendgrid to send out the registration emails. When the user clicks on the emailed link to confirm registration, Xenforo runs into an issue.

    Attached is the error message i am getting. Is the port or something getting blocked by centmin firewall or something? I get a connection time out so it seems as if centmin is blocking sengrid.


    stacktrace:
    #0 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(289): Swift_Transport_AbstractSmtpTransport->_getFullResponse(0)
    #1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(117): Swift_Transport_AbstractSmtpTransport->_readGreeting()
    #2 src/XF/Mail/Mailer.php(274): Swift_Transport_AbstractSmtpTransport->start()
    #3 src/XF/Mail/Queue.php(138): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SmtpTransport), Array)
    #4 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(G)
    #5 src/XF/Job/Manager.php(253): XF\Job\MailQueue->run(G)
    #6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
    #7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
    #8 job.php(42): XF\Job\Manager->runQueue(false, 8)
    #9 {main}

    http://i.imgur.com/shC45S2.png
     
  2. redbot

    redbot Dreaming of Debmin Mod

    51
    10
    8
    Mar 30, 2020
    Ratings:
    +25
    Local Time:
    2:21 AM
    open

    /etc/csf/csf.conf

    find

    TCP_OUT =

    is 465 included? It should be, as it's default.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,381
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Has the Sendgrid configured SMTP for forum emails ever worked ? Worked but just started not working ? Or never worked at all ? As per https://sendgrid.com/docs/for-developers/sending-email/getting-started-smtp/ make sure you have the right settings for Sendgrid which are for TLS on ports 25, 587 and 2525 or SSL on port 465.

    Example

    xenforo2-email-option-smtp-sendgrid-tls-587.png

    Centmin Mod uses CSF Firewall to protect the server with whitelisted ports added in custom port list for TCP_IN/TCP_OUT and TCP6_IN and TCP6_OUT comma separated list of ports in CSF Firewall config file at /etc/csf/csf.conf.

    You can edit, add or remove ports you require and then restart CSF Firewall service for it to take effect. You can see a list of default Centmin Mod CSF Firewall handled ports at CSF - Centmin Mod LEMP stack CSF Firewall default port listing.

    In SSH you can type this command to have a quick overview of existing ports for the respective variables. TCP_OUT and TCP6_OUT should already have ports 465 and 587 whitelisted which you can check
    Code (Text):
    egrep '^TCP_|^TCP6_|^UDP_|^UDP6_' /etc/csf/csf.conf
    

    Output will be a comma separated list of port numbers that are white listed by CSF Firewall
    Code (Text):
    TCP_IN =
    TCP_OUT =
    UDP_IN =
    UDP_OUT =
    TCP6_IN =
    TCP6_OUT =
    UDP6_IN =
    UDP6_OUT =
    

    To restart CSF Firewall
    Code (Text):
    csf -r
    
     
  4. saigoncrypto

    saigoncrypto New Member

    23
    2
    3
    Nov 14, 2017
    Ratings:
    +2
    Local Time:
    12:21 AM
    when i try running:
    Code:
    csf -r
    i get the following error codes:
    Code:
    iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    
    So i am looking into this and it seems that iptables is not working.. that is strange because I do remember it working in the past... not sure why it is not working now. Should I update the kernel? current kernel is: kernel-3.10.0-1127.el7.x86_64
     
    Last edited: May 26, 2020
  5. eva2000

    eva2000 Administrator Staff Member

    55,381
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:21 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Who is the web host and plan you're on ? What type of VPS server ? virtualization used ? OpenVZ, KVM, Xen, VMWare ?

    output for
    Code (Text):
    virt-what

    and
    Code (Text):
    perl /etc/csf/csftest.pl

    example of good output indicating CSF Firewall and iptables will work properly
    Code (Text):
    perl /etc/csf/csftest.pl
    Testing ip_tables/iptable_filter...OK
    Testing ipt_LOG...OK
    Testing ipt_multiport/xt_multiport...OK
    Testing ipt_REJECT...OK
    Testing ipt_state/xt_state...OK
    Testing ipt_limit/xt_limit...OK
    Testing ipt_recent...OK
    Testing xt_connlimit...OK
    Testing ipt_owner/xt_owner...OK
    Testing iptable_nat/ipt_REDIRECT...OK
    Testing iptable_nat/ipt_DNAT...OK
    RESULT: csf should function on this server
    
     
  6. saigoncrypto

    saigoncrypto New Member

    23
    2
    3
    Nov 14, 2017
    Ratings:
    +2
    Local Time:
    12:21 AM
    Thanks for the help eva2000 - i think it had something to do with my kernel... I updated my kernel to 5.4.43 and refreshed CSF firewall.