• Resolved joaquinferrero

    (@joaquinferrero)


    Situation:

    A website (www.mysite.com) is hosted on a site other than the one of your mail server (mail.mysite.com).

    The website responds to both the mysite.com and https://www.mysite.com addresses

    The Easy WP SMTP user correctly configures the options for the SMTP dialog.

    Problem:

    When the plugin generates the mail result of a form, the mail server on mysite.com it rejects it at the time of sending the EHLO command, with a similar message
    to this:

    2021-04-21 17:11:25 H=(mysite.com) [xx.xx.xx.xx] rejected EHLO or HELO mysite.com: No you are not ME or OURS (HELO was [mysite.com] and equal my local domains or my domains relay)

    Cause of error:

    When the plugin generates the mail result of a form, it makes use of the library PHPMailer. This library establishes a series of default values, which are used for the vast majority of cases. One of them is the value of $Ehlo variable. If this value is empty, the library takes the value of $Hostname variable. If this value is empty, it takes it from the name of the server where it is running.

    As it turns out the site is set to mysite.com, that’s the name you use with the EHLO command. And when the mail arrives at the mail server, it rejects it because it does not support emails from machines other than his own (with the same name).

    Immediate solutions (one of these):

    1- Change the name of the web server to https://www.mysite.com, so that this is the value that PHPMailer take. This solution will not work if the reverse resolution of https://www.mysite.com is not correct (case of mail servers that check the direct AND inverse resolution names of incoming connections). For example, https://www.mysite.com resolve to xx.xx.xx.xx, and the inverse resolution of this IP are dns9198.phdns17.info, so the email is rejected.

    2- Configure the mail server so that it directly admits external emails from mysite.com (this solution is a bit dangerous). If it can be restricted to the IP of https://www.mysite.com, perfect.

    3- Edit the PHPMailer.php file to change the line

    public $Helo = ”;

    or the line

    public $Hostname = ”;

    to indicate the name (*NOT IP*) of the server that hosts https://www.mysite.com (for example, dns9198.phdns17.info). This solution is *not* maintainable – it will be lost in the next library update.

    Ideal solution:

    Since PHPMailer does not consider the case of reading the default SMTP configuration from an external file, nor from the global variables of WordPress, the plugin should allow editing the value of Ehlo or Hostname, taking the first default value the name of the web server where it is running or take it from the name of the mail server that is being indicated. Most users would not need fill in this field, so it should be filled in automatically, ideally in the time to show the plugin for the first time.

    JF

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter joaquinferrero

    (@joaquinferrero)

    4- Adding an add_action() to functions.php, like this thread:
    https://www.ads-software.com/support/topic/ehlo-protocol-issue/

    Hi,

    What type of server is your site hosted in? What contact form are you running in your site?

    Thank you

    Thread Starter joaquinferrero

    (@joaquinferrero)

    Linux Debian v9
    Apache v2.4.25 webserver
    Fast-CGI for PHP v7.0, v7.3 and v7.4
    Exim4 mailserver
    Wordpress v5.7.1 with contact forms:
    acumbamail-signup-forms
    contact-form-7

    Thank you for reporting back. Your server specs looks okay to me. However most users don’t run into this issue. It could be related to the contact form plugin you are using or some settings in your email server that might be causing this issue.

    Anyhow it is good that you found a solution and shared it here. I am sure this will help others running into the same issue as you.

    Kind regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘EHLO Problem and Solved’ is closed to new replies.