Hi Good People,
I´m fairly new to Fedora and basically all Red hat based builds.
Currently, i´m trying to put a disclaimer on all outgoing mails from my postfix mail server.
I used the the link on howtoforge website for Fedora 8 as a guide and followed the instructions to the letter only changing certain variables as per my situation.
Have been sending test emails but Postfix doesn´t seem to work with Altermime to append the disclaimer to the email address that i have specified in my /etc/postfix/disclaimer_addresses file.
I´ve gone through google and many a forum but still fix the issue, i´m hoping the Gurus here will be able to point me in the right direction
Below are the relevant screen shots of the Fedora System and postfix configuration files that im using:
]# cat /etc/*-release
Fedora release 10 (Cambridge)
# rpm -q altermime
altermime-0.3.8-1.fc10.i386
# rpm -q postfix
postfix-2.5.6-1.fc10.i386
Post fix config files
disclaimer script (/etc/postfix/disclaimer)
#
!/bin/sh
# Localize these.
INSPECT_DIR=/var/spool/filter
SENDMAIL=/usr/sbin/sendmail.postfix
####### Changed From Original Script #######
DISCLAIMER_ADDRESSES=/etc/postfix/disclaimer_addresses
####### Changed From Original Script END #######
# 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; }
cat >in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
####### Changed From Original Script #######
# obtain From address
from_address=`grep -m 1 "From:" in.$$ | cut -d "<" -f 2 | cut -d ">" -f 1`
if [ `grep -wi ^${from_address}$ ${DISCLAIMER_ADDRESSES}` ]; then
/usr/bin/altermime --input=in.$$ \
--disclaimer=/etc/postfix/disclaimer.txt \
--disclaimer-html=/etc/postfix/disclaimer.txt \
--xheader="X-Copyrighted-Material: Please visit http://www.company.com/privacy.htm" || \
{ echo Message content rejected; exit $EX_UNAVAILABLE; }
fi
####### Changed From Original Script END #######
$SENDMAIL "$@" <in.$$
exit $?
Disclaimer addresses (/etc/postfix/disclaimer_addresses)
abc@companykenya.com
When i restart postfix and try to send an email, i get the following error on the log file maillog (/var/log/maillog)
Oct 12 16:29:31 mail postfix/postfix-script[27292]: warning: group or other writable: /etc/postfix/./disclaimer_addresses
Oct 12 16:29:32 mail postfix/postfix-script[27293]: warning: group or other writable: /etc/postfix/./disclaimer.txt
So thats all the information i thought relevant.
Hoping you will be able to help with this.
Thanks,
Waiguru