Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sieve server to dovecot #51

Closed
n-peugnet opened this issue Jan 6, 2022 · 1 comment
Closed

Add sieve server to dovecot #51

n-peugnet opened this issue Jan 6, 2022 · 1 comment
Labels
config ⚙️ Configuration is needed install 📀 New installation is needed todo 📝 Added by admin

Comments

@n-peugnet
Copy link
Member

n-peugnet commented Jan 6, 2022

To add spam filtering, and also allow users to define filters. This is what is used for instance by Roundcube and Sogo.

@n-peugnet
Copy link
Member Author

Done !

It was even super easy to install:

sudo apt install dovecot-sieve dovecot-managesieved

and configure:

commit 94e0455730dad2af009770aa12123e1c531df6b2 (HEAD -> master)
Author: n-peugnet <n.peugnet@free.fr>
Date:   Fri Sep 2 15:06:40 2022 +0200

    email: configure sieve filtering and managesieve
    
    For now only roundcube is allowed to edit the filters.
    Editing them with a native client would have anyway be a suboptimal experience.
    For instance, a plugin has to be added to thunderbird to be able to do it.

diff --git a/dovecot/conf.d/99-club1.conf b/dovecot/conf.d/99-club1.conf
index 76334c8..fcdaee9 100644
--- a/dovecot/conf.d/99-club1.conf
+++ b/dovecot/conf.d/99-club1.conf
@@ -7,13 +7,18 @@ protocol imap {
   mail_plugins = $mail_plugins imap_quota
 }
 
+protocol lmtp {
+  # Enable Sieve filtering on LMTP to filter incoming emails.
+  mail_plugins = $mail_plugins sieve
+}
+
 # Mailbox list indexes can be used to optimize IMAP STATUS commands. They are
 # also required for IMAP NOTIFY extension to be enabled and for better quota
 # performances using the count backend.
 mailbox_list_index = yes
 
 # enable imap protocol
-protocols = imap lmtp
+protocols = imap lmtp sieve
 
 # enable Maildir storage format
 mail_location = maildir:~/mail
diff --git a/roundcube/config.inc.php b/roundcube/config.inc.php
index afe144a..6f9944a 100644
--- a/roundcube/config.inc.php
+++ b/roundcube/config.inc.php
@@ -112,6 +112,7 @@ $config['plugins'] = [
        'archive',
        'attachment_reminder',
        'hide_blockquote',
+       'managesieve',
        'newmail_notifier',
        'vcard_attachments',
        'zipdownload',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config ⚙️ Configuration is needed install 📀 New installation is needed todo 📝 Added by admin
Projects
Status: Closed
Development

No branches or pull requests

1 participant