F
FulvioC
Guest
Can i modify /usr/local/psa/bin/psa-spamc in order to quarantine a mail if its spam level is higher than $SPAMLIMIT?
I would like to apply something like that:
I'm using it on a test account and seems working fine, but i don't know if Plesk system cah have problems with manual modification of his scripts..
Thanks in advance!
k.
I would like to apply something like that:
# diff /usr/local/psa/bin/psa-spamc /usr/local/psa/bin/psa-spamc-acd
7a8,11
> SPAMLIMIT=14
> EGREP=`which egrep`
> SENDMAIL=`which sendmail`
> SPAMHOLE="[email protected]"
27,29c31,40
< if [ $check -ne 1 -o "$1" != "reject" ]; then
< "$QMAIL_LOCAL" -- "$USER" "$HOME" "$LOCAL" "" "" "$HOST" "$SENDER" "$DEFAULT" < "$tmpfile"
< retval=$?
---
> if [ $check -ne 1 -o "$1" != "reject" ]
> then
> if $EGREP -q "^X-Spam-Level: \*{$SPAMLIMIT,}" < "$tmpfile"
> then
> $SENDMAIL $SPAMHOLE < "$tmpfile"
> retval=99
> else
> "$QMAIL_LOCAL" -- "$USER" "$HOME" "$LOCAL" "" "" "$HOST" "$SENDER" "$DEFAULT" < "$tmpfile"
> retval=$?
> fi
I'm using it on a test account and seems working fine, but i don't know if Plesk system cah have problems with manual modification of his scripts..
Thanks in advance!
k.