Filtre mail en panne

I have searched the forum for similar issues

on

This category is for general issues(=something is broken) regarding YunoHost, NOT apps.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What type of hardware are you using

VPS bought online

What YunoHost version are you running

12.1.14

Describe your issue

Depuis quelque jours j’ai mes filtres de mail qui ne veulent plus fonctionner, j’ai beau les supprimer et en faire des nouveaux, ils ne sont pas pris en compte. J’ai tenté de redémarrer postfix, dovecot, php… vérifier les configs, je n’ai rien vu d’anormal et là je sèche. Est-ce du à une mise à jour qui omet les filtres ?

Merci.

Share relevant logs or error messages

Aucun code erreur

Même problème ici.

Les filtres sont cassés depuis la dernière mise à jour de rspamdui et rspamd.

/var/log/mail.err me retourne :

Error: sieve: file storage: script: Failed to open sieve script: open(/etc/dovecot/global_script/rspamd-report-ham.sieve) failed: Permission denied (euid=500(vmail) egid=8(mail) missing +r perm: /etc/dovecot/global_script/rspamd-report-ham.sieve, we're not in group 0(root))
Error: sieve: rspamd-report-ham: parse failed
Error: sieve: Failed to open script `/etc/dovecot/global_script/rspamd-report-ham.sieve' for compile
Error: sieve: file storage: script: Failed to open sieve script: open(/etc/dovecot/global_script/rspamd-report-ham.sieve) failed: Permission denied (euid=500(vmail) egid=8(mail) missing +r perm: /etc/dovecot/global_script/rspamd-report-ham.sieve, we're not in group 0(root))
Error: sieve: rspamd-report-ham: parse failed
Error: sieve: Failed to open script `/etc/dovecot/global_script/rspamd-report-ham.sieve' for compile

Visiblement les permissions ont été modifiées durant les mises à jour de ces deux applications.

Apparemment les fichiers n’ont pas la bonne permission
chown -R vmail:mail /etc/dovecot/global_script
Vérifiez les permissions
ls -lha /etc/dovecot/global_script

Effectivement il y a un problème de permission et malgré la correction de cela il semble qu’il faille executer sievec dans le script.
Un fix est en cours Fix by ewilly · Pull Request #64 · YunoHost-Apps/rspamd_ynh · GitHub.

Avant le chown -R les permissions étaient positionnées comme ceci :

ls -lha /etc/dovecot/global_script
total 32K
drwxrwx---+ 2 vmail mail 4,0K 27 sept. 20:20 .
drwxr-xr-x+ 8 root  root 4,0K 29 sept. 11:09 ..
-rwxr-x---  1 vmail mail  100  2 févr.  2023 dovecot.sieve
-rw-r--r--  1 vmail mail  234  2 févr.  2023 dovecot.svbin
-rwxr-x---  1 root  root  404 30 sept. 18:53 rspamd-report-ham.sieve
-rwxr-x---  1 root  root  273 30 sept. 18:53 rspamd-report-spam.sieve
-rwxr-x---  1 root  root  609 30 sept. 18:53 rspamd-spam-to-junk-folder.sieve
-rw-r--r--  1 vmail mail  257 17 août  07:02 rspamd.svbin

Après application :

ls -lha /etc/dovecot/global_script
total 32K
drwxrwx---+ 2 vmail mail 4,0K 27 sept. 20:20 .
drwxr-xr-x+ 8 root  root 4,0K 29 sept. 11:09 ..
-rwxr-x---  1 vmail mail  100  2 févr.  2023 dovecot.sieve
-rw-r--r--  1 vmail mail  234  2 févr.  2023 dovecot.svbin
-rwxr-x---  1 vmail mail  404 30 sept. 18:53 rspamd-report-ham.sieve
-rwxr-x---  1 vmail mail  273 30 sept. 18:53 rspamd-report-spam.sieve
-rwxr-x---  1 vmail mail  609 30 sept. 18:53 rspamd-spam-to-junk-folder.sieve
-rw-r--r--  1 vmail mail  257 17 août  07:02 rspamd.svbin

Les logs me retournent à présent :

Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Error: sieve: rspamd-report-ham: validation failed
Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Error: sieve: rspamd-report-ham: validation failed
Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'

Merci pour le support.

Comme dit juste avant le chown seul ne fonctionne pas. Tu peux essayer de mettre a jour rspam depuis la branche fix ou attendre la prochaine version.

Une fois le fix appliqué, les logs me retournent :

Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Error: sieve: rspamd-report-ham: validation failed
Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'

Pourras tu mettre a jour vers la version 4.2.0~ynh5 et me dire?

(je viens de la pousser donc elle devrait être proposée d’ici max 2 heures)

Le bug n’a pas été corrigé dans la v4.2.0~ynh5.

Les erreurs du post précédent sont toujours présentes dans : /var/log/mail.err

es-tu sûr que ce sont de nouvelles lignes et pas les anciennes ?
car /etc/dovecot/global_script/rspamd-report-ham.sieve ne devrait pas exister.
Quels sont les sorties de :

  • ls -alh /etc/dovecot/global_script/
  • tail -f /var/log/mail.err -n 50
ls -alh /etc/dovecot/global_script/
total 44K
drwxr-x---+ 2 vmail mail 4,0K  1 oct.  18:26 .
drwxr-xr-x+ 9 root  root 4,0K  1 oct.  18:26 ..
-rw-r-----  1 vmail mail  100  2 févr.  2023 dovecot.sieve
-rw-r-----  1 vmail mail  234  2 févr.  2023 dovecot.svbin
-rw-r-----  1 vmail mail  404  1 oct.  06:36 rspamd-report-ham.sieve
-rw-r-----  1 vmail mail  531  1 oct.  06:36 rspamd-report-ham.svbin
-rw-r-----  1 vmail mail  273  1 oct.  06:36 rspamd-report-spam.sieve
-rw-r-----  1 vmail mail  401  1 oct.  06:36 rspamd-report-spam.svbin
-rw-r-----  1 vmail mail  684  1 oct.  18:26 rspamd-spam-to-junk-folder.sieve
-rw-r-----  1 vmail mail  349  1 oct.  18:26 rspamd-spam-to-junk-folder.svbin
-rw-r-----  1 vmail mail  257 17 août  07:02 rspamd.svbin
tail -f /var/log/mail.err -n 50
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560883><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:00:02 yunohost dovecot: lda(user@domain.tld)<560884><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:00:38 yunohost dovecot: lda(user@domain.tld)<561048><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:00:43 yunohost dovecot: lda(user@domain.tld)<561055><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:00:48 yunohost dovecot: lda(user@domain.tld)<561077><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:05:06 yunohost dovecot: lda(user@domain.tld)<561691><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:15:32 yunohost dovecot: lda(user@domain.tld)<563301><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:16:57 yunohost opendkim[1751]: xxxxxxxxxxxxxx: key retrieval failed (s=mail, d=yunohost.org): 'mail._domainkey.yunohost.org' query timed out
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:17:02 yunohost dovecot: lda(user@domain.tld)<563471><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-report-ham.svbin: open: binary requires unknown extension `vnd.dovecot.pipe'
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `vnd.dovecot.pipe'
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 1: require command: unknown Sieve capability `imapsieve'
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: line 16: unknown command 'pipe' (only reported once at first occurrence)
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-report-ham: validation failed
Oct  1 20:20:15 yunohost dovecot: lda(user@domain.tld)<563992><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-report-ham.sieve'

Je gère mon instance depuis octobre 2015, il se peut certains fichiers de configurations soient toujours présents sur ce système.

hum je crois comprendre tu as installé depuis la branche fix hier et donc certains changements fait ce matin ne se sont pas appliquer lors de l’upgrade.
Il va falloir le faire manuellement: rm -f rspamd-report-* et après ca systemctl restart dovecot. Les fichiers rspamd-report-* sont désormais dans /etc/dovecot/imapsieve.

@ewilly je te confirme que les filtres fonctionnent à présent pour moi.

On attend le retour de @antoine.courtois pour fermer ce ticket.

J’ai aussi supprimé les fichiers rspamd-spam-to-junk-folder.sieve et rspamd-spam-to-junk-folder.svbin

Encore merci pour le support.

Ceux-ci il ne fallait pas.

Avec les filtres ne fonctionnent toujours pas

Oct  2 06:54:04 yunohost dovecot: lda(user@domain.tld)<656958><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: binary /etc/dovecot/global_script/rspamd-spam-to-junk-folder.svbin: open: binary requires unknown extension `vnd.dovecot.debug'
Oct  2 06:54:04 yunohost dovecot: lda(user@domain.tld)<656958><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-spam-to-junk-folder: line 1: require command: unknown Sieve capability `vnd.dovecot.debug'
Oct  2 06:54:04 yunohost dovecot: lda(user@domain.tld)<656958><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-spam-to-junk-folder: line 2: unknown command 'debug_log' (only reported once at first occurrence)
Oct  2 06:54:04 yunohost dovecot: lda(user@domain.tld)<656958><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: rspamd-spam-to-junk-folder: validation failed
Oct  2 06:54:04 yunohost dovecot: lda(user@domain.tld)<656958><xxxxxxxxxxxxxxxxxxxxxxxxx>: Error: sieve: Failed to compile script `/etc/dovecot/global_script/rspamd-spam-to-junk-folder.sieve'

Bonjour à tous,

Merci pour vos réponses. De mon côté j’ai installé la MAJ et effectivement ça ne fonctionne pas.

Merci.

A priori rspamd n’est pas le seul bémol, j’ai un serveur de test sans rspamd, les filtres ne fonctionne à priori pas non plus même sans rspamd installé. J’ai farfouillé essayer de comprendre ce qu’il se passe, mais je n’ai aucune piste pour l’instant.
Je sais juste que les filtres ont déconner à partir de dimanche/lundi.

Sans log, ça va être difficile de comprendre et t’aider…

Pour rspamd la version 4.2.1 vient d’être publiée et devrait résoudre le PB si il est lié à missing /etc/dovecot/global_script/rspamd-report-ham.sieve ? · Issue #67 · YunoHost-Apps/rspamd_ynh · GitHub

je viens d’appliquer la 4.2.1 et l’erreur est toujours présente

Error: sieve: Failed to compile script /etc/dovecot/global_script/rspamd-spam-to-junk-folder.sieve' Error: sieve: binary /etc/dovecot/global_script/rspamd-spam-to-junk-folder.svbin: open: binary requires unknown extension vnd.dovecot.debug’
Error: sieve: rspamd-spam-to-junk-folder: line 1: require command: unknown Sieve capability `vnd.dovecot.debug’
Error: sieve: rspamd-spam-to-junk-folder: line 2: unknown command ‘debug_log’ (only reported once at first occurrence)
Error: sieve: rspamd-spam-to-junk-folder: validation failed

Humm c’est propre à la version de dovecot dans bookworm, l’extension `vnd.dovecot.debug’ n’est pas reconnue… Je me monte un VM bookworm et regarde ca asap.