1

Topic: Trying to add html disclaimer

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySql
- Linux/BSD distribution name and version:  Ubuntu 14.04
- Related log if you're reporting an issue:
====


In my /etc/amavis/conf.d/50-user

@altermime_args_disclaimer = qw( --verbose   --disclaimer-html=/etc/postfix/disclaimer/_OPTION_.html --force-for-bad-html);

# --disclaimer=/etc/postfix/disclaimer/_OPTION_.txt  with this or without it html are not added


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

    'company1.com' => 'company1.com',
    'company2.com' => 'company2.com',

    # 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',

    'user1@company1.com' => 'user1.company1.com',
    'user2@company2.com' => 'user2.company2.com',

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

In my /etc/postfix/disclaimer i had both .txt and .html version of default. company1.com, company1.com, user1, user2, it only works for .txt.
I removed .txt versions and no result, no html disclaimer is added.


I found this in my logs errors like this


 (09731-01) (!!)collect_results from [10530] (/usr/bin/altermime): exit 1 Error: Must specify an action for the input file.\naltermime --input=<input mime pack>   ( --input=- for stdin )\n\t[--disclaimer=<disclaimer file>]\n\t[--disclaimer-html=<HTML disclaimer file>]\n\t[--disclaimer-b64=<BASE64 encoded dislcaimer>]\n\t[--htmltoo]\n  [--force-into-b64]\n\t[--force-for-bad-html]\n\t[--multipart-insert]\n\t[--remove=<remove file name (regex)>] (if filename contains a /, matches on mime-type )\n\t[--removeall]\n\t[--replace=<filename to replace> --with=<replace with>]\n\t[--xheader="..."\n\t[--alter-header="..." --alter-with="..." --alter-mode=<prefix|suffix|replace>]\n\t[--altersigned]\n\t[--no-qmail-bounce]\n\t[--verbose]\n\t[--log-stdout]\n\t[--log-stderr]\n\t[--log-syslog]\n\t[--debug]\n\t[--version]\n\nOption Descriptions:\n\t--input=, Sets the mailpack file to be the filename supplied,\n\t\tif the filename is a single '-' (hyphen) then the mailpack\n\t\tis sou...



(!!)...rced via stdin and outputted via stdout.\n\n\t--disclaimer=, Set the plaintext disclaimer source file.\n\t--disclaimer-html=, Set the HTML disclaimer source file.\n\t--disclaimer-b64=, Set the BASE64 encoded disclaimer source file (implies --force-into-b64).\n\n\t--htmltoo, Sets alterMIME to insert the plaintext disclaimer into\n\t--force-into-b64, Sets alterMIME to insert disclaimers into BASE64 encoded text segments\n\t--force-for-bad-html, Force adding of the HTML disclaimer even when HTML is not correctly formatted\n\t\tthe HTML portion of the email body ( if there is no explicitly\n\t\tdefined HTML dislcaimer, see --disclaimer-html )\n\n\t--remove=, Remove any attachments which match the filename supplied,\n\t\tif the filename text contains a forward-slash '/', then the\n\t\tmatching will occur based on content-type headers rather than\n\t\tby filename.\n\t--removeall, Remove all attachments\n\t--replace=, Replace attachments matching the g...

 (09731-01) (!!)...iven filename. Requires to\n\t\tbe used with --with.\n\t--with=, Replace the attachments specified by --replace with the file\n\t\tspecified.\n\t--xheader=, Insert a header line as specified into the first set of headers.\n\t--alter-header="..." --alter-with="..." --alter-mode=(prefix|suffix|replace)\n\t\tAlter an existing header in the mailpack.  This function modifies the\n\t\tvalue of the header, as apposed to the header name.\n\t--altersigned, Force alterMIME to modify 'signed' emails\n\t--no-qmail-bounce,  Don't search into email bodies for attachment headers\n\t--verbose, Describe details of the process occuring\n\t--log-stdout, Send all output messages to stdout\n\t--log-stderr, Send all output messages to stderr\n\t--log-syslog, Send all output messages to syslog\n\t--debug, Provide greater verbosity and debugging information\n\t--version, display the alterMIME version string\n\n

 (09731-01) program /usr/bin/altermime said: Error: Must specify an action for the input file.\naltermime --input=<input mime pack>   ( --input=- for stdin )\n\t[--disclaimer=<disclaimer file>]\n\t[--disclaimer-html=<HTML disclaimer file>]\n\t[--disclaimer-b64=<BASE64 encoded dislcaimer>]\n\t[--htmltoo]\n  [--force-into-b64]\n\t[--force-for-bad-html]\n\t[--multipart-insert]\n\t[--remove=<remove file name (regex)>] (if filename contains a /, matches on mime-type )\n\t[--removeall]\n\t[--replace=<filename to replace> --with=<replace with>]\n\t[--xheader="..."\n\t[--alter-header="..." --alter-with="..." --alter-mode=<prefix|suffix|replace>]\n\t[--altersigned]\n\t[--no-qmail-bounce]\n\t[--verbose]\n\t[--log-stdout]\n\t[--log-stderr]\n\t[--log-syslog]\n\t[--debug]\n\t[--version]\n\nOption Descriptions:\n\t--input=, Sets the mailpack file to be the filename supplied,\n\t\tif the filename is a single '-' (hyphen) then the mailpack\n\t\tis sourced via stdin and outputted ...

p.s. I try to subscribe to amavis mailing list yesterday...but i didn't received any confirmation.

----

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

2

Re: Trying to add html disclaimer

I'm afraid that altermime is too old, and we don't have a good alternative. sad

3

Re: Trying to add html disclaimer

hi noob,

Have you solve your error to add disclaimer html ?

I have the same problem : the disclaimer text is good but not for html.

thanks

4

Re: Trying to add html disclaimer

Hi,
Have you solve your error to add disclaimer html ?

I have the same problem : the disclaimer text is good but not for html.

thanks