Option: Delete high scoring spam default to YES

dudek888

Verified User
Joined
Jun 21, 2009
Messages
33
Location
Szczecin / Poland
Hello

When new domain is created is possible to auto set by DA in Spamassassin settings this option "Would you like to delete high scoring spam?" as default to "Yes, block all spam scoring higher than" or not because it's hardcoded to "No, do not block high scoring spam. Use only the threshold in the previous section." ?

Greetings, dudek888
 
I think i did already post this solution time ago.

I use to do that with user_create_post.sh script like this:

Code:
if [ "$spam" = "ON" ]; then

   DIR=/home/$username/.spamassassin
   mkdir $DIR
   wget -O $DIR/user_prefs MYURL/user_prefs >/dev/null 2>&1
   chown ${username}:mail $DIR
   chmod 771 $DIR
   chown $username:$username $DIR/user_prefs
   chmod 755 $DIR/user_prefs

fi

and this in domain_create_post.sh

Code:
wget -O /etc/virtual/$domain/filter MYURL/filter >/dev/null 2>&1
wget -O /etc/virtual/$domain/filter.conf MYURL/filter.conf >/dev/null 2>&1
chown mail:mail /etc/virtual/$domain/filter
chown mail:mail /etc/virtual/$domain/filter.conf
chmod 640 /etc/virtual/$domain/filter
chmod 600 /etc/virtual/$domain/filter.conf

Regards
 
domain_create_post.sh works OK, but after user_create_post.sh directory .spamassassin and file user_prefs are set to wrong file owners

drwxrwx--x 2 root access 512 Jul 2 14:23 .spamassassin
-rwxr-xr-x 1 root access 50 Jul 2 14:23 user_prefs

and in effect when the user tried to run restore this message appears:

"Error extracting /home/testuser/backups/backup/home.tar.gz : .spamassassin/: Can't update time for .spamassassin tar: Error exit delayed from previous errors."


Best regards
 
Sorry to butt in, is there a way to default it so it deletes the spam instead of leaving it in the inbox? Also, to change it for mass users under a specific reseller?

So

Where do you want the spam to go? [Delete the spam]
 
This is my user_prefs:

Code:
>cat user_prefs




required_score 3.5
rewrite_header subject *****SPAM*****


report_safe     1

here the filter (the one that decide if delete spam or not)

Code:
# Exim Filter

# created by DirectAdmin, version 1.38.0
# Do not modify this file as any changes will be
# overwritten when the user makes a change.
# (data is only written to this file, not read)

#if error_message then finish endif


if
        $h_X-Spam-Level: contains "**********"
then
        seen finish
endif


if
then
        seen finish
endif


if
    $h_X-Spam-Status: contains "Yes,"
then
    seen finish
endif



#end filter

Regards
 
Have you pasted the chown part?

If yes, so check in debug mode why isnt working.

Regards

Thank you SeLLeRoNe.
My system not seen the command "chown" when executed script user_create_post.sh .
Change from:

chown ${username}:mail $DIR
chown $username:$username $DIR/user_prefs

to:

/usr/sbin/chown ${username}:mail $DIR
/usr/sbin/chown $username:$username $DIR/user_prefs

solved this issue.


Regards
 
Or just update PATH environment variable to be able to search in /usr/sbin
 
I thot was the filter file and this line specified:

Code:
if
    $h_X-Spam-Status: contains "Yes,"
then
    seen finish
endif

Apparently is the only line that chagne if i set to delete or send to spamfolder

Regards
 
Back
Top