Limit IPs that send through internal port 26?

Nikole

Well-Known Member
Jun 3, 2013
41
0
46
Hello,

I understand that the default configuration is to allow relaying from the internal port 26 to all IPs that belong to the "localnets".
I.e all IPs on the same internal subnet.
Although in some situations this might be fine, I would like to limit this to specific IPs on the postfix level (i.e not with a firewall).
Any ideas?

Any help is much appreciated!
Nikole
 
I understand that the default configuration is to allow relaying from the internal port 26 to all IPs that belong to the "localnets".
I.e all IPs on the same internal subnet.
Although in some situations this might be fine, I would like to limit this to specific IPs on the postfix level (i.e not with a firewall).
Any ideas?
the generation of the mynetworks variable is hardcoded:
https://git.proxmox.com/?p=pmg-api....147afa45e2a392ff64985987c15f64f;hb=HEAD#l1318

so this cannot be easily changed (and serves as a sensible default I think)

Anyways - the postfix config is generated through the templating system, which uses perl's template-toolkit - you can try to remove the localnet with a filter (search for 'remove'):
http://www.template-toolkit.org/docs/manual/Filters.html

for the templateing system in pmg check the reference documentation:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

I hope this helps!