Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Adding a disclaimer per domain Zimbra 8

  1. #1
    Join Date
    Nov 2009
    Posts
    38
    Rep Power
    6

    Default Adding a disclaimer per domain Zimbra 8

    Is it the same method that we have to follow when adding a disclaimer per domain on Zimbra 8 OS edition?

    Adding a disclaimer (altermime) or footer - Zimbra :: Wiki

    Or else is there any other easy way of doing that.

    Thanks.

  2. #2
    Join Date
    Nov 2009
    Posts
    38
    Rep Power
    6

    Default

    With the following two steps, it is possible to add a global disclaimer to Zimbra 8 as well. But there is no way of adding separate disclaimers for separate domains. Is there any body who set up different disclaimers for different domains. I saw in a bug report that this feature will be available in ZCS9. (https://bugzilla.zimbra.com/show_bug.cgi?id=41872). When we will be able to try ZCS9?

    1. To create a system wide mandatory signature, enter the following

    zmprov mcf zimbraDomainMandatoryMailSignatureEnabled TRUE
    zmprov mcf zimbraDomainMandatoryMailSignatureText <“some text”>
    zmprov mcf zimbraDomainMandatoryMailSignatureHTML "<html><body>some html text</body></html>”

    2. Restart Amavis to apply the configuration and global signature files. Type:

    /opt/zimbra/bin/zmamavisdctl restart

  3. #3
    Join Date
    Feb 2010
    Location
    England
    Posts
    9
    Rep Power
    5

    Default

    Using the profanityfilter from "http://www.bishopbarrington.net/wiki/howto/zimbracontentfilter" one can add a domain signature to all email per domain.
    In the profanity script after checking for profanity section and before "$SENDMAIL "$@" <in.$$" add the following:

    ******
    SIGDOM=$(/bin/grep "$MAILADMIN" /opt/signatures/signature-domains.txt)
    #Check for marker added to every signature so that it can be checked to see if it exists before adding signature.
    PRESENT=$(grep "5XFYSgcMXaNztpyeTSLz9y3m" in.$$)
    HTML=$(grep "Content-Type: text/html" in.$$) #checking if email is HTML
    #If "not external" AND "email exists (profanity not removed it)" AND "have signature file" AND "no signature" AND "is html"
    if [ "$EXTERNAL" = "n" ] && [ -f in.$$ ] && [ -n "$SIGDOM" ] && [ -z "$PRESENT" ] && [ -n "$HTML" ]
    then # met all those conditions then add signature
    SIGLINEHTML=$(/bin/grep -n "</div></body></html>" in.$$ | tail -1 | cut -f1 -d: ) #find pattern last line number
    echo ${SIGLINEHTML} >/tmp/sig.txt #check line number
    /bin/sed -i "${SIGLINEHTML}s/<\/div><\/body><\/html>/`cat /opt/signatures/${MAILADMIN}.html`/" in.$$ #add signature HTML1
    cat in.$$ >/tmp/html.html #checking output of modified email
    fi
    *******
    mkdir /opt/signatures
    chown -R zimbra:zimbra /opt/signatures
    List the domains that have signatures here or wherever you choose:
    /opt/signatures/signature-domains.txt

    I did both text and html signatures but chose to go with HTML email signature to reduce system usage. Of course users have to choose compose in HTML.

    Testing: Remove after suitable testing.
    echo ${SIGLINEHTML} >/tmp/sig.txt #check line number
    cat in.$$ >/tmp/html.html #checking output of modified email

    The domain signature is not visible when an email is composed, but dispalys in the recipient’s email mesage.

    Domain Signature file:
    Create signatures with the domain-name.html similar to below in /opt/signatures/
    ${MAILADMIN}.html
    <br><br><hr>DOMAIN SIGNATURE<br>Cap-Kirk<br>Starfleet Headquarters<br>San Francisco<br>California<br>Earth<br>Milky Way<br><img src="http:\/\/image-server-address\/logos\/en_GB.png"><br><hr><div style="display:none;">5XFYSgcMXaNztpyeTSLz9y3m<\/div><br><div style="text-align:center">***starfleet.com Email Services provided by whatever you want here***<\/div><\/div><\/body><\/html>

    NOTE:
    Every html signature file should have the same marker, that is how an email is checked to see if it already has a signature. Example some random password generated from a password generator:
    5XFYSgcMXaNztpyeTSLz9y3m


    Try at your own risk. Please let me know the results of your testing.
    I have tested on my dev server but has not placed in production yet. Hoping to test two domains next month after getting permission from my manager.

    Update 5th June 2014.
    We have introduced this for one of our domains on the 29th May 2014 . It is working fine without any stress on the server.
    Had to make a few changes.

    After intro to production with proper DNS, discovered tag leaves artefact in external mail. Remove tag and use something else.

    ${MAILADMIN}.html
    Change
    <br><br><hr>DOMAIN SIGNATURE<br>Cap-Kirk<br>Starfleet Headquarters<br>San Francisco<br>California<br>Earth<br>Milky Way<br><img src="http:\/\/image-server-address\/logos\/en_GB.png"><br><hr><div style="display:none;">5XFYSgcMXaNztpyeTSLz9y3m<\/div><br><div style="text-align:center">***starfleet.com Email Services provided by whatever you want here***<\/div><\/div><\/body><\/html>

    To

    <br><br><hr>DOMAIN SIGNATURE<br>Cap-Kirk<br>Starfleet Headquarters<br>San Francisco<br>California<br>Earth<br>Milky Way<br><img src="http:\/\/image-server-address\/logos\/en_GB.png"><br><hr \><div style="text-align:center">***starfleet.com Email Services provided by whatever you want here***<\/div><\/div><\/body><\/html>


    Change:
    PRESENT=$(grep "5XFYSgcMXaNztpyeTSLz9y3m" in.$$)

    To

    PRESENT=$(/bin/grep "$MAILADMIN Email Services provided by whatever you want here" in.$$)

    Works without any problems so far. To add another email just update
    1) /opt/signatures/signature-domains.txt
    2) Add HTML file for new domain in /opt/signatures/ named domainname.html
    Last edited by Cap-Kirk; 06-05-2014 at 03:28 AM. Reason: Update

  4. #4
    Join Date
    Feb 2010
    Location
    England
    Posts
    9
    Rep Power
    5

    Default

    No comments? No one has used this? Did I waste my time and effort?

  5. #5
    Join Date
    Dec 2010
    Location
    UK
    Posts
    233
    Rep Power
    4

    Default

    I'm sure you didn't waste your effort, I'm sure your Zimbra now adds a domain signature to all email per domain.

    And it was good of you to post your solution here. Personally I've chosen to take a different path.

    As zimbra :

    Code:
    zmprov mcf zimbraDomainMandatoryMailSignatureEnabled TRUE
    Patch amavisd as described here

    Replace altermime with a script that points to the re-named altermime-bin as described here

    Make sure I've added both mydomain.txt and mydomain.html files to /opt/zimbra/data/altermime

    Edit /opt/zimbra/conf/amavisd.conf.in :

    Code:
    @disclaimer_options_bysender_maps = (
      { '.mydomain.com' => 'mydomain' },     <<<<<<<<<<<<<<<<<  Add line
      { '.' => 'global-default' },
    );
    Then restart zimbra

    Code:
    zmcontrol restart
    Once it's working I backup the changed files, as root :

    Code:
    cd /
    tar -pcvzf changed-files.tar.gz /opt/zimbra/data/altermime/* /opt/zimbra/..... /opt/zimbra/......
    Then after an update resets everything I simply unpack as root :

    Code:
    cd / 
    tar -pxvzf changed-files.tar.gz
    And I'm ready to go again.

    It took me a while to get to this result but now I've got it working it's only a couple of minutes to help others. In Zimbra 8.5 this should be included.
    Last edited by dik23; 07-09-2014 at 02:33 AM.

  6. #6
    Join Date
    Feb 2010
    Location
    England
    Posts
    9
    Rep Power
    5

    Default

    Thanks for the pat on the back.

    It's good to know there are multiple solutions to the same problem.

    Why has it taken Zimbra so long to make this a standard feature?

    My company were already using the profanity filter because our customers are schools. Rather than adding something else to eat more resources I used what was available.

    In our setup there is no restart when adding a new signature. A restart wasn't even required to set it up either.

    When we upgrade we have to setup the profanity filter in postfix master.cf.in and main.cf anyway, so really there is no extra work for the domain signature.

    Lets' hope the other zimbra Administrators make usage of our ideas.

  7. #7
    Join Date
    Dec 2010
    Location
    UK
    Posts
    233
    Rep Power
    4

    Default

    Quote Originally Posted by Cap-Kirk View Post
    Why has it taken Zimbra so long to make this a standard feature?
    Please see here

    A disclaimer is a legal requirement in the EU, a region with a mere 500 million people. Not being able to implement per domain makes Zimbra useless for hosting companies.

    To put this into context the US has a population of 300 million

  8. #8
    Join Date
    Feb 2010
    Location
    England
    Posts
    9
    Rep Power
    5

    Default

    A mere 500 million and expanding Eastward.

  9. #9
    Join Date
    Nov 2008
    Posts
    26
    Rep Power
    7

    Default

    i cannot alter this --> zimbraDomainMandatoryMailSignatureEnabled: FALSE to TRUE..

    im using 8.0.7_GA_6021 NE..

    everytime i change the value to TRUE and restart amavis, the value will go back to FALSE..
    Last edited by Saaidi; 08-26-2014 at 11:46 PM.
    A man under a table ....

  10. #10
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by Saaidi View Post
    im using 8.0.7_GA_6021 NE..
    Why don't you upgrade to ZCS 8.5.0, it has the feature you're looking for.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. [SOLVED] Domain Disclaimer for Zimbra 7.1.0
    By gvillaran in forum Administrators
    Replies: 18
    Last Post: 08-06-2014, 10:29 AM
  2. [SOLVED] Adding a disclaimer (footer)
    By deugenin in forum Administrators
    Replies: 40
    Last Post: 06-18-2011, 04:58 AM
  3. Adding signature/disclaimer in Zimbra 7
    By tura in forum Administrators
    Replies: 1
    Last Post: 02-15-2011, 02:17 PM
  4. adding disclaimer only to outbound mail
    By hispa in forum Installation
    Replies: 3
    Last Post: 02-17-2009, 02:56 AM
  5. Adding Disclaimer as attachment!
    By fnetmohan in forum Administrators
    Replies: 3
    Last Post: 11-17-2008, 01:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •