1

Topic: [FAQ] How to enable signing disclaimer on outgoing mails?

Note: Please check our tutorial for the latest update: Sign disclaimer on outgoing emails.
----------------------------

iRedMail uses Amavisd-new plus alterMIME to implement this feature, it is configured but disabled by default after installation.

You can find disclaimer settings in /etc/amavisd.conf (RHEL/CentOS) or /etc/amavis/conf.d/50-user (Debian/Ubuntu), it's self-documented:

# ------------ Disclaimer Setting ---------------
# Uncomment this line to enable singing disclaimer in outgoing mails.
#$defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];

# Program used to signing disclaimer in outgoing mails.
$altermime = '/usr/bin/altermime';

# Disclaimer in plain text formart.
@altermime_args_disclaimer = qw(--disclaimer=/etc/postfix/disclaimer/_OPTION_.txt --disclaimer-html=/etc/postfix/disclaimer/_OPTION_.txt --force-for-bad-html);

@disclaimer_options_bysender_maps = ({
    # Per-domain disclaimer setting: /etc/postfix/disclaimer/host1.iredmail.org.txt
    #'host1.iredmail.org' => 'host1.iredmail.org',

    # Sub-domain disclaimer setting: /etc/postfix/disclaimer/iredmail.org.txt
    #'.iredmail.org'      => 'iredmail.org',

    # Per-user disclaimer setting: /etc/postfix/disclaimer/boss.iredmail.org.txt
    #'boss@iredmail.org'  => 'boss.iredmail.org',

    # Catch-all disclaimer setting: /etc/postfix/disclaimer/default.txt
    '.' => 'default',
},);
# ------------ End Disclaimer Setting ---------------

That's all configurations we need for singing disclaimer on outgoing mails, but it's disabled with this setting in the above:

#$defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];

What you need to do to enable it is uncomment this line, and append your domain name in @local_domains_maps list, like this:

@local_domains_maps = ['demo.iredmail.org', 'YOUR_DOMAIN.LTD',];

$defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];

It should work as expected after you restart amavisd (RHEL/CentOS) or amavis (Debian/Ubuntu) service.

Next step is edit related files to add disclaimer text you want.

_OPTION_ in '@altermime_args_disclaimer' is a placeholder, do *NOT* change it, it will be replaced by filename you defined in '@disclaimer_options_bysender_maps'.

To add a catch-all disclaimer setting, what you need to do is edit file /etc/postfix/disclaimer/default.txt, add plain text paragraphs which you want to displayed in the mail foot of every outgoing mails.

As it's self-documented, you can add per-user, per-domain, sub-domain settings like the sample lines.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.