Configuring mynetwork maps in Zimbra

Revision as of 10:13, 20 June 2018 by Irfan (talk | contribs) (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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 is to use mynetworks_maps in postfix. Below steps are tested on ZCS 8.7.11.

  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

Create a hashmap with:

  postmap /opt/zimbra/conf/network_table

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'));

Restart ZCS

  zmcontrol restart
Jump to: navigation, search