Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

mail-server/users.nix: don't expand variables in sieve script #73

Merged
merged 2 commits into from
Feb 20, 2018

Conversation

eqyiel
Copy link
Contributor

@eqyiel eqyiel commented Feb 13, 2018

With this change the sieve script

require ["fileinto", "mailbox"];

if address :is "from" "notifications@github.com" {
  fileinto :create "GitHub";
  stop;
}

# This must be the last rule, it will check if list-id is set, and
# file the message into the Lists folder for further investigation
elsif header :matches "list-id" "<?*>" {
  fileinto :create "Lists";
  stop;
}

# Test: ''${1}
# Test: ${builtins.toString 1234};

...gets interpreted like this:

$ cat /var/sieve/ruben@maher.fyi/default.sieve                                                                                                                                                    
require ["fileinto", "mailbox"];

if address :is "from" "notifications@github.com" {
  fileinto :create "GitHub";
  stop;
}

# This must be the last rule, it will check if list-id is set, and
# file the message into the Lists folder for further investigation
elsif header :matches "list-id" "<?*>" {
  fileinto :create "Lists";
  stop;
}

# Test: ${1}
# Test: 1234;

Fixes #71

@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 13, 2018

The CI error appears to be unrelated

@r-raymond
Copy link
Owner

awesome, thanks a lot for fixing this! I'll merge if @The-M1k3y confirms it works for him

@The-M1k3y
Copy link

Sorry, it took me some time to check. I can confirm that this fixes the issue on my server.
(based on release 2.0.4)

@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 18, 2018

Rebased!

@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 19, 2018

Looks like Travis timed out while writing to the cache, apparently that can be configured though: https://docs.travis-ci.com/user/caching/#Setting-the-timeout

The default is 3, and this can lead to cache timeouts while saving the contents
of /nix/store.
@r-raymond
Copy link
Owner

It now fails with The job exceeded the maximum time limit for jobs, and has been terminated. But since this is unrelated to the PR, I'll merge.

@r-raymond r-raymond merged commit 2ef04b2 into r-raymond:master Feb 20, 2018
@eqyiel eqyiel deleted the fix-sieve-variables branch August 18, 2018 05:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants