2.2. Uninstall

Run as zimbra user:

zmprov ms `hostname` zimbraMtaSmtpdMilters ""
zmprov ms `hostname` zimbraMtaNonSmtpdMilters ""

Edit master.cf.in file (assume that your’re in /opt/zimbra directory), use vi, pico or any other text editor:

vi /common/conf/master.cf.in

Remove content_filter value at line 120 (it could differ in your configuration):

[%%zimbraLocalBindAddress%%]:10025 inet n  -       n       -       -  smtpd
        -o content_filter=smtp:[%%zimbraLocalBindAddress%%]:42104
        -o local_recipient_maps=

After edit it should look like this:

[%%zimbraLocalBindAddress%%]:10025 inet n  -       n       -       -  smtpd
        -o content_filter=
        -o local_recipient_maps=

Go to the end of the file and look for this part:

[%%zimbraLocalBindAddress%%]:42105   inet    n   -   n   -   -   smtpd
        -o content_filter=
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_relay_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
        -o smtp_address_preference=ipv4

Remove it, save changes and exit text editor.

Reload Zimbra mail transport agent:

zmmtactl reload

As root or with sudo run:

systemctl stop mshzimbrarules
systemctl disable mshzimbrarules
rm /etc/init.d/mshzimbrarules
rm -rf /opt/msh-zimbra-rules

And remove msh user:

userdel msh

That’s all.