hi matt,

Matt Kettler wrote:

At 11:06 AM 1/11/2005, werner detter wrote:

i know that in the future i will have to use spamd/spamc but at the moment
i can't migrate because of several reasons. that's why i have to get 'filter.sh'
modified in the way that only mails smaller 100 kb are passed through spamassassin.


Well, the modification of filter.sh might be harder than the migration to spamd....

What's inhibiting you from migrating to spamd? Perhaps we can help make that easier for you.

thanks for your help, migration to spamc/spamd wouldn't be the problem -> it's even
planned within the next half year. there is only one reason this hasn't been done so far:
there is no desicion from the company management if the want to use only spamc/spamd
or if they want to use amavis-new in combination with spamc/spamd and a virusscan (e.g. clamav-new).
so i have to wait for their decision - that's the problem.


so my idea to reduce the load/ramusage of the mailserver was to just modifiy
the filter.sh that it only passes mails smaller then 100kb to spamassassin (as a fast solution/hack).


why are the modifications in the filter.sh harder then the migration to spamc/spamd?
IMHO it's just a shellskript why isn't it possible to get a sizecheck integrated - in your opinion.


my idea (i'm not a shellskripting guru :D) was to replace this part of the script:

*** cut ***
cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }

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

#cat | $SPAMASSASSIN -P | $SANITIZER \
#   $ANOMY_CONF 2>>$ANOMY_LOG > out.$$ || \
#   { echo Message content rejected; exit $EX_UNAVAILABLE; }

cat | $SPAMASSASSIN > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }

$SENDMAIL "$@" < out.$$

exit $?
** cut **

with something like

** cut ***

SIZE="/usr/bin/du -hsk out.$$|awk '{$1}'"
trap "rm -f out.$$" 0 1 2 3 15

if [ "$SIZE" <= "100" ]
then
cat | $SPAMASSASSIN > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }
$SENDMAIL "$@" < out.$$
exit $?
else
cat > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }
$SENDMAIL "$@" < out.$$
exit $?
fi


*** cut ***

but this doesn't work that way.

thanx for your responses on this hot topic :)

regards,
werner detter










Reply via email to