CentOS 6 And Sieve/Dovecot

Home » CentOS » CentOS 6 And Sieve/Dovecot
CentOS 3 Comments

I’ve got dovecot & Sieve installed on an internal mail server, without issue. It seems to run ~/.dovecot.sieve scripts without issue. However, when trying to set up sieve scripts with an email client (kmail) the sieve scripts get published to ~/sieve directory.

I can’t seem to find any way to tell sieve to run all scripts in ~/sieve. It looked as though sieve_before in /etc/dovecot/conf.d/90-sieve.conf might do it but it doesn’t expand ~. EG:

sieve_before = ~/sieve

How do I tell dovecot/sieve to run the scripts found in sieve_dir?

Thanks,

Ben

3 thoughts on - CentOS 6 And Sieve/Dovecot

  • Am 05.11.2014 um 01:27 schrieb Benjamin Smith:

    worksforme

    Verify your dovecot configurition by `doveconf -n’. Where is the user’s home and do the permissions of all path elements fit your UID/GID setting?

    Alexander

  • Nearest I can tell, all should be good. If I copy any of the ~/sieve/*.sieve scripts to ~/.dovecot.sieve they work fine, but they just aren’t being “seen”
    in the ~/sieve directory. Because of this, I can’t manage sieve scripts in a user’s email client. (EG: KMail)

    Am I missing something? As the user:
    [spadmin@edison ~]$ ll total 12
    drwx—— 8 spadmin spadmin 4096 Nov 6 00:00 Maildir drwx—— 3 spadmin spadmin 4096 Nov 4 23:46 sieve
    [spadmin@edison ~]$ ll sieve/
    total 12
    -rw——- 1 spadmin spadmin 88 Nov 4 23:46 Knox.sieve
    -rw——- 1 spadmin spadmin 96 Nov 4 23:46 Socrates.sieve drwx—— 2 spadmin spadmin 4096 Nov 4 23:46 tmp

    [spadmin@edison ~]$ dovecot -n
    # 2.0.9: /etc/dovecot/dovecot.conf
    # OS: Linux 2.6.32-431.29.2.el6.i686 i686 CentOS release 6.5 (Final)
    lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes mail_debug = yes managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date mbox_write_locks = fcntl passdb {
    driver = pam
    }
    plugin {
    sieve = ~/.dovecot.sieve
    sieve_dir = ~/sieve
    sieve_global_dir = /etc/dovecot/sieve/global/
    sieve_global_path = /etc/dovecot/sieve/default.sieve
    sieve_max_script_size = 1M
    }
    protocols = imap pop3 sieve sieve service managesieve-login {
    inet_listener sieve {
    port = 4190
    }
    }
    ssl_cert = postmaster@mydomain.com
    }
    protocol sieve {
    info_log_path = /var/log/dovecot-sieve.log
    log_path = /var/log/dovecot-sieve-errors.log
    managesieve_implementation_string = Dovecot
    managesieve_max_line_length = 65536
    }

  • Am 06.11.2014 um 01:08 schrieb Benjamin Smith:

    So it is just a misunderstanding on your end. The active sieve script under ~/sieve must be symlinked to the .dovecot.sieve file.

    cd ~
    ln -s sieve/Socrates.sieve .dovecot.sieve

    Then dovecot will build the bytecode version of the plaintext sieve ruleset as ~/.dovecot.svbin.

    Alexander