Bug 423189 - Cannot make default script active
Summary: Cannot make default script active
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: sieve (show other bugs)
Version: 5.13.2
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-18 22:07 UTC by Sean Gibson
Modified: 2021-03-11 07:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Gibson 2020-06-18 22:07:46 UTC
SUMMARY


STEPS TO REPRODUCE
1. Install
2. Edit script
3. Select as active

OBSERVED RESULT
Item is not selectable. Box turns blue briefly, line disappears and comes back unselected. New sieve rules are not active.


EXPECTED RESULT
Script selected as default script and work

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 32/5.18.5
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Last known to work in version: pim-sieve-editor-18.12.2-1.fc29.x86_64.rpm
Comment 1 korgens 2020-08-02 03:13:12 UTC
I'm also facing the same problem when using the standalone sieveeditor
utility.

SOFTWARE
KSieve Editor Version 5.14.3 (20.04.3)
KDE Frameworks 5.72.0
Qt 5.15.0 (compiled with 5.15.0)

OS VERSION
Linux/KDE Plasma: Archlinux (up to date 2020-08-01)
Comment 2 Vadim A. Misbakh-Soloviov (mva) 2020-09-13 06:10:48 UTC
as far a I heard, this is related to dovecot on the server end (well, otoh, I personally didn't hear about any other popular non-proprietary sieve daemon).

And I think, it can be somehow related to the script path here: https://invent.kde.org/pim/libksieve/-/blob/master/src/kmanagesieve/sievejob.cpp#L79-80
maybe there is a slash missed, or something like that.

Unfortunatelly, I failed to debug that properly (wireshark doesn't want to decrypt my sieve traffic even with RSA key used by the server, and I failed to find the place where kmail logs sieve commands (it it does that at all))
Comment 3 Jason Straight 2021-02-08 00:59:59 UTC
I don't know if this helps or not, but thunderbird with the sieve addon can make the script active.
Comment 4 Matthias Heinz 2021-03-09 13:53:57 UTC
Hi,

I just stumbled about that problem as well. Since sieve is a relatively simple protocol I first thought this would be dovecots fault. But no, the problem seems to be kmails sieve editor here.

I could just activate the script with SETACTIVE "USER" over an openssl s_client connection and now it works.

Easiest fix would probably be to run SETACTIVE "USER" on every connection or so...
Comment 5 Matthias Heinz 2021-03-09 14:30:26 UTC
After digging around in the code a bit I think I found the problem.

In ksieveui/managescriptsjob/generateglobalscriptjob.cpp is the function GenerateGlobalScriptJob::writeUserScript(), which is called by the start() function.

In the writeUserScript() function a put() is called to kmanagesieve/sievejob.cpp SieveJob *SieveJob::put. And if you look closely it has two booleans as input. One to set a script active, one to deactivate it.

And in writeUserScript() both bools are "false", which is wrong. The first one should "true".
Comment 6 Laurent Montel 2021-03-11 07:11:51 UTC
Git commit de7dfd90f63870322c376180848bca5b969945bd by Laurent Montel.
Committed on 11/03/2021 at 07:10.
Pushed by mlaurent into branch 'master'.

Fix Bug 423189 - Cannot make default script active

indeed it seems that it was not active by default
FIXED-IN: 5.17.0

M  +6    -1    src/ksieveui/managescriptsjob/generateglobalscriptjob.cpp
M  +3    -0    src/ksieveui/managescriptsjob/generateglobalscriptjob.h
M  +1    -0    src/ksieveui/widgets/managesievewidget.cpp

https://invent.kde.org/pim/libksieve/commit/de7dfd90f63870322c376180848bca5b969945bd