“Failed to connect to server”
Looks more like a cloudflare/firewall topic.
English
Could not auth SMTP
Is not there any method for cloudflare issues? I cannot still solve this issue. I can send mails if I use brevo but I would like to use my own mailer. Any idea?
@esackbauer @ETNyx can it be NGINX issue? I am using cloudpanel server. I installed the mailcow there.
If this is Cloudflare issue and you are unable to reconfigure cloudflare to allow port 465, then try to use backend IP of your mailcow server instead, this could bypass cloudflare.
- Edited
ETNyx I guess cloudflare only supports 80 ,443 ports. BTW I can send email via Webmail SOGo. How is that possible?
mailcow/mailcow-dockerized2549
https://gist.github.com/amorfo77/e9d2a08cf76bf2cbaecce89c765f4763
Issue is similar, just looking how can I apply the solution on my application
- Edited
Well you did censor your screenshot so i will ask, if you make dig A mail.***.co.uk
or use tools like https://mxtoolbox.com ip you get belong to cloudflare right?
[unknown] I guess cloudflare only supports 80 ,443 ports. BTW I can send email via Webmail SOGo. How is that possible?
Basicly you are comunicating whit SOGo over internet on 443 port (https) but SOGo comunicate whit Postfix (smtp server) only internaly so no Cloudflare or any outside firewall that blocking connection is involved
- Edited
ETNyx well.. isn’t it strange?
So if SOGo can communicate well with Postfix and as a result postfix can send email on SMTP. The issue is basically not related to postfix settings. Am I wrong?
ETNyx I guess I enter the wrong credentials for username, password. How can I set a general one in Mailcow?
HTTP_PORT=7080
HTTP_BIND=127.0.0.1
HTTPS_PORT=7443
HTTPS_BIND=127.0.0.1
btw my http ports set like this
- Edited
I understand that you are trying to to solve this, but you are posting to many things at once and lacking context. So,..
1) on screenshot using telnet you leak your public IPv6 so i can PRT this so I now know your FDQN you are trying to hide. If you want to anonymyze this you need anonymize this too,…
2) Your IP under this FDQN is (i will censor it to for your safety) 5.180.-4-.-1- I believe this IP is not part of cloudflare so you are not proxing, you just using cloudflare as NS (DNS) also visible on first screen from CF (DNS only not proxy), so cloudflare should not be an issue in this matter.
3) screen from MX is uncomplete and says nothing in this form.
4) screens from STMP connection if im not mistaken are not from your PHP server? Also irelevant
In sum I strongly believe that you are hiting filrewall close to your PHP server, you need look there. This mean write to your server provider, if it is behind NAT write to you ISP
edit: about HTTP port, if you are using smtp,imap and so these does not matter.
ETNyx
thank you for your touching the anonymize details on IP port. My effort is mostly for brand safety. I can restrict/block any non-wanted request or attack etc. The mail server is installed separately and only works on DNS settings. I do not think it is a server provider issue but will try to contact them. Because if that was blocked by server provider 25,465,587 ports, I would not be able to send and receive via SOGo, I also set the firewall rules on “CloudPanel” for those ports. Cannot exactly define the issue source, might be debian, cloudpanel, cloudflare, mailcow. Not sure about to where should I look.
Ok, let’s try to simplify your situation. Mapping your situation
- Server-A where Mailcow is installed, using IP-A
- Server-B where PHP
Try from Server-B nmap IP-A -p465
I got this result (masking your IP and FDQN)
Nmap scan report for ma--.-------.co.uk (5.180.-4-.-1-)
Host is up (0.13s latency).
PORT STATE SERVICE
465/tcp open smtps
Nmap done: 1 IP address (1 host up) scanned in 3.03 seconds
On first line you can se your FDQN from PTR followed by IP and lately 465/tcp port open. Also I’m able to ping and telnet 465 your server. So configuration of Server-A from my side is OK no firewall blocking in front. Are you able to reproduce this from Server-B ?
- Best Answerset by devinsomnia
ETNyx I appreciated for your help. Thank you so much
autodiscover.tcp 0 1 443
imaps.tcp 0 1 993
imap.tcp 0 1 143
pop3s.tcp 0 1 995
smtps.tcp 0 1 465
submission.tcp 0 1 587
I added these SRVs to my cloudflare DNS settings, after that I make sure about that 25,465,587 ports are permitted ipV4 and ipV6 connections on both servers (mail and host separated). In my case I am using the laravel and if you are looking a same kind of solution who ever find this topic and looking for result, just make sure your smtp is set to “mail” not “smtp” in your mail.php file.