• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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