Spam and virus filtering by default

Discussion in 'Installation/Configuration' started by sfrank, Feb 13, 2007.

  1. sfrank

    sfrank New Member

    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.

    Any suggestions would be welcome.

    Frank
     
  2. falko

    falko Super Moderator Howtoforge Staff

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

    jonwatson New Member

    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.
     
  4. unnilennium

    unnilennium New Member

    Hello,

    Is there a way of completing this option to 1 for each new user?

    I mean where i should search to modify a script to put 1 if it is not defiened ?

    thanks

    JP
     
  5. jonwatson

    jonwatson New Member

    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.
     
  6. unnilennium

    unnilennium New Member

    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
     
    Last edited: Mar 29, 2007
  7. jonwatson

    jonwatson New Member

    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.
     
    Last edited: Mar 29, 2007
  8. unnilennium

    unnilennium New Member

    Oh yes excuse me !

    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)


    Thank you!

    JP
     
  9. jonwatson

    jonwatson New Member

    Glad it worked!
     

Share This Page