Problem with Communication on Port 465 (access to smtp Mailrise)

I am using Mailrise (an SMTP server) for unencrypted communication on my local network on port 8025. I would like to use Mailrise as an SMTP server for a public domain, but I am unable to establish communication. For secure connections, I want to use Traefik with a certificate so that I don't have to implement another certificate in Mailrise.

I imagine that Traefik will take care of the encrypted connection, which will be relayed to Mailrise as plain text only. My idea:

[user:465] ==> [router:465] ==> [traefik:465 to :8025] --> [mailrise:8025]

I can't seem to make a connection and I really don't know what I'm doing wrong. I'm definitely missing something, but what?

send-mailmessage -from "admin@homelab.local" -to "telegram@mailrise.xyz" -subject "Windows Test" -body "Test message" -smtpserver mailrise.mydomain.com -port 465
or
send-mailmessage -from "admin@homelab.local" -to "telegram@mailrise.xyz" -subject "Windows Test" -body "Test message" -smtpserver mailrise.mydomain.com -port 465 -UseSsl

Error: net_io_connectionclosed.
Traefik log:

{"level":"error","error":"read tcp 172.20.0.4:465->192.168.10.50:53998: i/o timeout","time":"2024-05-31T07:13:35Z","message":"Error while Peeking first byte"}

My configuration (Traefik v3):

tcp:
  routers:
    mailrise-router:
      entryPoints:
        - mailsecure
      rule: "HostSNI(`mailrise.mydomain.com`)"
      service: mailrise-service
      tls:
        certResolver: cloudflare
  services:
    mailrise-service:
      loadBalancer:
        servers:
          - address: 192.168.30.30:8085    # mailrise server
entryPoints:          
  mailsecure:
    address: ":465"

Thanks for any ideas.

Mailrise seems to have full documentation to use Traefik. If that does not work, I suggest you open an issue with them.

I don’t know your IP structure, I am not sure which connection is getting the error. Client to Traefik or Traefik to target service.

I've tried following the instructions on the mailrise website, but it failed to connect. I have put in a request but no response. That's why I'm turning to the community here. I assume users here understand how not to make a connection.

The network structure is simple. Traefik runs in the same Docker as Mailrise, same IP (Ubuntu, Proxmox VE). Router has port forwarding set to 80, 443 465 to this server. All http services run reliably, this is the only one I can't figure out.

IP:

Router (UDM Pro): 192.168.1.1
Client (Win11): 192.168.10.50
Ubuntu VM Proxmox (Docker: Traefik, Mailrise): 192.168.30.30

This works:

send-mailmessage -from "admin@homelab.local" -to "telegram@mailrise.xyz" -subject "Windows Test" -body "Test message" -smtpserver 192.168.30.30 -port 8025

Are you sure send-mailmessage is supporting plain TLS on port 465? I quickly checked with a chatbot and it says there are different standards and port 465 would be deprecated.

I didn't think of that :scream: Good point! I tried another agent and immediately Traefik gives me a different log:

{"level":"error","error":"dial tcp 192.168.30.30:8085: connect: connection refused","time":"2024-05-31T12:54:36Z","message":"Error while dialing backend"}

@luepuma77: You're absolutely right, the problem was in PowerShell, which doesn't really support port 465. I just fixed the mailrise port typo and it's working!

I wouldn't have thought of this at all, so thank you! :clap:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.