How to use Proxmox Mail Gateway as an outgoing SMTP service.

Lamaster

Active Member
May 28, 2018
10
2
43
42
Hello all.
I am looking if I can use the Proxmox Mail Gateway as an outgoing SMTP service.
I have a local network and several servers in different clouds. I have several domains, and I need to send all emails to anyone, but from one relay.


BR
 

Attachments

  • 2023-09-21_15-32-56.png
    2023-09-21_15-32-56.png
    47.8 KB · Views: 153
Last edited:
I am looking if I can use the Proxmox Mail Gateway as an outgoing SMTP service.
I have a local network and several servers in different clouds. I have several domains, and I need to send all emails to anyone, but from one relay.
Yes - this should work - just configure your internal services to relay mail to your PMG on the internal port (default is port 26) - and add their ips to
GUI->Configuration->Mail Proxy->Networks

See the reference documentation on the topic:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#_filtering_outgoing_emails

I hope this helps!
 
  • Like
Reactions: Lamaster
Good day all!
Sorry for necroposting, but I'v got the same situation.

Incoming emails: Internet smtp clients (25) ==> Firewall (25) ==> PMG (25) (Dafeult relay: 192.168.1.10:25 internal postfix+dovcot) – all working nice, greate result of filtering.

Outbounding emails: Internet smtp clients (25) ==> Firewall (25) ==> PMG (25) - and what I'v got: for relay domain email are sending, but for other external domains I'v got error:
NOQUEUE: reject: RCPT from unknown[...]: 554 5.7.1 <mail@gmail.com>: Relay access denied; from=<mail@relaydomain.ru> to=<mail@gmail.com> proto=ESMTP helo=<[...]>

7 nights without sleep ))
Please, help!
 
Thank's for quick reply!
But I can't understand: I should redirect 25 port from WAN to 25 port on local mail server (postfix with "relayhost=[PMG]:26"). In this case PMG gets mails on local 26 port from trusted network.
But I'v already got rule redirect "25 from WAN to PMG 25" for incoming mails from Inet. How can I do this?
 
Thank's to all!
My rules on firewall:
Incoming: MX servers (gmail etc) =>25Firewall=>PMG 25 (Default relay 'postfix+dovecot')
Outgoing: Thunderbird WAN=> 465,587 Firewall => postfix+dovecot => 26 PMG