• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

can i edit /usr/local/psa/bin/psa-spamc?

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:

# 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.
 
/usr/local/psa/bin/psa-spamc is a part of psa-spamassassin package and it will not be overwritten during Plesk operation. Therefore you can modify this script, but note that all your changes will be overwritten when you will perform Plesk upgrade. If you have tested it and it doesn't affect anything - you can use this modification.
 
ok,
I'll test it on some accounts and then I'll switch everything to production enviroment!

many thanks! :)

k.
 
ok,
I'll test it on some accounts and then I'll switch everything to production enviroment!

many thanks! :)

k.

Please update this thread with results when you decide that it works fine.
 
Back
Top