• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Can't send mails to external email addresses

kerven

New Pleskian
1&1 Cloud VPS
CentOS Linux 7.5.1804 (Core)
Plesk Onyx Version 17.0.17 Update #51


I want to start saying that I am new to this.

I have no problem when I send mails to addresses hosted on my server, but if I send an email to an address hosted on an external server, for example, @Gmail or @hotmail, the email will appear as "deferred" at the mail queue.

You can see this when you click on the email subject in the mail queue:

Received: from [192.168.0.103] (unknown [149.12.70.149])
by localhost.localdomain (Postfix) with ESMTPSA id AE48F8AF6C
for <[email protected]>; Fri, 11 May 2018 11:57:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eer.com;
s=default; t=1526039835;
bh=VNp6wzPt+btOqouiBxhNZE0k5bqwb+sAqHHpQhKZSaQ=; l=517;
h=To:From:Subject;
b=GLalMARxunKNAw1mTWd4yrJa/mPEAQ9VVq7MqwEaiSr2EpXEdQaDCDgm50PVF9INb
WpjPjmQ1GVdDToiZt+mMPjr4yBBvsiGCrcg+6PfxtIwgGOdslaZvzNLTO6V/YJ4pnC
GFsislUiVfEK561L0YuybHjW//DAgeZBWZotrM2k=
To: [email protected]
From: El Espejito Roto <[email protected]>
Subject: NEW EMAIL
Message-ID: <[email protected]>
Disposition-Notification-To: El Espejito Roto <[email protected]>
Date: Fri, 11 May 2018 13:57:07 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.7.0
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="------------F3E5A1299F81BC130FABBF8B"
Content-Language: es-ES


And this is what you will see in the maillog file:

May 11 11:57:15 eer postfix/smtpd[22262]: warning: hostname mta50.flancher.com does not resolve to address 149.12.70.149: Name or service not known
May 11 11:57:15 eer postfix/smtpd[22262]: connect from unknown[149.12.70.149]
May 11 11:57:15 eer postfix/smtpd[22262]: AE48F8AF6C: client=unknown[149.12.70.149], sasl_method=CRAM-MD5, [email protected]
May 11 11:57:15 eer postfix/cleanup[22265]: AE48F8AF6C: message-id=<[email protected]>
May 11 11:57:15 eer /usr/lib64/plesk-9.0/psa-pc-remote[20228]: handlers_stderr: SKIP
May 11 11:57:15 eer /usr/lib64/plesk-9.0/psa-pc-remote[20228]: SKIP during call 'check-quota' handler
May 11 11:57:15 eer /usr/lib64/plesk-9.0/psa-pc-remote[20228]: handlers_stderr: PASS
May 11 11:57:15 eer /usr/lib64/plesk-9.0/psa-pc-remote[20228]: PASS during call 'dd51-domainkeys' handler
May 11 11:57:15 eer postfix/qmgr[20273]: AE48F8AF6C: from=<[email protected]>, size=1242, nrcpt=1 (queue active)
May 11 11:57:16 eer postfix/smtpd[22262]: disconnect from unknown[149.12.70.149]
May 11 11:57:16 eer postfix/smtpd[22185]: connect from unknown[181.214.206.20]
May 11 11:57:16 eer plesk_saslauthd[22271]: listen=6, status=5, dbpath='/var/spool/postfix/plesk/passwd.db', keypath='/var/spool/postfix/plesk/passwd_db_key', chroot=0, unprivileged=1
May 11 11:57:16 eer plesk_saslauthd[22271]: privileges set to (89:89) (effective 89:89)
May 11 11:57:16 eer plesk_saslauthd[22271]: No such user '[email protected]' in mail authorization database
May 11 11:57:16 eer plesk_saslauthd[22271]: failed mail authenticatication attempt for user '[email protected]' (password len=7)
May 11 11:57:16 eer postfix/smtpd[22185]: warning: unknown[181.214.206.20]: SASL LOGIN authentication failed: authentication failure
May 11 11:57:16 eer postfix/smtpd[22185]: disconnect from unknown[181.214.206.20]


Any idea what is happening?
 
you can try to login to your system via ssh and get more details about the deferred mails like:
# postqueue -p
Each queue entry shows the queue file ID, message size, arrival
time, sender, and the recipients that still need to be deliv-
ered. If mail could not be delivered upon the last attempt, the
reason for failure is shown.
 
you can try to login to your system via ssh and get more details about the deferred mails like:
# postqueue -p

After sending a mail to a gmail address, "postqueue -p" shows queue id, size, arrival time and sender, and just before the recipient address it shows the following:
connect to alt2.gmail-smtp-in.l.google.com[74.125.200.26]:25: Connection timed out
 
From the server, are you able to telnet to Google's MX?

[root@pink ~]# telnet alt2.gmail-smtp-in.l.google.com 25
Trying 209.85.203.27...
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP u10-v6si2917432edm.124 - gsmtp

Since you're unable to send mail to multiple providers it sounds like the issue may be a firewall that is blocking outgoing port 25....
 
From the server, are you able to telnet to Google's MX?

[root@pink ~]# telnet alt2.gmail-smtp-in.l.google.com 25
Trying 209.85.203.27...
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP u10-v6si2917432edm.124 - gsmtp

Since you're unable to send mail to multiple providers it sounds like the issue may be a firewall that is blocking outgoing port 25....

I have unlocked port 25, even so, I can not connect through telnet, so I will contact the hosting company, because maybe they are blocking the port
 
Who's the provider?

The provider is 1&1.

I just talked to their technical service some minutes ago and they have solved the problem. I've been told that by default they always block port 25. Even if you unlock it from the control panel, it will still be blocked. Only they can do it.

I think it would be good if all 1&1 customers knew about it.

Thank you very much for your help.
 
Back
Top