Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-2011, 05:58 AM
Junior Member
 
Posts: 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 06:21 AM..
Reply With Quote
  #2 (permalink)  
Old 01-11-2011, 07:25 AM
Moderator
 
Posts: 1,554
Default

have you loooked at using zimbra's built in disclaimer function? perhaps it does what you need.
Reply With Quote
  #3 (permalink)  
Old 04-07-2011, 12:36 PM
Special Member
 
Posts: 101
Default

where is zimbras built in disclaimer function?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.