Results 1 to 3 of 3

Thread: Zimbra Disclaimer Issue

  1. #1
    Join Date
    Oct 2010
    Location
    Chennai
    Posts
    5
    Rep Power
    5

    Default Zimbra Disclaimer Issue

    Dear Experts,
    I have installed Zimbra Mail server Disclaimer in my domain,
    whenever i send mails to other domains, it should show the disclaimer. if i send mails to internal mail ids, it should not show disclaimer.

    The problem is: If i send mail to both internal and external domain (For Example: TO: External Domain & CC: Internal Domain), Its show the disclaimer to internal domain mails.

    Can any one of you help / guide me, How to set disclaimer to work only for external Domain mails.

    P.S: For your kind information, I am using following script for Disclaimer.


    #!/bin/sh
    INSPECT_DIR=/var/spool/filter
    SENDMAIL=/opt/zimbra/postfix/sbin/sendmail
    FOLDER_DISCLAIMER=/opt/zimbra/postfix/conf
    DOMAIN="example.com"

    # Exit codes from <sysexits.h>
    EX_TEMPFAIL=75
    EX_UNAVAILABLE=69

    # Clean up when done or when aborting.
    trap "rm -f in.$$" 0 1 2 3 15

    # Start processing.
    cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }

    TEXT_DISCLAIMER=`grep "[[:alnum:]]" ${FOLDER_DISCLAIMER}/disclaimer.txt | grep -v "_" | tail -4 | head -1`
    cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }

    # Verify if is there the disclaimer present in the mail body
    grep -q "${TEXT_DISCLAIMER}" in.$$
    let R1="$?"

    # Verify if the sender is from DOMAIN
    #grep "From:" in.$$ | head -1 | grep -i $DOMAIN > /dev/null 2>&1
    echo "$2" | grep -i -q "$DOMAIN"
    let R2="$?"

    # Verify if the recipient is from DOMAIN
    echo "$4" | grep -i -q "$DOMAIN"
    let R3="$?"

    if [[ $R1 != 0 && $R2 == 0 && $R3 != 0 ]]; then
    /usr/bin/altermime --input=in.$$ \
    --disclaimer=${FOLDER_DISCLAIMER}/disclaimer.txt \
    --disclaimer-html=${FOLDER_DISCLAIMER}/disclaimer.html || \
    { echo -e \n Message content rejected; exit $EX_UNAVAILABLE; }
    fi

    $SENDMAIL -i "$@" < in.$$

    exit $?


    Thanks and Regards

    Krishna Moorthy
    Last edited by phoenix; 01-11-2011 at 07:21 AM.

  2. #2
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    have you loooked at using zimbra's built in disclaimer function? perhaps it does what you need.

  3. #3
    Join Date
    Aug 2009
    Location
    florida
    Posts
    132
    Rep Power
    6

    Default

    where is zimbras built in disclaimer function?

Similar Threads

  1. Old Backup stay in TO_DELETE status and no clearing..
    By bartounet in forum Administrators
    Replies: 0
    Last Post: 10-05-2010, 08:40 AM
  2. Replies: 9
    Last Post: 03-01-2008, 08:21 PM
  3. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 09:56 PM
  4. Can't start Zimbra!
    By zibra in forum Administrators
    Replies: 5
    Last Post: 03-22-2007, 12:34 PM
  5. Replies: 8
    Last Post: 02-27-2007, 04:10 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
  •