1.8. Enabling server-side email filtering by using Sieve on a Dovecot IMAP server


You can upload Sieve scripts to a server using the ManageSieve protocol. Sieve scripts define rules and actions that a server should validate and perform on incoming emails. For example, users can use Sieve to forward emails from a specific sender, and administrators can create a global filter to move mails flagged by a spam filter into a separate IMAP folder.

The ManageSieve plugin adds support for Sieve scripts and the ManageSieve protocol to a Dovecot IMAP server.

警告

Use only clients that support using the ManageSieve protocol over TLS connections. Disabling TLS for this protocol causes clients to send credentials in plain text over the network.

Prerequisites

  • Dovecot is configured and provides IMAP mailboxes.
  • TLS encryption is configured in Dovecot.
  • The mail clients support the ManageSieve protocol over TLS connections.

Procedure

  1. Install the dovecot-pigeonhole package:

    # dnf install dovecot-pigeonhole
  2. Uncomment the following line in /etc/dovecot/conf.d/20-managesieve.conf to enable the sieve protocol:

    protocols = $protocols sieve

    This setting activates Sieve in addition to the other protocols that are already enabled.

  3. Open the ManageSieve port in firewalld:

    # firewall-cmd --permanent --add-service=managesieve
    # firewall-cmd --reload
  4. Reload Dovecot:

    # systemctl reload dovecot

Verification

  1. Use a client and upload a Sieve script. Use the following connection settings:

    • Port: 4190
    • Connection security: SSL/TLS
    • Authentication method: PLAIN
  2. Send an email to the user who has the Sieve script uploaded. If the email matches the rules in the script, verify that the server performs the defined actions.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部