Move Spam Emails to Junk directory by default? Spamfilter = Normal by default?

Discussion in 'Tips/Tricks/Mods' started by radim_h, Jan 7, 2011.

  1. radim_h

    radim_h Member


    is there any option to have
    mailfiter "Move Spam Emails to Junk directory"
    set by default for each mailbox?

    Regular BFU will never turn any kind of mail filter on, and then people are complainign that they are getting spams into inbox

    i Tried to change
    move_junk=y as default in table mail_user , but its not enough..
    for new user Move Spam Emails.. is checked in in ISPC, but sieve script is not on place..
    i have to uncheck this option in ISPC and then check it back if i want to right /var/vmail/domain/user/.sieve script on place


    It will be beautifull have also the choice
    Mail Domain => Spamfilter => Normal
    Mailbox => Spamfilter => Normal

    selected by default with all new email domains and all new mailboxes..

    Something as default "Email Domain/Mailbox" template....

    i'm using Ubuntu 10.04LTS + Dovecot
    Last edited: Jan 7, 2011
  2. radim_h

    radim_h Member

    That part with NORMAL policy was explained to me by Till here

    Just summary:
    edit: /usr/local/ispconfig/interface/web/mail/mail_domain_edit.php
    after existing line 166 - $policy_select = "<option value='0'>".$app->tform->wordbook["no_policy"]."</option>";
    add line:
    if($this->id == 0) $tmp_user["policy_id"] = 5;

    edit: /usr/local/ispconfig/interface/web/mail/mail_user_edit.php
    after existing line 95 - $policy_select = "<option value='0'>".$app->tform->lng("no_policy")."</option>";
    add line:
    if($this->id == 0) $tmp_user["policy_id"] = 5;

    But i still cannot find, where to turn "Move Spam Emails to Junk directory" ON by default ???
    Last edited: Jan 10, 2011
  3. Shifu

    Shifu New Member

    I'm also looking for a way to set the move_junk field on by default.

    I tried by editing: /usr/local/ispconfig/interface/web/mail/form/mail_user.tform.php:261

    Setting default to 'y'.

            'move_junk' => array (
    'datatype'    => 'VARCHAR',
    'formtype'    => 'CHECKBOX',
    'default'    => 'y',
    'value'        => array(=> 'y',=> 'n')
    It's simply doesn't work for that field. If i change other CHECKBOX fields on the same page from No to Yes it works. Thats pretty confusing.

  4. radim_h

    radim_h Member

    Last edited: Jan 17, 2012
  5. Shifu

    Shifu New Member

    Oh, that was too new to find with Google :). I will participate in the other thread

Share This Page