Proxmox Mail Gatway as a Relay in Stalwart #2211
Replies: 9 comments 15 replies
-
|
Definitely upvote this enhancement request |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, I just did. At least now I know its a known issue and not a configuration error on my part. |
Beta Was this translation helpful? Give feedback.
-
|
A roundabout way of having an FQDN would be adding an entry to your /etc/hosts file like: 192.168.x.x mx.proxmox.local |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the suggestion. I tried that but it's still looking for an mx record. A work around may be to set something up in my pihole config to simulate a local mx record. I haven't tried it yet though. |
Beta Was this translation helpful? Give feedback.
-
|
I think in your config, Although I have that in my config, I am currently running into the same issue: have configured an IP as relay host but stalwart keeps trying to do MX lookups. |
Beta Was this translation helpful? Give feedback.
-
|
I am noticing some of your key names (
|
Beta Was this translation helpful? Give feedback.
-
|
I added this to the end of the config.toml file: [queue.strategy] [queue.route.proxmox_mg] I rebooted Stalwart, and sent an email, but got the same error. So I checked the WebUI and it still shows the old config for the Relay Host proxmox_mg. It's as if its ignoring the config file, so I removed the relay and now the log shows: 2025-10-13T16:27:49Z WARN Remote host ID not found (smtp.remote-id-not-found) queueId = 268630217004109824, from = "myemail", to = ["[email protected]"], size = 3094, total = 1, id = "proxmox_mg" AI suggested I add, the following but it didn't help. [smtp.client.remote.proxmox_mg] |
Beta Was this translation helpful? Give feedback.
-
|
@pepa65 You said
I'm using Stalwart v0.13.4 and my UI doesn't have the strategies setting. Any idea why? (Screenshot) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @pepa65, for pointing out the admin UI manual update, and the reason why delivery suddenly stopped working was that routes turned into strategies. I have Stalwart on automatic upgrade with watchtower, but if it can just suddenly stop working during a minor version upgrade, I don't think that'll be a good configuration. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to configure Proxmox Mail Gateway (PMG) as a relay in Stalwart. Previously, I used SMTP2GO, so all I had to do was set a new relay host to my PMG IP on port 26. However, when I send an email, I immediately get the error:
"connection to '192.168.x.x' failed: record not found for MX"
I suspected an issue with the web GUI, so I manually added the following to the config file:
[queue.strategy]
route = [
{ if = "is_local_domain('*', rcpt_domain)", then = "'local'" },
{ else = "'proxmox_mg'" }
]
[queue.route.proxmox_mg]
type = "smtp"
host = "192.168.x.x"
port = 26
This did not resolve the issue. PMG logs show no connection attempts from Stalwart, so I considered it might be a network problem. However, running
openssl s_client -crlf -starttls smtp -connect 192.168.x.x:26
from the Stalwart container successfully connects, and I see the connection in the PMG logs. This confirms it's not a networking issue.
I read that: Stalwart’s [queue.route.proxmox_mg] relay config may need a hostname/FQDN (like proxmox.local or pmg.internal.lan) instead of a bare IP address. Some mail servers, if given an IP, will try to perform deliver-as-MX instead of just connecting directly. Is this true? Using a FQDN isn't an option presently.
Beta Was this translation helpful? Give feedback.
All reactions