Results 1 to 9 of 9

Thread: I can't sent an email via port 587.

  1. #1
    Join Date
    Oct 2018
    Posts
    4

    Unhappy I can't sent an email via port 587.

    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 Code:
    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 <= warun@wnx.io H=(oi.wnx.io) [::1] P=esmtpa A=login:warun@wnx.io S=554 id=97e11c81809fbe44aa030cc2897b24d8@wnx.io T="X" from <warun@wnx.io> for warunzero@gmail.com
    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

  2. #2
    Join Date
    May 2014
    Location
    Netherlands Germany
    Posts
    396
    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
    DUTCH GERMAN, GERMAN DUTCH

  3. #3
    Join Date
    Jul 2008
    Location
    Maastricht
    Posts
    3,694
    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.
    Greetings, Richard.

  4. #4
    Join Date
    Oct 2018
    Posts
    4
    Quote Originally Posted by Richard G View Post
    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

  5. #5
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,939
    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).
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

  6. #6
    Join Date
    Oct 2018
    Posts
    4

    Unhappy

    Quote Originally Posted by zEitEr View Post
    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_Refere...rted_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.

  7. #7
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,939
    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.
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

  8. #8
    Join Date
    Oct 2018
    Posts
    4

    Unhappy

    Quote Originally Posted by zEitEr View Post
    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..

  9. #9
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,939
    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.
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •