An example using Stalwart using Docker + Traefik, Caddy, etc #206
Replies: 10 comments 3 replies
-
There are no examples because there is not much to configure. You just need to define the IP address(es) where your proxied connections are coming from as explained here. |
Beta Was this translation helpful? Give feedback.
-
Hi @shoutmarble some nice docs of your efforts here. Unclear, did you get it working with traefik in the end? I tried before proxy protocol was added, so need to go back and retry with it now being supported. |
Beta Was this translation helpful? Give feedback.
-
Why would you need 'Traefik to send it's own "Treafik self-signed certificate" to the Stalwart Docker container.'? Have you tried just getting the easier jmap working, as that is a standard https connection in traefik. I had it working, except the incorrect remote IP was given as stalwart did not have proxy protocol at that point, but it should work now in theory. |
Beta Was this translation helpful? Give feedback.
-
Don't all the listeners need adjusting from external binds to internal only binds too? |
Beta Was this translation helpful? Give feedback.
-
I use NixOS and only have a working config for 0.4.2 of SW, which did not support proxy protocol at that point, so I don't think it will be much help. I have some config waiting for PP support, but I have not tried it with anything beyond 0.4.2 Posting all of these notes makes it impossible to read anything, so will let you use it as a paste pad. Anything specific let me know, I might have tried it. If these are your 'real' configs and not test ones, I'd remove them all from here :-/ |
Beta Was this translation helpful? Give feedback.
-
Haproxy with Stalwart
Then verify that you can connect to all the Stalwart ports
|
Beta Was this translation helpful? Give feedback.
-
Here Traefik standalone running Stalwart Server.
|
Beta Was this translation helpful? Give feedback.
-
TRaefik running Stalwart Although this is "working," I do not think it is optimal. It is not using Proxy-Protocol. TRaefik is only forwarding IP traffic not using Proxy-Protocol. The Stalwart Proxy-Protocol is being used Stalwart (trusted IPs uncommented in server.toml) and they may be connecting to The log messages show that connections "sometimes get socket closed errors" All the ports are working...but sometimes with the
|
Beta Was this translation helpful? Give feedback.
-
Anyone got an example for Caddy? This is my first time setting up anykind of server and it's quite a lot to learn. Since Caddy doesn't suppot SMTP, IMAP or POP3 does this even work with Caddy? If it does, can I just set up the Caddyfile like this?
|
Beta Was this translation helpful? Give feedback.
-
Trying the same, and I know from my other mailserver this wouldnt work with just simply adding things to the Caddyfile. Stalwart so far doesnt seem to have actually a simple "use the keys over there" - feature. A working workaround would be putting the key contents in the Server -> TLS - > Certificates-fields. But this isnt a useful solution for automatic renewables, but for testing purposes. |
Beta Was this translation helpful? Give feedback.
-
Are there any examples available of Stalwart being used with a reverse proxy?
{edit}
Working Stalwart examples
Haproxy Stalwart
Traefik Stalwart
Beta Was this translation helpful? Give feedback.
All reactions