Arch Linux: скрипт Dovecot Sieve не компилируется

  • Arch Linux
  • Ядро Linux 4.9.36 (64-бит)
  • Dovecot 2.2.31 (65cde28)
  • SpamAssassin версии 3.4.1, работающий на Perl версии 5.26.0
  • Pigeonhole 0.4.19-1

Попытка настроить почтовый сервер для первых, следуя руководству Arch Linux Wiki Sieve (который я закончил, следуя руководству по виртуальной почтовой системе ).


Это должно включать spamtest и spamtestplus . Дословно то, что требует Wiki, за исключением sieve_trace_debug и удаления комментариев документа для удобочитаемости.

/etc/dovecot/conf.d/90-sieve.conf :

plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve

  # Start Arch Linux Wiki Config <https://wiki.archlinux.org/index.php/Dovecot#Sieve>
  sieve_extensions = +spamtest +spamtestplus

  sieve_spamtest_status_type = score
  sieve_spamtest_status_header = \
    X-Spam_score: (-?[[:digit:]]+\.[[:digit:]]).*
  sieve_spamtest_max_value = 5.0

  sieve_before = /var/lib/dovecot/sieve/global_sieves/move_to_spam_folder.sieve
  # End Arch Linux Wiki Config

  sieve_trace_debug = yes
}

Предполагается, что это направляет спам-сообщения в папку нежелательной почты.

/var/lib/dovecot/sieve/global_sieves/move_to_spam_folder.sieve :

require "spamtestplus";
require "fileinto";
require "relational";
require "comparator-i;ascii-numeric";

if spamtest :value "ge" :comparator "i;ascii-numeric" "5" {
  fileinto "Junk";
}

Пытался скомпилировать вышеупомянутое.

$ sudo sievec /var/lib/dovecot/sieve/global_sieve_sieve_folder_tove_to :

move_to_spam_folder: line 1: error: require command: unknown Sieve capability `spamtestplus'.
move_to_spam_folder: line 6: error: unknown test 'spamtest' (only reported once at first occurrence).
move_to_spam_folder: error: validation failed.
sievec(foo): Error: failed to compile sieve script '/var/lib/dovecot/sieve/global_sieves/move_to_spam_folder.sieve’

Не сработало, потому что не удалось найти spamtest и spamtestplus . Итак, я проверил конфигурацию.

sudo sieve-test -t - -Tlevel = matching /etc/dovecot/conf.d/90-sieve.conf /home/foo/test.eml :

90-sieve.conf: line 2: error: unexpected character(s) starting with '='.
90-sieve.conf: line 2: error: expected end of command ';' or the beginning of a compound block '{', but found unknown characters.
90-sieve.conf: line 2: error: unexpected character(s) starting with '~'.
90-sieve.conf: line 2: error: unexpected character(s) starting with '='.
90-sieve.conf: line 2: error: expected end of command ';' or the beginning of a compound block '{', but found unknown characters.
90-sieve.conf: line 2: error: unexpected character(s) starting with '.'.
90-sieve.conf: line 2: error: unexpected character(s) starting with '.'.
90-sieve.conf: line 5: error: unexpected character(s) starting with '='.
90-sieve.conf: line 5: error: unexpected character(s) starting with '+'.
90-sieve.conf: line 5: error: unexpected character(s) starting with '+'.
90-sieve.conf: line 7: error: unexpected character(s) starting with '='.
90-sieve.conf: line 8: error: unexpected character(s) starting with '='.
90-sieve.conf: line 8: error: unexpected character(s) starting with '\'.
90-sieve.conf: line 9: error: unexpected character(s) starting with '-'.
90-sieve.conf: line 9: error: unexpected character(s) starting with '-'.
90-sieve.conf: line 9: error: unexpected character(s) starting with '+'.
90-sieve.conf: line 9: error: unexpected character(s) starting with '.'.
90-sieve.conf: line 10: error: unexpected character(s) starting with '='.
90-sieve.conf: line 10: error: unexpected character(s) starting with '.'.
90-sieve.conf: line 12: error: unexpected character(s) starting with '='.
90-sieve.conf: line 12: error: unexpected character(s) starting with '.'.
90-sieve.conf: line 15: error: unexpected character(s) starting with '='.
90-sieve.conf: error: parse failed.

Очевидно он даже не может прочитать /etc/dovecot/conf.d/90-sieve.conf ? И он задыхается от знака равенства ??

Кажется, если я исправлю эту ошибку, я могу включить spamtest и spamtestplus , что, в свою очередь, [потенциально] исправит ] sievec ошибка компиляции.


doveconf -n :

# 2.2.31 (65cde28): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.19 (e5c7051)
# OS: Linux 4.9.36-x86_64-linode85 x86_64 Arch Linux
mail_home = /home/vmail/%d/%n
mail_location = maildir:~
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 index ihave duplicate mime foreverypart extracttext
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocols = imap pop3
service auth {
  unix_listener auth-client {
    group = postfix
    mode = 0660
    user = postfix
  }
  user = root
}
ssl_cert = </etc/ssl/private/vmail.crt
ssl_key =  # hidden, use -P to show it
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
0
задан 31 August 2017 в 14:00
1 ответ

Конфигурация вашего сита вообще не получена от Dovecot. Если вы используете файлы конфигурации «для каждой функции», ваш файл /etc/dovecot/dovecot.conf должен содержать оператор вроде

# Most of the actual configuration gets included below. The filenames are
# first sorted by their ASCII value and parsed in that order. The 00-prefixes
# in filenames are intended to make it easier to understand the ordering.
!include conf.d/*.conf

, который является источником отдельных файлов конфигурации в conf.d ].

0
ответ дан 24 November 2019 в 03:57

Теги

Похожие вопросы