1

Topic: [SOLVED] move spam to junk folder

Hello. Help figure out how to move from your inbox spam folder Junk. In the configuration file /etc/dovecot/dovecot.conf is the record
plugin {
    auth_socket_path = /var/run/dovecot/auth-master
    quota = dict:user::proxy::quotadict
    quota_rule = *:storage=1G
     # Quota warning.
    # If user suddenly receives a huge mail and the quota jumps from 85% to 95%, only the 95% script is executed.
    quota_warning = storage=85%% quota-warning 85 %u
    quota_warning2 = storage=90%% quota-warning 90 %u
    quota_warning3 = storage=95%% quota-warning 95 %u
    # Plugin: autocreate. Create and subscribe to default IMAP folders.
    autocreate = INBOX
    autocreate2 = Sent
    autocreate3 = Trash
    autocreate4 = Drafts
    autocreate5 = Junk
    autosubscribe = INBOX
    autosubscribe2 = Sent
    autosubscribe3 = Trash
    autosubscribe4 = Drafts
    autosubscribe5 = Junk
    # Plugin: expire.
    expire = Trash 7 Trash/* 7 Junk 30
    expire_dict = proxy::expire

    # Per-user sieve settings.
    sieve_dir = /%Lh/sieve
    sieve = /%Lh/sieve/dovecot.sieve

    # Global sieve settings.
    sieve_global_dir = /var/vmail/sieve
    sieve_global_path = /var/vmail/sieve/dovecot.sieve
}

And also the instructions renamed /var/vmail/sieve/dovecot.sieve.sample in /var/vmail/sieve/dovecot.sieve. Spam is defined very well, but remains in the inbox folder, but it must move to folder Junk. Give your recommendations please.
P.s translated by google .

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED] move spam to junk folder

With Dovecot-1.x, global sieve rule will be ignored if user has his/her own sieve rules.
With Dovecot-2.x, you can use Dovecot setting "sieve_before" or "sieve_after" to achieve this.

demon-odinok wrote:

P.s translated by google .

Translation quality is good. smile

3

Re: [SOLVED] move spam to junk folder

Turned out. Here is an example of config dovecot.conf and dovecot.seve   
    sieve_dir = /%Lh/sieve
    sieve = /%Lh/sieve/dovecot.sieve
    sieve_extensions = +spamtest +spamtestplus +relational +comparator-i;ascii-numeric
    # Global sieve settings.
    sieve_global_dir = /var/vmail/sieve
    #sieve_global_path = /var/vmail/sieve/dovecot.sieve
    sieve_before = /var/vmail/sieve
    sieve_after = /var/vmail/after.d

cat /var/vmail/after.d/dovecot.sieve

require "fileinto";
if header :contains ["subject"] ["***SPAM***"] {
fileinto "Спам";}

ZhangHuangbin, thanks for the tip !!!