oacar
By:
oacar

Yandex SMTP is too slow.

July 18, 2017 849 views
Email Ubuntu 16.04

Hello everyone,

I have a wordpress droplet. I am using yandex mail on my domain but whenever I try with "contact form" on my page, it takes minutes to send the message.

I checked the entire forum and saw similiar problems with gmail. and to be honest with you I couldnt understand the exact solution.

I wonder will you please tell me to step by step solution. I am sure it will be helpful for the others too.

thanks in advance.

3 Answers
oacar July 20, 2017
Accepted Answer

SOLUTION

sudoedit /etc/gai.conf

and than I added precedence ::ffff:0:0/96 100

and sudo service apache2 restart

Hi @oacar

How have you implemented the contact form in WordPress - manually or with a plugin?

  • hello,
    thanks for your reply. I use contact 7 form plugin and I recetly migrated to digitalocean. The contact form was working fine when I was on different hosting.

    • @oacar

      Are you connecting to smtp.yandex.ru via SSL on port 465 ?

      Could you try to install WP Mail SMTP, which you can setup, so it logs the process - without a log, it's really difficult to figure out where the problem is.
      https://wordpress.org/plugins/wp-mail-smtp/

      Or you could try Yandex Mail, but it doesn't seem to have a logging option:
      https://wordpress.org/plugins/yandex-mail/

      • hello again,

        yes it is already installed see the picture

        yandex.ru or com both working fine.

        the thing is; contact form works fine except it takes almost a minute to send the message.

        <^>Test Message Sent
        The result was:
        bool(true)
        Content Cell | Content Cell<^>

        The SMTP debugging output is shown below:
        2017-07-18 23:01:53 Connection: opening to ssl://smtp.yandex.com:465, timeout=300, options=array (
        )
        2017-07-18 23:04:01 Connection: opened

        • @oacar

          Since smtp.yandex.com is just a CNAME of smtp.yandex.ru, it's better to use the .ru
          Do you have IPv6 activated on your droplet? That could be the reason, since I'm only getting 1 IPv6 address, when looking up smtp.yandex.ru, but I'm getting 5 IPv4 addresses.

          Is your account on DigitalOcean new? If yes, then there are some blocking filters in place sometimes - to prevent spam. In that case you need to open a ticket in Support via the control panel.

ok I set it as "ru" and yes IPv6 is activated.

my account is old one but the wordpress droplet is new.

what should I tell to support?

  • @oacar

    My first suggestion would be to disable your IPv6 temporarily and then test again.
    If the problem is with IPv6 on Yandex, then you can change the priority, since IPv6 is preferred over IPv4:
    https://askubuntu.com/questions/32298/prefer-a-ipv4-dns-lookups-before-aaaaipv6-lookups
    Another way would be to setup something like the Postfix mail server in a send-only setup and have that relay the mail to Yandex. Then you would setup WordPress to send mail to localhost, since Postfix would then queue the mail and send it.

    I think you're okay if your account is old, but otherwise you would ask if your account has any SMTP-blocking and if it could be removed.

    • thank you so much. I opened a ticket.

      I will share the solution once they reply.

Have another answer? Share your knowledge.