Does pmg support this use case ?

tarball

Member
Nov 1, 2011
24
1
23
Hello !

I own a domain that I would like to filter the mail for.
I don't want to *host* the mail for the domain I own but rather want the mail for <user1>@mydomain.com to be filtered via PMG and then forwarded to <user2>@gmail|isp.com.
So in other words, I don't want to store e-mail for <user1>@mydomain.com, I want the e-mail filtered then forwarded to another mailbox on another domain (gmail, yahoo, ISP..).
Similar to a .forward in <user1>@mydomain.com pointing to <user2>@gmail|isp.com; except without the need for a mail server in @mydomain.com

Is this possible ? I glanced over the doc and couldn't see anything like it, maybe i missed something ?

Thank you
 
Possible - yes - but it's not a use-case PMG is designed for.
Meaning - PMG uses postfix as MTA - and you configure that to do the forwarding to your @gmail|isp mailaddress using the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

However this is not included in the GUI or supported by the enterprise support

I hope this helps!
Ah thank you ! I was expecting this to be a more common use-case. I'll give it a try.
 
Ah thank you ! I was expecting this to be a more common use-case. I'll give it a try.
Everything works fine now -- Might want to add this to the GUI imho, it's only a few more lists and text files to manage. It's functionality that could become a great feature imho. Thanks again @Stoiko Ivanov
 
- Added domain1.com to Configuration->Mail Proxy->Relay Domains list
- SSH into the pmg node as root

mkdir -p /etc/pmg/templates/ ; cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates/

- Added the following to /etc/pmg/templates/main.cf.in

relay_domains = hash:/etc/pmg/domains virtual_alias_maps = hash:/etc/postfix/virtual

root@mx:cat /etc/pmg/domains domain1.com 1

root@mx:/etc/pmg/templates# cat /etc/postfix/virtual ############### ## domain1.com ############## user_1@domain1.com user_1_gmail@gmail.com user_2@domain1.com user_2_gmail@yahoo.com
root@mx:postmap /etc/postfix/virtual
root@mx:postconf -m
root@mx:pmgconfig sync --restart 1

This link was also useful w.r.t the configuration of virtual users with postfix.
 
  • Like
Reactions: hata_ph

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!