I can't sent an email via port 587.

WarunWnX

New member
Joined
Oct 12, 2018
Messages
4
From what I know my VPS got port 25 and 465 blocked by the ISP except port 587.

I am sure that my csf is not blocking port 587

I have tried telnet smtp.gmail.com 587 and it connected perfectly.

This is my exim log :

HTML:
2018-10-13 04:38:52 cwd=/ 3 args: /usr/sbin/exim -bd -q1h
2018-10-13 04:38:52 exim 4.91 daemon started: pid=7548, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2018-10-13 04:38:52 cwd=/var/spool/exim 2 args: /usr/sbin/exim -qG
2018-10-13 04:40:59 1gB4XO-0001oq-0S H=gmail-smtp-in.l.google.com [2404:6800:4003:c04::1a] Connection timed out
2018-10-13 04:41:54 1gB5By-0001z8-GZ <= [email protected] H=(oi.wnx.io) [::1] P=esmtpa A=login:[email protected] S=554 [email protected] T="X" from <[email protected]> for [email protected]
2018-10-13 04:41:54 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1gB5By-0001z8-GZ
2018-10-13 04:43:06 1gB4XO-0001oq-0S H=gmail-smtp-in.l.google.com [172.217.194.26] Connection timed out
 
Web search csf port 587 and so on for mail settings for example tcp out in udp and so on.
Could help i don;t know the setting by head.

mail block and so more config settings
 
Since port 25 and 465 is still active too, this will probably be tried first.

You could try changing this line in /etc/exim.conf:
daemon_smtp_ports = 25 : 587 : 465
to
daemon_smtp_ports = 587
and restart exim.

then only port 587 is used for smtp. If it does not work, you can easily change it back.

Remember when exim.conf is updated, the changes might be overwritten, so if it works you have to look for a way to keep this setting. It can be done, just don't remember how at the moment.
 
Since port 25 and 465 is still active too, this will probably be tried first.

You could try changing this line in /etc/exim.conf:
daemon_smtp_ports = 25 : 587 : 465
to
daemon_smtp_ports = 587
and restart exim.

then only port 587 is used for smtp. If it does not work, you can easily change it back.

Remember when exim.conf is updated, the changes might be overwritten, so if it works you have to look for a way to keep this setting. It can be done, just don't remember how at the moment.

I have tried this but it still log the connection timed like the the same.

Thanks
 
I see the 25 port is opened for incoming connections. If you still have an issue with outgoing connections then try and disable firewall. If you still have the issue even with the disabled firewall you need to contact your VPS provider support team (I believe it's DigitalOcean).
 
I see the 25 port is opened for incoming connections. If you still have an issue with outgoing connections then try and disable firewall. If you still have the issue even with the disabled firewall you need to contact your VPS provider support team (I believe it's DigitalOcean).

Yes it's DO

Yes I have try it wihout firewall (csf-x) but it still the same.

I have contact them and thier reply is :

In terms of workarounds, here are your options:

1. Utilize port 587 for SMTP

2. Utilize a 3rd party mail API, such as Sendgrid: https://sendgrid.com/docs/API_Reference/index.html

3. Utilize a non-default SMTP port like 2525. We don't affiliate with anyone, but Sendgrid, which I've used before as I mentioned also offers that: https://sendgrid.com/docs/API_Reference/SMTP_API/getting_started_smtp.html

And I try so hard to make port 587 work but it's wouldn't my mail server can only receive an email but can't sent it.
 
Sorry, but did they confirm that they blocked outgoing connections for your droplet to remote 25 port or what?

I have several droplets from them , and I don't have issues with 25 port in both directions.
 
Sorry, but did they confirm that they blocked outgoing connections for your droplet to remote 25 port or what?

I have several droplets from them , and I don't have issues with 25 port in both directions.

Yes they bloked my 25 port just just because I am a new user I guess but when I contacted them to unblock they said they can't and let me use just only port 587..
 
If this is the case then you don't have other options. And if you want to stay with DO further, then either follow their recommendations or use another your server, VPS for relaying outgoing emails.
 
Back
Top