This is the error message I am having when I try to send email from my zimbra account to outside domain. Below the error message is my disclaimer script...
This is the mail system at host zimbra.mail.domain.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<borngunners@mail.com>: service unavailable. Command output:
/opt/zimbra/postfix/conf/disclaimer: 39: /usr/bin/altermime: Permission
denied Message content rejected
Quote:
#!/bin/sh
INSPECT_DIR=/var/spool/filter
SENDMAIL=/opt/zimbra/postfix/sbin/sendmail
FOLDER_DISCLAIMER=/opt/zimbra/postfix/conf
# Exit codes from <sy***its.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 "[a|A-z|Z]" ${FOLDER_DISCLAIMER}/disclaimer.txt | grep -v "_" | tail -2 | head -1`
cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
nohup grep "${TEXT_DISCLAIMER}" in.$$ > /dev/null 2>&1
# Extract SENDTO Address(ex. "user@other_domain.com")
to_address=`grep -m 1 "To:" in.$$ | cut -d "<" -f 2 | cut -d ">" -f 1`
# Extract from SENDTO address only DOMAIN name(ex. "other_domain.com")
to_dom=`echo $to_address |cut -d "@" -f 2`
our_domain="mail.domain.com"
# If OTHER_DOMAIN.COM(SENDTO domain) is not YOURDOMAIN.COM add disclaimer
# means that add disclaimer only for outgoing mail
# for internal mail you will not have disclaimer
if [ $to_dom != $our_domain ]; then
/usr/bin/altermime --input=in.$$ \
--disclaimer=${FOLDER_DISCLAIMER}/disclaimer.txt \
--disclaimer-html=${FOLDER_DISCLAIMER}/disclaimer.html \
--xheader="X-Copyrighted-Material: Please visit http://www.company.com/privacy.htm" || \
{ echo Message content rejected; exit $EX_UNAVAILABLE; }
fi
$SENDMAIL -i "$@" < in.$$
exit $?
|