Mails move to Junk

Discussion in 'Installation/Configuration' started by admins, Mar 18, 2010.

  1. admins

    admins Member

    Hi all

    In the new version of ISPC has it in the mailbox filter part a checkbox "Move Spammails to Junk".

    Where could I edit the parameter, that the server move the spam into "Spam" and not in "Junk"?

    Thanks
    admins
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use dovecot or courier?
     
  3. admins

    admins Member

    courier do I use

    admins
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The file is /usr/local/ispconfig/server/conf/mailfilter_move_junk.master
     
  5. rmax75

    rmax75 New Member

    Dovecot

    Hi Till.
    I use dovecot and ISPConfig 3.0.4.6

    There is a way to do the same thing using dovecot ?

    Great Job,
    Massimo
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    For dovecot 1.0:

    /usr/local/ispconfig/server/conf/sieve_filter.master

    For dovecot 1.2:

    /usr/local/ispconfig/server/conf/sieve_filter_1.2.master
     
  7. rmax75

    rmax75 New Member

    Thanks for your reply.
    I'm using Dovecot 2.0.19 so i've changed the sieve_filter_1.2.master.

    I've also updated this file in order to create the .Spam folder in the vmail root :

    Code:
    vim /usr/local/ispconfig/server/plugins-available/mail_plugin.inc.php
    
    @lines 147,150 and 281,284
    
    if(!is_dir($data['new']['maildir'].'/.Junk')) {
        //exec("su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']);
        //$app->log('Created submaildir Junk: '."su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG);
        $app->system->maildirmake($maildomain_path,$mail_config['mailuser_name'],'Junk');
    }
    
    Now, everything seems to be ok : )

    Just a little issue: Thunderbird doesn't recongnize the Spam folder with the special icon.
    Any idea ?

    Thanks,
    Massimo
     
    Last edited: Oct 8, 2012
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally this folder is named Junk and not Spam, ispconfig creates it automatically under the name Junk and the default templates that come with ispconfig use the folder with the correct name Junk.

    So what you did above by creating another folder manually is normally not nescssary at all. If you do that, you will have to manually reconfigure thunderbird to recognize your custom folder name.
     
  9. rmax75

    rmax75 New Member

    You're right.
    I solved my problem (after a few hours) setting in Thunderbird > Account Settings (my account) > "Junk Settings", the checkbox "Move new junk messages to:" > "Junk" folder on (my account).

    Many thanks for your help.

    Massimo
     
    Last edited: Oct 8, 2012

Share This Page