Open pztrn opened 1 year ago
i have the same problem, this error appears, because during startup docker-entrypoint.sh tries compile sieve files. sievec cannot locate files for include instructions. For temporary solution i commeted out in files data/Dockerfiles/dovecot/docker-entrypoint.sh lines 353-359:
#for file in /var/vmail/*/*/sieve/*.sieve ; do
# if [[ "$file" == "/var/vmail/*/*/sieve/*.sieve" ]]; then
# continue
# fi
# sievec "$file" "$(dirname "$file")/../.dovecot.svbin"
# chown vmail:vmail "$(dirname "$file")/../.dovecot.svbin"
#done
and put in docker-compose.yml in volumes for dovecot-mailcow:
- ./data/Dockerfiles/dovecot/docker-entrypoint.sh:/docker-entrypoint.sh
but now dovecot using text file every time when filtering e-mail, so it can be slower.
Anybody knows better soluton?
I also have this issue when upgrading and had to stay one version behind because that meant disabling sieve scripts otherwise. I didn't see any mention in the telegram group either. It's really curious that there aren't more people affected by this. I didn't see any mention in the telegram group either.
Workaround for me: everything works okay when using only one sieve script (e.g. managing filters via SOGo).
Workaround for me: everything works okay when using only one sieve script (e.g. managing filters via SOGo).
it isnt solutions, it works only because in these scripts you dont have "include" instruction
Workaround for me: everything works okay when using only one sieve script (e.g. managing filters via SOGo).
Sorry, I don't get your point.
In my case, it is precisely the sieve scripts managed by SOGo that get passed through the include
instruction and cause the bug.
It isn't a solution, yes, but workaround to get sieve working. As well as one from @waliwdenko. I decided to go this way and not tamper with entrypoint script to avoid possible problems when updating mailcow.
Also, my SOGo installation doesn't allow to select sieve scripts to activate (like standalone sieve app which I was using previously).
I'm affected as well. I'd like to use include :personal
to add different roles when I'm on "vacation" for example, but this seems to be not possible anymore since some time. The command has no effect (but is failing to start the container, when used).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue still exists:
mailcowdockerized-dovecot-mailcow-1 | default: line 886: error: include: personal location for included script `vacation' is unavailable (contact system administrator for more information).
mailcowdockerized-dovecot-mailcow-1 | default: error: validation failed.
@milkmaker reopen
03.04.2023, 12:44:01 | info | A95A623A48: to=<thor@joerger.dev>, relay=dovecot[fd4d:6168:6c63:6f77::e]:24, delay=27434, delays=27434/0.04/0.03/0.02, dsn=4.2.0, status=deferred (host dovecot[fd4d:6168:6c63:6f77::e] said: 451 4.2.0 <thor@joerger.dev> Temporarily unable to access necessary Sieve scripts (in reply to end of DATA command))
03.04.2023, 12:44:01 | info | 6B94A239D7: host dovecot[172.16.1.250] said: 451 4.2.0 <thor@joerger.dev> Temporarily unable to access necessary Sieve scripts (in reply to end of DATA command)
03.04.2023, 12:44:01 | info | 992D32394A: host dovecot[fd4d:6168:6c63:6f77::e] said: 451 4.2.0 <thor@joerger.dev> Temporarily
Issue still persists. Restarting the containers fixes it. Please reopen @DerLinkman @FreddleSpl0it
@th-joerger could you provide me a detailed steps to reproduce? i think the problem was introduced here https://github.com/mailcow/mailcow-dockerized/commit/ad8b7f08944c05854d8d6bf87ae13cd7ecd92f5a also see https://github.com/mailcow/mailcow-dockerized/issues/4770#issuecomment-1312745953
Hey @FreddleSpl0it I don't know how to reproduce the problem, sorry. It is no longer occuring on my production deployment since update to 2023-04a though.
Still with latest version:
default: line 886: error: include: personal location for included script `vacation' is unavailable (contact system administrator for more information).
default: error: validation failed. sievec: Fatal: failed to compile sieve script '/var/vmail/<domain>/<user>/sieve/default.sieve'
Just create (for example by managedsieve) a "vacation" script and "default" (I think the 'include' require should fit, but keeped my require statement, just to be sure) script with:
require ["fileinto", "reject", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "envelope", "include", "mailbox"];
include :personal "vacation";
Now restart the stack (maybe restarting the dovecot container might also trigger it) and you should face the issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This is still an issue
I can report: still with 2023-07 present
I'm also affected by this issue. After investigating for a bit, it seems like sievec
currently doesn't support include :personal
at all as it doesn't have an option to set the current user and thus can't set the personal storage location. libsieve
then tries to resolve this location with NULL
as the user (see https://github.com/dovecot/pigeonhole/blob/11ada0e23c7b9f6cd4af17d3f9b07b26f51452af/src/lib-sieve/plugins/include/ext-include-common.c#L147 and https://github.com/dovecot/pigeonhole/blob/11ada0e23c7b9f6cd4af17d3f9b07b26f51452af/src/lib-sieve/sieve-storage.c#L475).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
And still ... an issue
Could you guys please send us a example sieve script we can test with? I haven't encountered this issue at all. It would be pretty helpful for us.
@DerLinkman any script using include :personal "script";
will trigger this. For example looking at the files in my /var/vmail/$domain/$localpart/sieve
directory: USER.sieve
just contains require ["include"]; include :personal "sort";
(and some comment lines and more similar includes) and sort.sieve
contains the actual script.
dovecot
fails to start because the command sievec "/var/vmail/$domain/$localpart/sieve/USER.sieve" "/var/vmail/$domain/$localpart/sieve/../.dovecot.svbin"
(see the entrypoint.sh) fails with this output:
USER: line 12: error: include: personal location for included script `sort' in unavailable (contact system administrator for more information).
USER: error: validation failed.
sievec: Fatal: failed to compile sieve script 'USER.sieve'
I have this exact same problem. Are there any workarounds I can use so that I can conditionally avoid use of things like imapsieve
except when in the correct conditions?
Could you guys please send us a example sieve script we can test with? I haven't encountered this issue at all. It would be pretty helpful for us.
@DerLinkman do you need more examples or is the one fitting to reproduce the issue?
@judemille The workaround has been mentioned in this issue already, see here: https://github.com/mailcow/mailcow-dockerized/issues/4770#issuecomment-1312745953
Could you guys please send us a example sieve script we can test with? I haven't encountered this issue at all. It would be pretty helpful for us.
Sorry, a bit late to the party but here's an example of a config that will trigger this issue.
Sieve config:
$ user @ server: /m/m/d/v/m/_/g/m/sieve# cat USER.sieve
# USER Management Script
#
# This script includes the various active sieve scripts
# it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!
#
# For more information, see http://wiki.kolab.org/KEP:14#USER
#
require ["include"];
include :personal "sogo";
Example of a personal script that breaks things up - in this case, it is the default sieve script that was generated by SOGo when I add rule from the webui:
$ user @ server: m/m/d/v/m/_/g/m/sieve# cat sogo.sieve
require ["fileinto"];
if anyof (header :contains "subject" "mainbox", header :contains "subject" "cron FAILURE") {
fileinto "INBOX";
stop;
}
In the past, I've used KMail to edit Sieve rules in sogo.sieve
- without issues back then - and I wonder if this might have to do with the config breaking down the line?
For the time being, the workaround I've found is it too comment our include :personal "sogo";
when restarting mailcow or doing updates.
Hello, I have this same workout after latest update
Error: sieve: msgid=<MC.TRS.791949486.1885011705913262160@******>: redirect action: failed to redirect message to <*****@******>: smtp(postfix:588): RCPT TO failed: Failed to connect to remote server (temporary failure)
Hi there,
any news on this issue?
Hi,
yes actually!
I've looked at the code and found out what is causing this. it is the way the sieve compiler is compiling scripts right now...
We need to rewrite and rethink the sieve script compiling from https://github.com/mailcow/mailcow-dockerized/blob/70126e1f0cb0f78d99446453521b8d665fe07db9/data/Dockerfiles/dovecot/docker-entrypoint.sh#L410C1-L416C5 to make this working.
We're on it but no ETA here.
Contribution guidelines
I've found a bug and checked that ...
Description
Sieve scripts with personal includes stopped working on dovecot container restart, but works fine after it successfully started. I've made this script to fix them "automagically":
Logs
Steps to reproduce
:personal
in active script.System information
docker version
)docker-compose version
)git describe --tags `git rev-list --tags --max-count=1`
)Output of
git diff origin/master
, any other changes to the code? If so, please post them:(note that I've tried to configure
sieve
directive according to configuration just to show that this isn't working also. If I rollback this change it doesn't work either.)All third-party firewalls and custom iptables rules are unsupported. Please check the Docker docs about how to use Docker with your own ruleset. Nevertheless, iptabels output can help us to help you: iptables -L -vn:
ip6tables -L -vn:
iptables -L -vn -t nat:
ip6tables -L -vn -t nat:
DNS problems? Please run
docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254
(set the IP accordingly, if you changed the internal mailcow network) and post the output: