Zimbra Tips : How To Disable Disclaimer When Reply and Forward Email

Posted by

When you configure disclaimer on Zimbra, disclaimer will display on every email that you sent, reply or forward. Yes, you can configure disclaimer only for outgoing email. However, If you correspond with the same person, disclaimer still display on every email that you sent, reply or forward.

For some users, the disclaimer annoying enough. You can disable disclaimer when reply and forward email. If disclaimer not show formerly when you reply email, disclaimer will display. But, if disclaimer have been there, disclaimer will not display

The following are step by step to custom disclaimer

# Create amavis custom

vi /opt/zimbra/conf/amavisd-reply-fw.conf

Fill with the following line

package Amavis::Custom;
use strict;
sub new {
  my($class,$conn,$msginfo) = @_;
  my($self) = bless {}, $class;
  my($subj) = $msginfo->get_header_field_body('subject');
  my($refs) = $msginfo->get_header_field_body('references');
  my($inre) = $msginfo->get_header_field_body('in-reply-to');
  if ($msginfo->originating &&
      (defined $refs || defined $inre || $subj =~ /^\s*re:/i)) {
    Amavis::load_policy_bank('OUR-REPLY');
  }
  $self;
}
1;  # insure a defined return

# Save and edit amavisd.conf.in

cp /opt/zimbra/conf/amavisd.conf.in /opt/zimbra/conf/amavisd.conf.in-backup
vi /opt/zimbra/conf/amavisd.conf.in

Add the following line before $policy_bank{‘ORIGINATING_POST’}.

$policy_bank{'OUR-REPLY'} = {
  allow_disclaimers => 0,
};

include_config_files('/opt/zimbra/conf/amavisd-reply-fw.conf');

# Save and restart Amavis

zmamavisdctl restart

Please try to send and reply email

Good luck and hopefully useful 🙂

Source : https://sourceforge.net/p/amavis/mailman/message/24129901/

7 comments

  1. Hey, thanks a lot! It’s working!
    I just modified the settings to adapt it to my needs: I wanted to disable the disclaimer for emails sent to a specific domain :

    amavisd-reply-fw.conf renamed amavisd-no-disclaimer-4domain :
    package Amavis::Custom;
    use strict;
    sub new {
    my($class,$conn,$msginfo) = @_;
    my($self) = bless {}, $class;
    my($dest) = $msginfo->get_header_field_body(‘To:’);
    if ($msginfo->originating &&
    (defined $dest =~ /^\s*DOMAINNAME/i)) {
    Amavis::load_policy_bank(‘NO-DISCLAIMER-4DOMAIN’);
    }
    $self;
    }
    1; # insure a defined return

    And my /opt/zimbra/conf/amavisd.conf.in
    $policy_bank{‘NO-DISCLAIMER’} = {
    allow_disclaimers => 0,
    };

    include_config_files(‘/opt/zimbra/conf/amavisd-disclaimer-exception.conf’);

    Very good, thank you !

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.