Wordpress email trouble

August 10, 2019 474 views
WordPress PHP Nginx Email Ubuntu 16.04

Hi, guys

My website is not sending emails / notifications anymore.

Can someone give me a hand to just configure my site back to its basic functioning?

There is no connectivity at all. All the ports with no connection.

Thanks!!

Transport   Socket  Status* Service Available   Server ID   Authentication
None    Login   Plain   CRAM-MD5    OAuth 2.0
SMTP    localhost:25    Closed  No  -   -   -   -   -   -
SMTP    localhost:465   Closed  Checking..  -   -   -   -   -   -
SMTP    localhost:587   Checking..  -   -   -   -   -   -   -
Mandrill API    mandrillapp.com:443 Checking..  -   -   n/a
SendGrid API    api.sendgrid.com:443    Checking..  -   -   n/a
Mailgun API api.mailgun.net:443 Checking..  -   -   n/a
9 Answers

Hello,

What I could suggest here is using an SMTP plugin for your Wordpress site.

That way you will be able to specify an SMTP server with authentication which your emails would be going through. You could for example use Gmail’s SMTP settings. This would drastically increase the delivery rate of your emails as well compared to using plain PHP mail.

I’ve been using this plugin for a while now and it works very well: Easy WP SMTP

Hope that this helps!
Regards,
Bobby

  • Hi, @bobbyiliev

    Thanks.
    I am using the Post SMTP, but nothing is happening. I have not tried Gmail settings though. There is no connectivity at all. I have posted in the plugin’s forum, but no answer up to now.

    • Hello,

      What are the SMTP settings that you are using at the moment? Note that if you want to use your local server from SMTP, you should have a mail agent like Postfix or Exim running and configured. If you don’t have that you could use an external SMTP service like Gmail for example.

      Note that if you have an active firewall on your server, you would need to open outgoing tcp traffic for port 24, 465 and 587 so that your server could communicate with your SMTP sever.

      Hope that this helps!
      Bobby

      • smtp.migadu.com port 587 STARTTLS

        Working fine outside my wp site, but when wp site tries to connect does not succeed.

        SMTP    smtp.migadu.com:25  Closed  No  -   -   -   -   -   -
        SMTP    smtp.migadu.com:465 Closed  Checking..  -   -   -   -   -   -
        SMTP    smtp.migadu.com:587 Closed  Checking..
        

@bobbyiliev

I allowed ports 25 and 587 for smtp via putty, but still the connectivity test is giving me a negative result.

SMTP    smtp.migadu.com:25  Closed  Checking..  -   -   -   -   -   -
SMTP    smtp.migadu.com:465 Closed  No  -   -   -   -   -   -
SMTP    smtp.migadu.com:587 Closed  Checking..
  • Hello,

    What you could try is via putty to connect on port 25 to this site to check if the problem is at your end:

    telnet portquiz.net 25
    

    If you are not able to connect, then the problem is most likely at your end and you need to cross check your firewall rules again.

    If you are able to connect then the problem is at migadu’s end. Maybe they are blocking your IP. What you could do is get in touch with them so that they could provide you with more information.

    Let me know how it goes!
    Bobby

In both ports, 25 and 587, it was not able to connect.


To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
Nginx Full                 ALLOW       Anywhere
22                         ALLOW       Anywhere
80                         ALLOW       Anywhere
587                        ALLOW       Anywhere
25                         ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
Nginx Full (v6)            ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
587 (v6)                   ALLOW       Anywhere (v6)
25 (v6)                    ALLOW       Anywhere (v6)

[deleted]
  • Hello,

    It should be something like:

    sudo ufw allow out 25
    sudo ufw allow out 465
    sudo ufw allow out 587
    

    Let me know if that works!
    Bobby

    • @bobbyiliev

      I did the outgoing rules. But before i test it. I delete a rule accidentally.

      OpenSSH (v6)               ALLOW       Anywhere (v6)
      

      Can orient me how to set it back?

      • You could allow the ssh access again with:

        sudo ufw allow ssh
        
        • :(

          Skipping adding existing rule
          Skipping adding existing rule (v6)
          

          I am trying but it does not allow me… i am scred to set it all again… and maybe be locked out of my droplet. :(

@bobbyiliev

right… thank you…
let’s test the connectivity then

@bobbyiliev

test negativ.

Ports closed.

To                         Action      From
--                         ------      ----
80,443/tcp (Nginx Full)    ALLOW IN    Anywhere
22                         ALLOW IN    Anywhere
80                         ALLOW IN    Anywhere
80,443/tcp (Nginx Full (v6)) ALLOW IN    Anywhere (v6)
22 (v6)                    ALLOW IN    Anywhere (v6)
80 (v6)                    ALLOW IN    Anywhere (v6)

25                         ALLOW OUT   Anywhere
465                        ALLOW OUT   Anywhere
587                        ALLOW OUT   Anywhere
25 (v6)                    ALLOW OUT   Anywhere (v6)
465 (v6)                   ALLOW OUT   Anywhere (v6)
587 (v6)                   ALLOW OUT   Anywhere (v6)

I am so sorry.
:(
Thanks for helping.

SMTP    smtp.migadu.com:25  Closed  No  -   -   -   -   -   -
SMTP    smtp.migadu.com:465 Closed  Checking..  -   -   -   -   -   -
SMTP    smtp.migadu.com:587 Closed  Checking..  -   -   -   -   -   -
Mandrill API    mandrillapp.com:443 Open    Checking..  -   n/a
SendGrid API    api.sendgrid.com:443    Checking..  -   -   n/a
Mailgun API api.mailgun.net:443 Open    Checking.
  • Ok so now if you try to telnet to portquiz on port 587 what do you get?

    telnet portquiz.net 587
    

    If you are able to connect to portquiz then it is most likely a problem at Migadu.

    • telnet portquiz.net 587
      Trying 52.47.209.216…
      
      

      Nothing happens

      THANKS

      • Then it is likely to be something at your end. Maybe as a test try turning off ufw for a minute and then try again.

        Also have you recently installed any other firewalls like CSF for example that could be causing the issue?

        • @bobbyiliev

          Ok… i’ll turn off UFW and test.

          I have only the Wordfence plugin for a long time.

          The test is giving back ‘trying’ for a long time, as before.

How to run a treaceroute?

  • Open your terminal.

    Run the following to install in Ubuntu:

    sudo apt-get install traceroute
    

    Once completed run

    traceroute portquiz.net
    

    Traceroute will show you where you are going through in order to get to portquiz.net. Once you have the results, provide them in bobbyiliev’s reply.

    Kind regards,
    Kalin D.

@bobbyiliev

Hi, friend

After rebooting there were 52 packages to be updated. I did the upgrade.
Then the connection with portquiz was ok. There was no need to trace the route.
Then i activated the plugin Post Smpt and the website’s mailing system is normalized.

I thank you guys so much for caring, @Kdimitrov

OMMMMMMMMMMM

  • Hi Areku,

    I’m happy to hear that it is all working now! And thanks for sharing your solution with the community!

    Regards,
    Bobby

Have another answer? Share your knowledge.