Centos 7 - i am unable to send emails using postfix

0

I am trying to send an email from postfix to gmail, but it only says that the network is unreachable i have ports 25, 465 and 587 open both on firewall-cmd and my router.

I am not experienced with email servers at all, i just followed this tutorial: http://www.krizna.com/centos/setup-mail-server-centos-7/

it says this:

Dec 31 11:07:25 localhost postfix/smtp[27282]: connect to gmail-smtp-in.l.google.com[173.194.222.26]:25: Connection timed out
Dec 31 11:07:55 localhost postfix/smtp[27282]: connect to alt1.gmail-smtp-in.l.google.com[64.233.189.27]:25: Connection timed out

Please help

Jojo01

Posted 2015-12-31T09:12:42.540

Reputation: 103

Try running nmap 173.194.222.26 -p 25. What's the result? – nKn – 2015-12-31T09:18:45.073

here's the result: `Starting Nmap 6.40 ( http://nmap.org ) at 2015-12-31 11:30 EET Nmap scan report for lo-in-f26.1e100.net (173.194.222.26) Host is up (0.019s latency). PORT STATE SERVICE 25/tcp filtered smtp

Nmap done: 1 IP address (1 host up) scanned in 0.32 seconds`

– Jojo01 – 2015-12-31T09:31:18.993

Well, you are unable to reach the host because the port is filtered, either by your machine's firewall for outgoing connections on port 25, either by your router, or the destination host has blocked you (which is unlikely). The same command returns open here, so I'd bet for the first two options. – nKn – 2015-12-31T09:34:49.970

It might be because of selinux, i'm trying to send this mail from roundcube webmail – Jojo01 – 2015-12-31T09:57:26.193

Just try temporarily disabling it: setenforce 0 – nKn – 2015-12-31T09:58:43.407

Maybe its because i am using a standard user: rc in roundcube to login to smtp – Jojo01 – 2015-12-31T10:12:53.713

The setenforce command should be run as root, indeed. – nKn – 2015-12-31T10:18:29.200

i ran it as root – Jojo01 – 2015-12-31T10:19:07.073

Should i post my configs? – Jojo01 – 2015-12-31T10:21:14.210

I ran the command traceroute, it looks like the packets are not getting past my pc's firewall, which is odd... – Jojo01 – 2015-12-31T10:49:07.113

Try port 465 .. Your ISP might block outgoing smtp over port 25 (it's a common spammer thing to use smtp port 25). – txtechhelp – 2015-12-31T11:24:41.030

i changed port in roundcube settings, but it keeps trying on port 25: here i am trying to send to my outlook adress: Dec 31 15:34:05 localhost postfix/smtp[30198]: connect to mx1.hotmail.com[134.170.2.199]:25: Connection timed out Dec 31 15:34:12 localhost postfix/smtp[30374]: connect to mx3.hotmail.com[65.55.37.120]:25: Connection timed out Dec 31 15:34:35 localhost postfix/smtp[30198]: connect to mx3.hotmail.com[65.55.92.136]:25: Connection timed out – Jojo01 – 2015-12-31T13:36:15.720

No answers