Spam and virus filtering by default

Hi,
what would be the most elegant way of setting spam and virus filtering on for every newly added user by default?

I see the {ANTIVIRUS_COMMENT} and {SPAMASSASSING_COMMENT} template variables in procmailrc.master and I also know that they get "##" value depending on $user["spam_filter"] but still don't know what would be the best way of making it constantly on.

I don't prefer altering the code so that $user["spam_filter"] always returns true while being evaluated in the corresponding if condition.

If spam and virus filtering should be on for every user, just remove {ANTIVIRUS_COMMENT} and {SPAMASSASSIN_COMMENT} from the template.

Click to expand...

I chose to go into the database itself and set the default values to 1 in the isp_isp_user table. This method allows the user to turn them back off again, but I figure that's their problem if they want to do that.

Did you see my post above yours? You don't have to go into the scripts if you don't want to. Just set the default to '1' for those fields in the database.

Click to expand...

yes i have seen !
the isp_isp_user table is where every users preferences are set. But as admin i do not want to check every time a user is created by clients to put 1 instead of 0 or NULL , and as i would let as you suggest users to manually switch it to 0, it will be a crazy story even with a cron job .

So maybe you where refering to another table that would store default information to create a new user .. but it is not isp_isp_user

yes i have seen !
the isp_isp_user table is where every users preferences are set. But as admin i do not want to check every time a user is created by clients to put 1 instead of 0 or NULL , and as i would let as you suggest users to manually switch it to 0, it will be a crazy story even with a cron job .

So maybe you where refering to another table that would store default information to create a new user .. but it is not isp_isp_user

Thank you for your time

Click to expand...

Maybe you and I aren't talking about the same thing.

If you set the default value of the spam filter to '1' in the database, then every new user created will have it turned on by default.

They will be able to turn it off themselves within their ISPConfig account, yes, but by default it will be turned on for each new user.

Edit: I just verified. The field I am talking about is the user_spamfilter record in the isp_isp_user table. The default ISPConfig installation sets the default value to NULL, but switching it to '1' will activate it by default on all new users.

I was only thinking religiously about changing the value for each record, without the idea i could change the structure and the default value of the record !

It 's effective and it is great thanks to the scripts that do only insert field that are submited ! (first creation of user is only for the first page and there's no informations about spam and antivirus scan on it)

I was only thinking religiously about changing the value for each record, without the idea i could change the structure and the default value of the record !

It 's effective and it is great thanks to the scripts that do only insert field that are submited ! (first creation of user is only for the first page and there's no informations about spam and antivirus scan on it)