Mail is not working properly on a Plesk server when server hostname is 'localhost.localdomain'

Follow

Comments

4 comments

  • Avatar
    esa Software

    Fix does not work.

     

    74.208.165.208 was found to be using the following name as the HELO/EHLO parameter during connections: "localhost.localdomain".

    Hostname is set. esaproductmanager.com in GUI

     

    Command Line:

    # hostname
    esaproductmanager.com

     

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    @esa Software, Hi! It means that 'myhostname' parameter is explicitly defined in '/etc/postfix/main.cf' configuration file. Set the required hostname in /etc/postfix/main.cf manually.

    0
    Comment actions Permalink
  • Avatar
    Paul Schmidt (Edited )

    I couldn't get this to work on the Google Cloud Platform with Plesk.  I did all the steps.  Step 3 works for a short time, but it gets reset to the GCP name quickly, after setting. So we still get this error when PHP runs from the command line or cron, unless we run it immediately after the manual host name change.  The command line also prints the error (echo '[MESSAGE]' | mail -s [SUBJECT] [EMAIL@EXAMPLE.COM])

    We are using sendgrid and the mail actually gets delivered.  The messages we see may just be warnings?

    0
    Comment actions Permalink
  • Avatar
    Leonid Gukhman (Edited )

    @Paul Schmidt According to the following link, the behavior of hostname changing is expected on Google Cloud instances: https://stackoverflow.com/questions/25313049/configuring-fqdn-for-gce-instance-on-startup. So, a script can be set up as described in https://stackoverflow.com/questions/25408612/google-compute-engine-how-to-set-hostname-permanently to change the hostname upon reboot.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request