[SOLVED] How to relay incoming from multiple mail server through proxmox mailgateway

InGenetic

Member
Sep 8, 2020
25
1
23
50
Hi all,

is that possible to relay inbound (incoming mail) from multiple mail server using 1 proxmox mail gateway ,
i've tried , but it's always failed, only success for one mail server , the example as below :

- proxmox mailgateway = pmg.abc.com ( public ip address :1.1.1.1)
- mail server1 = mail.abc.com (public ip address 2.2.2.2)
- mail server2 = mail.xyz.com (public ip address 3.3.3.3)
- mail server3 = mail.yyy.com (public ip address 4.4.4.4)

what i try to do is :
1. relaying = set default relay to mail.abc.com (2.2.2.2)
2. relay domain =
- abc.com
- xyz.com
- yyy.com
3. port default =
External SMTP Port = 25
Internal SMTP port = 26
4. Option = default
5. Transport =
- relay domain = abc.com , host = mail.abc.com , SMTP , port 26 , Use MX= No
- relay domain = xyz.com , host = mail.xyz.com , SMTP , port 26 , Use MX= No
- relay domain = yyy.com , host = mail.yyy.com , SMTP , port 26 , Use MX= No
6. Network =
- 1.1.1.1/32
- 2.2.2.2/32
- 3.3.3.3/32
- 4.4.4.4/32
7. TLS = default (all No)
8. DKIM = Default
9. Whitelist = (domain sender)
- abc.com
- xyz.com
- yyy.com

but the proxmox mail gateway can only relay incoming mail server which is defaut relay = mail.abc.com (2.2.2.2)
the others mail server can not relay incoming mail server, and stuck on proxmox mail gateway

Note: all MTA mail server already set relay to : pmg.abc.com:26
for outgoing email is working fine , but for incoming mail only 1 server can relay through proxmox mail gateway

can anyone help me, if possible to relay incominng from multiple mail server using 1 proxmox gateway.
i've no idea how to setup this condition.

Thanks n regards,
 
Usually you just set the MX record for abc.com, xyz.com, yyy.com to pmg.abc.com - then all mail from the internet goes to pmg (which then needs transport (GUI->Configuration->MailProxy entries (abc.com -> mail.abc.com (port 25), xyz.com -> mail.xyz.com, ...))

This should work - if not provide the logs of pmg when receiving mail

I hope this helps!
 
Hi mr.Stoiko Ivanov,

Thanks for your reply, fyi for all mx record mail server already set to pmg.abc.com with priortiy 0, and priority 10 for their mail server it self (ex:mail.abc.com, priority 0) what i've not to set they port using 25 on transport, by the way how about the use mx option on transport for all mail server ? Use or not for Mx option?


By the way how about the external smtp relay for each mail server ? Still using pmg.abc.com:26 ? Or 25?

Please advice
 
Last edited:
and priority 10 for their mail server it self
keep in mind that in some cases spammers do/did target lower-prio MX to bypass spam-detection - which would happen in your case

what i've not to set they port using 25 on transport
this is needed so that PMG knows where to send the mail to...

y the way how about the external smtp relay for each mail server ? Still using pmg.abc.com:26 ?
port 25 is the external port - port 26 the internal one - from the internal port all IPs in the trusted networks can send mails everywhere, on the internal port only mails _for_ the relay domains should be accepted

this is all quite well explained in the reference documentation:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#chapter_deployment
 
keep in mind that in some cases spammers do/did target lower-prio MX to bypass spam-detection - which would happen in your case


this is needed so that PMG knows where to send the mail to...


port 25 is the external port - port 26 the internal one - from the internal port all IPs in the trusted networks can send mails everywhere, on the internal port only mails _for_ the relay domains should be accepted

this is all quite well explained in the reference documentation:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#chapter_deployment
Hi mr. Stoiko Ivanov,

Thanks now my proxmox already running, and i have to learn about the all free feature on proxmox mail gateway , before we decided to subscribe next level ( for my company use )

btw about this :

keep in mind that in some cases spammers do/did target lower-prio MX to bypass spam-detection - which would happen in your case

it's mean we just create 2 mx entry on each mail server , ex: priorty 0 to pmg site , and priority 20 to our mx backup ? and not entry our mail server mx ( mail.abc.com ) ? on mx record of domain abc.com ? is it right sir ?
 
it's mean we just create 2 mx entry on each mail server , ex: priorty 0 to pmg site , and priority 20 to our mx backup ?
yes - that would sound reasonable - make sure your backup mx relays the mails to pmg
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!