• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved My mail server is on a spam list

brownbag

Basic Pleskian
My outgoing mail is being blocked by certain mail servers with the following error:
<helocheck@abuseat.org>: host mail.abuseat.org[54.93.50.35] said: 550 *** The
HELO for IP address 139.180.168.140 was 'localhost.localdomain' (invalid
syntax) *** (in reply to RCPT TO command)

It appears that to resolve this, I have to "correct your HELO localhost.localdomain and if needed, configure your mail server with correct DNS (forward and reverse) and HELO/EHLO values".
My mail server is on my plesk server and I'm using phpmailer to send mail.

The code that I use to send mail (edited for privacy and simplicy reasons) is:

PHP:
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

        $mail = new PHPMailer(true);

        //Server settings
        $mail->SMTPDebug = 0;
        $mail->isSMTP();
        $mail->Host       = 'mydomain.com';
        $mail->SMTPAuth   = true;
        $mail->Username   = 'smtp@mydomain.com';
        $mail->Password   = '***************';
        $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
        $mail->Port       = 587;

        //Recipients
        $mail->setFrom(contact@mydomain.com.au, 'My company');
        $mail->addAddress(johnsmith@gmail.com);
        $mail->addCC($cc_email);
        $mail->addReplyTo(donotreply@mydomain.com.au, 'do not reply');

        // Content
        $mail->isHTML(true);
        $mail->Subject = 'subject';
        $mail->Body    = 'message';
        $mail->AltBody = 'message';

        $mail->send();

Can I get some advice on areas that I should look for to 'fix' this problem.
 
I have found a solution that seems to be suited. My hostname wasn't set so that's probably the issue.
I've modified the hostname by modifying /etc/hosts, but what is odd is that it is not reflected immediately.

My hosts file is as follows:

127.0.0.1 localhost.localdomain localhost

# The following lines are desirable for IPv6 capable hosts
::1 localhost.localdomain localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
hostname servername.mydomain.com

changes to hostname are meant to take effect immediately but the hostname command still returns
localhost.localdomain.

do I need to remove the first line which seems to set it to localhost.localdomain? Why is this line there?
 
Back
Top