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

sieve (dovecot/pigeonhole) script fails after updating #286859

Open
jeschmidt opened this issue Feb 7, 2024 · 5 comments
Open

sieve (dovecot/pigeonhole) script fails after updating #286859

jeschmidt opened this issue Feb 7, 2024 · 5 comments
Labels
0.kind: bug Something is broken

Comments

@jeschmidt
Copy link

Describe the bug

Without changing configuration, I ran nixos-rebuild switch --update on my mail server. Note: I am using the nixos-unstable channel.

Most of my 'sieve' configuration was done using services.dovecot2.extraConfig as there wasn't much native nix config for it, which seems to have changed recently. I had a very basic configuration:

      service managesieve-login {
        inet_listener sieve {
          port = 4190
        }
      }
      service managesieve {
      }
      protocol lda {
        mail_plugins = $mail_plugins sieve
      }
      protocol lmtp {
        mail_plugins = $mail_plugins sieve
      }
      protocol sieve {
      }
      plugin {
        sieve = file:~/sieve;active=~/.dovecot.sieve
      }

And the sieve script itself is very basic also, just moving mail into subfolders based on From address. I won't paste the script for now (it's named "fromfilter" in the below log) but I can if requested. Here's the error I get in .dovecot.sieve.log when every new mail arrives:

sieve: info: started log at 2024-02-06 17:03:33 -0800.
fromfilter: line 5: error: require command: unknown Sieve capability `fileinto'.
fromfilter: line 18: error: unknown command 'fileinto' (only reported once at first occurrence).
fromfilter: error: validation failed.

Which is weird because 'fileinto' is a basic capability of sieve and not a plugin or extension.

Expected behavior

Expected sieve protocol to function as it did previously with the same configuration

Notify maintainers

@2xsaiko I think this might have to do with your recent changes to dovecot.nix?

Metadata

# nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 24.05 (Uakari), 24.05pre580425.faf912b08657`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos"`
 - channels(jschmidt): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@jeschmidt jeschmidt added the 0.kind: bug Something is broken label Feb 7, 2024
@dotlambda
Copy link
Member

dotlambda commented Feb 7, 2024

You have to set

services.dovecot2.sieve.extensions = [ "fileinto" ];

See #275031

@jeschmidt
Copy link
Author

That fixed it, thanks. And I did a search first but I suppose only in "issues" not pull requests. I'll try harder to find the answers myself in future!

@2xsaiko
Copy link
Contributor

2xsaiko commented Feb 7, 2024

Maybe sieve.extensions should be set to dovecot's default value (haven't checked what that is yet) so you can add to it like in this config.

@thomask77
Copy link

@jeschmidt can you please re-open the bug?

At the moment, if the sieve.extensions option is not set, the module will emit `sieve_extensions ='.

This will disable all extensions, including dovecot's defaults.

In fact, it's enough to enable any extension in sieve.extension - in your case "copy" would have had the same effect as "fileinto". If anything is set, the module will emit "sieve_extensions = +copy": it's keeping the defaults and adds copy.

The correct bug fix would be either:

  • Add all of dovecot's defaults as a default for the option
  • .. or don't emit the sieve_extensions line if sieve.extensions is empty.

@RaitoBezarius: Can you have a look? You seem to have introduced those lines in the module.

@2xsaiko
Copy link
Contributor

2xsaiko commented Jun 3, 2024

I actually introduced this initially. Sorry about that! #286184 should get rid of this bad default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants