Configuring mynetwork maps in Zimbra: Difference between revisions
(Created page with "Default limit for mynetworks in postifx is ~4000 characters. If you have large list of networks/IPs to allow in mynetworks, then using zimbraMtaMyNetworks does not helps. Fur...") |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{BC|Certified}} | |||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=Configuring_mynetwork_maps_in_Zimbra= | |||
<hr> | |||
{{KB|{{ZC}}|{{ZCS 8.7}}|||}} | |||
{{WIP}} | |||
====Problem==== | |||
Default limit for mynetworks in postifx is ~4000 characters. If you have large list of networks/IPs to allow in mynetworks, then using zimbraMtaMyNetworks does not helps. Further zimbraMTAMyNetworks has a character limit of 10240. | Default limit for mynetworks in postifx is ~4000 characters. If you have large list of networks/IPs to allow in mynetworks, then using zimbraMtaMyNetworks does not helps. Further zimbraMTAMyNetworks has a character limit of 10240. | ||
====Solution==== | |||
Solution is to use mynetworks_maps in postfix. Below steps are tested on ZCS 8.7.11. | Solution is to use mynetworks_maps in postfix. Below steps are tested on ZCS 8.7.11. | ||
=====Step 1===== | |||
su - zimbra | su - zimbra | ||
zmprov ms `zmhostname` zimbraMtaMyNetworks "lmdb:/opt/zimbra/conf/network_table" | zmprov ms `zmhostname` zimbraMtaMyNetworks "lmdb:/opt/zimbra/conf/network_table" | ||
Line 13: | Line 24: | ||
2.2.2.2 OK | 2.2.2.2 OK | ||
=====Step 2===== | |||
Create a hashmap with: | Create a hashmap with: | ||
postmap /opt/zimbra/conf/network_table | postmap /opt/zimbra/conf/network_table | ||
=====Step 3===== | |||
Change below line in /opt/zimbra/conf/amavisd.conf.in to help amavisd process mynetwork maps. | Change below line in /opt/zimbra/conf/amavisd.conf.in to help amavisd process mynetwork maps. | ||
Line 25: | Line 38: | ||
@mynetworks_maps = qw( read_array('/opt/zimbra/conf/network_table')); | @mynetworks_maps = qw( read_array('/opt/zimbra/conf/network_table')); | ||
=====Step 4===== | |||
Restart ZCS | Restart ZCS | ||
zmcontrol restart | zmcontrol restart | ||
{{Article Footer|ZCS 8.7|2018-07-26}} |
Latest revision as of 23:35, 20 August 2018
Configuring_mynetwork_maps_in_Zimbra
Problem
Default limit for mynetworks in postifx is ~4000 characters. If you have large list of networks/IPs to allow in mynetworks, then using zimbraMtaMyNetworks does not helps. Further zimbraMTAMyNetworks has a character limit of 10240.
Solution
Solution is to use mynetworks_maps in postfix. Below steps are tested on ZCS 8.7.11.
Step 1
su - zimbra zmprov ms `zmhostname` zimbraMtaMyNetworks "lmdb:/opt/zimbra/conf/network_table"
Configure the list of IPs in /opt/zimbra/conf/network_table in below format. Make sure to include server's ethernet and localhost IPs.
127.0.0.1 OK <SERVERIP> OK 1.1.1.1 OK 2.2.2.2 OK
Step 2
Create a hashmap with:
postmap /opt/zimbra/conf/network_table
Step 3
Change below line in /opt/zimbra/conf/amavisd.conf.in to help amavisd process mynetwork maps.
@mynetworks = qw( %%zimbraMtaMyNetworks%% );
Change to:
@mynetworks_maps = qw( read_array('/opt/zimbra/conf/network_table'));
Step 4
Restart ZCS
zmcontrol restart