如何使用 RoundCube 和 Dovecot-Pigeonhole 将垃圾邮件移至垃圾邮件文件夹

如何使用 RoundCube 和 Dovecot-Pigeonhole 将垃圾邮件移至垃圾邮件文件夹
OS: Rocky Linux 9.2
Services: Dovecot, Dovecot-Pigeonhole, Postfix, Spamassassin, RoundCube

我正在尝试使用 Dovecot-Pigeonhole 和 RoundCube 将被 postfix 和 spamassassin 标记为垃圾邮件的电子邮件移至垃圾邮件文件夹,我按照这些步骤操作,并且使用 RoundCube 上显示的过滤器选项卡,但标记的电子邮件仍然在收件箱中。

PS 我不知道哪种操作是正确的?在入站规则中添加帖子 4190 并使用 Firewalld 阻止它,还是不在入站规则中添加它?

— 鸽舍 —

# ------------- 15-lda.conf -------------
# Should saving a mail to a nonexistent mailbox automatically create it?
lda_mailbox_autocreate = yes

# Should automatically created mailboxes be also automatically subscribed?
lda_mailbox_autosubscribe = yes

protocol lda {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins autocreate sieve quota
}

# ------------- 20-lmtp.conf -------------
protocol lmtp {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins autocreate sieve quota
}

# ------------- 20-managesieve.conf -------------
# Uncomment to enable managesieve protocol:
protocols = $protocols sieve

# Service definitions
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}

# Service configuration
protocol sieve {
  managesieve_max_line_length = 65536
  managesieve_implementation_string = Dovecot Pigeonhole
}

# ------------- 90-sieve.conf -------------
plugin {

  # Default line after install Dovecot-Pigeonhole
  sieve = file:~/sieve;active=~/.dovecot.sieve

  # This is Mine
  sieve_default = /etc/dovecot/sieve/default.sieve
}

现在,我已经创建了/etc/dovecot/筛目录和/etc/dovecot/sieve/default.sieve文件里面有以下代码:

require ["envelope", "fileinto", "mailbox"];
# rule:[Filtering Spam]
if header :contains "X-Spam-Flag" "YES"
{
    fileinto "Spam";
    stop;
}

我总是阅读有关该目录的内容/etc/roundcube/但我在系统中没有找到它,而且我知道我无法从安装目录中编辑 RoundCube 配置文件,因为每次升级它都会被替换,所以这只是暂时的,直到我弄清楚,所以如果有人能帮助创建 RoundCube 设置/etc/roundcube/会很棒

我已经在子域上安装了 RoundCube,并修改了子域/public_html/config/config.inc.php

$config['plugins'] = [
    'archive',
    'zipdownload',

    // This is mine
    'managesieve'
];


$config['managesieve_host'] = 'localhost';
$config['managesieve_default'] = '/etc/dovecot/sieve/default.sieve';

现在,我的 RoundCube 上有一个“过滤器”选项卡,但不幸的是,RoundCube 无法自动创建垃圾邮件文件夹,即使我手动创建,标记的电子邮件也不会进入其中。

RoundCube Filters 选项卡显示出来

RoundCube 无法创建垃圾邮件文件夹或将垃圾邮件移动到现有的垃圾邮件文件夹

谢谢你!

相关内容