Hi There,
Lastly I am working on a laravel project and installed the mailcow. But I have auth issue. Do you have any idea about this auth issue how I can solve it? SOGo works well as expected. [USES CLOUDFLARE]

Btw is that logical to use as SMTP Username and password as defined in the section “Sender-dependent transports”?

My .env configuration

MAIL_DRIVER=smtp
MAIL_HOST=mail.secreturl.com
MAIL_PORT=25
MAIL_USERNAME=DefinedusernameinSDT
MAIL_PASSWORD=DefinedpasswordinSDT
MAIL_ENCRYPTION=tls

thank you for solution suggestion


SMTP 587

SMTP 465

[unknown]

BTW server Architecture is aarch64

  • 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.

Port 25 is suppose to be used to server to server communication in meaning of SMTPD to SMTPD. Your PHP (although server) is in client role. You should use 465. On this port you got connection timeout, this is most likely because of some firewall on the way. Most likely your server provider is blocking this port.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

“Failed to connect to server”
Looks more like a cloudflare/firewall topic.

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?

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.

    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

      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

      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 ?

          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.

          No one is typing