Cannot send email via postfix to external mail server [SOLVED]

General support questions
Post Reply
crocodile9
Posts: 11
Joined: 2015/06/08 10:22:38

Cannot send email via postfix to external mail server [SOLVED]

Post by crocodile9 » 2020/09/12 10:47:17

I found out that sending mail from localhost to external mail server does not requires to setup local mail server, everything is carried out by mail client which is installed.
So I've tried but received this email:

Code: Select all

From MAILER-DAEMON  Fri Sep 11 21:27:30 2020
Return-Path: <>
X-Original-To: root@localhost.localdomain
Delivered-To: root@localhost.localdomain
Date: Fri, 11 Sep 2020 21:27:30 +0400 (+04)
From: MAILER-DAEMON@localhost.localdomain (Mail Delivery System)
Subject: Mail Delivery Status Report
To: root@localhost.localdomain
Auto-Submitted: auto-replied
Content-Type: multipart/report; report-type=delivery-status;
    boundary="8710C83AC36.1599845250/localhost.localdomain"
Status: RO

Part 1:
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host localhost.localdomain.

Enclosed is the mail delivery report that you requested.

                   The mail system

<dustycrocodile9@gmail.com>: delivery temporarily suspended: connect to
    alt2.gmail-smtp-in.l.google.com[142.250.4.26]:25: Connection timed out

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status


Part 3:
Content-Description: Message Headers
Content-Type: text/rfc822-headers

Return-Path: <root@localhost.localdomain>
Received: by localhost.localdomain (Postfix, from userid 0)
    id 8710C83AC36; Fri, 11 Sep 2020 21:27:30 +0400 (+04)
Date: Fri, 11 Sep 2020 21:27:30 +0400
To: dustycrocodile9@gmail.com
Subject: test
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20200911172730.8710C83AC36@localhost.localdomain>
From: root@localhost.localdomain (root)
Obviously I missed something, may be a gmail configuration to accept such emails ?
Sorry guys if that was dumb question :)
Last edited by crocodile9 on 2020/09/12 14:55:03, edited 2 times in total.

User avatar
TrevorH
Forum Moderator
Posts: 29491
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot send email via postfix to external mail server

Post by TrevorH » 2020/09/12 13:45:00

Google, in common with most email hosting companies, blacklist a lot of domestic ip address ranges as the mail that comes from those is usually virus/botnet generated SPAM. It looks like they have your ip blocked. Many ISP's also block outbound port 25 traffic from domestic ip addresses and only allow it if it's destined for their own ISP supplied mail relay.

Can your system get to the internet at all? If not then that's your answer. If it can and you can e.g. ping that ip address then it's likely to be one of those two possibilities.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

crocodile9
Posts: 11
Joined: 2015/06/08 10:22:38

Re: Cannot send email via postfix to external mail server

Post by crocodile9 » 2020/09/12 14:30:36

Thank you for your replay. Yes, I can ping gmail.com. It's the second case, I've checked with my ISP and my ISP blocks traffic at 25 port.

Post Reply

Return to “CentOS 7 - General Support”