• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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:
<[email protected]>: 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   = '[email protected]';
        $mail->Password   = '***************';
        $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
        $mail->Port       = 587;

        //Recipients
        $mail->setFrom([email protected], 'My company');
        $mail->addAddress([email protected]);
        $mail->addCC($cc_email);
        $mail->addReplyTo([email protected], '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