Mihai Moldovan
2011-Sep-10 02:36 UTC
[Dovecot] Annoying "feature" in dovecot/pidgeonhole - include depth limitation
Hi all, I'm using dovecot 2.0.14 build on Debian. The maintainers obviously patch the dovecot source so that it uses the pidgeonhole sieve system. Today I ran into a very annoying issue: I created several sieve scripts and interlinked via the include command, only to find dovecot spewing this error message at me: SWREG Newsletter: line 14: error: cannot nest includes deeper than 10 levels. As far as I could see this limitation is hardcoded to a depth of 10 and can only be changed at compile time. Why is it in place? I understand that you CAN create loops via the include command and limiting the inclusion depth is a way to circumvent loops - but ten is a very low value and the fact that you can't change it via a config file or sorta is even worse. My "fix" so far has been ignoring this, i.e. not returning false. I'm pretty sure that's not the best way to do it but it seems to be working so far. I'd really like to hear your opinion on this issue. Best regards, Mihai ** -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4369 bytes Desc: S/MIME Cryptographic Signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20110910/f37d3c2f/attachment-0004.bin>
Stephan Bosch
2011-Sep-11 10:01 UTC
[Dovecot] Annoying "feature" in dovecot/pidgeonhole - include depth limitation
On 9/10/2011 4:36 AM, Mihai Moldovan wrote:> Hi all, > > I'm using dovecot 2.0.14 build on Debian. > > The maintainers obviously patch the dovecot source so that it uses the > pidgeonhole sieve system. > > Today I ran into a very annoying issue: I created several sieve scripts > and interlinked via the include command, only to find dovecot spewing > this error message at me: > SWREG Newsletter: line 14: error: cannot nest includes deeper than 10 > levels. > > As far as I could see this limitation is hardcoded to a depth of 10 and > can only be changed at compile time.Yes, it is.> Why is it in place? I understand that you CAN create loops via the > include command and limiting the inclusion depth is a way to circumvent > loops - but ten is a very low value and the fact that you can't change > it via a config file or sorta is even worse.True. This is one of those typical 'this aught to be enough for every one' issues. Up until now, this was true :)> My "fix" so far has been ignoring this, i.e. not returning false. I'm > pretty sure that's not the best way to do it but it seems to be working > so far. > > I'd really like to hear your opinion on this issue.I've made the limits for the include extension configurable now. This will be included in the next release. Regards, Stephan.