Giter Club home page Giter Club logo

sieve's People

Contributors

arvoreen avatar dependabot-preview[bot] avatar dependabot[bot] avatar dxdxdt avatar fernand0 avatar georgeto avatar irgendwr avatar itagagaki avatar jnbr avatar juanjosepablos avatar krivin avatar marclaporte avatar ovari avatar pavhofman avatar steffen-4s1 avatar tessus avatar thsmi avatar tobiasge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sieve's Issues

CodeMirror 3 compatibility

CodeMirror 3 is approaching, the api changed slightly (e.g. Matching Brackets are now a plugin)

So the codebase needs to be updated to be aware of these changes.

Silence

Arch Linux
Thunderbird 31.2.0
Sieve 0.2.2

All debug options selected. Zero response in the debug console. Sieve window shows 'wheel of death' and does not respond to any button.

Tried restarting Thunderbird (no change), checked log at server (empty), disabling/enabling add-on.

Copy and paste from sieve editor window removes newlines

Repo

  • From within the "Sieve Filters" editor window, copy any amount of text from your sieve definitions.
  • Paste the text in to any text editor (notepad, etc)

Expected

Sieve filter text is pasted intact from the clipboard.

Actual

All newlines are stripped from the text, and is pasted from the clipboard as one very long line.

Problem with quoted strings which themselves contain quotes

There's a problem with the parsing of quoted string responses that themselves contain quote characters, e.g., "foo "bar"". The server I'm testing returns such strings in responses reporting sieve script errors.

I've changed the server so it uses literals to report such responses. This works around the problem, but unfortunately some other clients have problems dealing with literals in this context, which puts me in a position of choosing which client to support.

Additionally, once this happens the session desynchronizes and freezes up. If I let it time out exceptions are thrown which renders all of Thunderbird inert.

The log when all this happens looks like this:

[15:41:36.724 server3] Client -> Server:
CHECKSCRIPT {55+}
#
#2013-2-6
#
if header :contains "subject" "doof {

[15:41:36.725 server3] Client -> Server [Byte Array]:
67,72,69,67,75,83,67,82,73,80,84,32,123,53,53,43,125,13,10,35,13,10,35,32,50,48,49,51,45,50,45,54,13,10,35,13,10,105,102,32,104,101,97,100,101,114,32,58,99,111,110,116,97,105,110,115,32,34,115,117,98,106,101,99,116,34,32,34,100,111,111,102,32,123,13,10

[15:41:36.727 server3] Server -> Client [Byte Array]
78,79,32,34,79,112,101,110,32,115,116,114,105,110,103,32,97,116,32,101,110,100,32,111,102,32,101,120,112,114,101,115,115,105,111,110,32,97,114,111,117,110,100,32,105,110,112,117,116,32,108,105,110,101,32,52,32,91,115,32,32,92,34,115,117,98,106,101,99,116,92,34,32,92,34,100,111,111,102,32,123,94,93,34,13,10

[15:41:36.727 server3] Server -> Client
NO "Open string at end of expression around input line 4 [s  \"subject\" \"doof {^]"

[15:41:36.728 server3] Parsing Warning in libManageSieve/Sieve.js:
(new String("Linebreak expected:\r\nsubject\\\" \\\"doof {^]\"\r\n"))

[15:41:56.728 server3] libManageSieve/Sieve.js:
OnTimeout

[15:46:36.718 server3] Sending keep alive packet...

[15:58:16.761 server3] Stop request received ...

[15:58:16.761 server3] Disconnected ...

[15:58:16.761 server3] On Server Disconnect: server3/ [cid=0,cid=2]

[15:58:16.761 server3] Invoking Listeners for onDisconnect

[15:58:16.762 server3] Channel Closed: server3/cid=2 [cid=0]

[15:58:16.762 server3] Invoking Listeners for onChannelClosed

[15:58:16.763 server3] Channel Closed: server3/cid=0 []

[15:58:16.763 server3] No Listener for onChannelClosed
[]

Timestamp: 2/6/13 3:58:16 PM
Error: this.sessions[sid] is undefined
Source File: chrome://sieve/content/modules/sieve/SieveConnectionManager.js
Line: 186

Timestamp: 2/6/13 5:47:24 PM
Warning: Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
Source File: chrome://messenger/content/messenger.xul
Line: 0

Timestamp: 2/6/13 5:47:24 PM
Error: SieveOverlayManager._imports[url] is undefined
Source File: chrome://sieve/content/modules/overlays/SieveOverlayManager.jsm
Line: 392

Timestamp: 2/6/13 5:47:24 PM
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/search.xml ::  :: line 156"  data: no]

FWIW, I took a peek at the code. I'm not sure I see what's causing this specifically, but the procedure:

SieveResponseParser.prototype.extractQuoted
    = function ()
{
  if (this.isQuoted() == false)
    throw "Quoted string expected but found \n"+this.getData();

  // now search for the end. But we need to be aware of escape sequences.
  var nextQuote = this.pos;

  do
  {
    nextQuote = this.indexOf(CHAR_QUOTE, nextQuote+1);

    if (nextQuote == -1)
      throw "Quoted string not properly closed\n"+this.getData();

  } while (this.data[nextQuote-1] == CHAR_BACKSLASH )

  var quoted = this.getData(this.pos+1,nextQuote);

  this.pos = nextQuote+1;

  // Cleanup escape sequences
  quoted = quoted.replace('\\"','"',"g")
  quoted = quoted.replace("\\\\","\\","g");

  return quoted;
}

has at least one other problem: It won't handle a string like "" correctly. In general you have to parse these sorts of strings forward, peeking back as this code does doesn't work.

Support for variables

The module doesn't support set variables
e.g.
Error while parsing script.
Unknown Element at: set "start" "2014-02-02";
set "start_txt" "February 2nd";

Thus this is really common to simplify vacation script...

tls negotiation fails

I'm trying to access filters on my cyrus imapd server, and the connection stalls after the "STARTTLS" issent. After the "OK begin TLS negotiation now" , a packet of binary data is sent from the client to the server, and the server respons with several packets of cert. info and other binary contents. That is the end of the transmissions. The "CAPABILITY" shown below is apparently never transmitted, unless it is part of the starttls. Note: somehow this did go through one time out of about 50 times I've tried it. Suprised to see it allowed me to to a lot more like start editing a filter, but that success was short lived.

[17:24:56.745 server1] Client -> Server:
STARTTLS

[17:24:56.745 server1] Client -> Server [Byte Array]:
83,84,65,82,84,84,76,83,13,10

[17:24:57.025 server1] Server -> Client [Byte Array]
79,75,32,34,66,101,103,105,110,32,84,76,83,32,110,101,103,111,116,105,97,116,105,111,110,32,110,111,119,34,13,10

[17:24:57.025 server1] Server -> Client
OK "Begin TLS negotiation now"

[17:24:57.026 server1] Client -> Server:
CAPABILITY

[17:24:57.026 server1] Client -> Server [Byte Array]:
67,65,80,65,66,73,76,73,84,89,13,10

[17:25:16.580 server1] libManageSieve/Sieve.js:
OnTimeout

Error: "Failed to override broken certificate"

Installed the nightly build (0.2.3f), now I get:

Last command failed, because the server reported an error:
Failed to override broken certificate.

My Sieve server runs a self-signed cert; I recall having to jump through some hoops with TB to get it talk IMAPS, by setting network.security.ports.banned.override, but that doesn't seem to help here.

Sieve filter from file

I've been using this addon for years, with great pleasure!

But now we moved on to a new server (Synology), which still uses Sieve as a filter, just not accessible via the normal ports.
I found the sieve script as a file on my home drive. Is it possible to use a file for this addon, instead of the daemon access?

Parser error

Sieve throws from time to time when editing a script an syntax error at line 1 called "unexpected string". There is no way getting rid of that message except restarting thunderbird.

This occures almost every time I'm editing the script directly with sieve. If I'm copying some code snippets into it the syntax error does not appear.

Just to make sure here are the first lines of my code:

---SNIP---
require [ "vacation", "regex", "fileinto", "imapflags", "body" ];

if header :contains ["From"] "[email protected]"
{
fileinto "INBOX.xx";
stop;
}
---SNIP---

SASL GSSAPI

Implement native support for SASL GSSAPI

Th show stopper concerning SASL GSSAPI is that nsIAuthModule is not exposed to javascript. It's just accessible from C++. So there's no way to use Thunderbird's native implementation from extensions.

One way to get around this would be to patch Thunderbird to expose the nsIAuthModule to Scripts.

The other way would be reimplementing nsAuthGSSAPI.cpp in JavaScript with C-Types.

As workaround there is a perl based proxy implementation: https://github.com/thsmi/sieve/tree/master/tools/GSSAPI%20Proxy

Set Flag is not done after moving process

I have noticed following behaviour. Setting a rule which marks the message as read and then move it to a folder works correctly. When I configure the rule the other way around, the message is moved to the specific folder, but it remains as unread.

These are the exported test rules:

'# rule:[Test]
if true
{
fileinto "Archive";
setflag "\Seen";
}

is treated different from

'# rule:[Test]
if true
{
setflag "\Seen";
fileinto "Archive";
}

[Thunderbird 31] menu items missing due to new menu

Thunderbird 31 hides the old menu and introduced a new menu button at the right upper corner of its interface. The Sieve menu items under [Menu button] -> [Extras] are missing.

Workaround for now: I can still use it by pressing Alt which unhides the old menu.

where is the "drag 'n drop' UI?

Hi,

I have some users interrested in using sieve scripts, but the default tes-only interface of the sieve plugin for TB is not usable for them.
Version 0.20 mention a new "drag 'n drop" UI. How can I enable it for my users?

regards.

ManageSieve Dovecot

Hello,
when I connect to our server dovecot-managesieve-0.3.0 in Thunderbird's error console appears the following error:

Timestamp: 05/12/2012 14:47:51
Error: TypeError: this.sessions[sid] is undefined
Source File: chrome://sieve/content/libs/libManageSieve/SieveAbstractClient.js
Line: 193

How could I check this error?

Exception upon addon unload

Modules should only be unloaded if logout is completed, otherwise exceptions are thrown

e.g.:
Error: Cc is undefined
Source File: chrome://sieve/content/modules/sieve/Sieve.js
Line: 573

Error: [Exception... "'TypeError: Cc is undefined' when calling method: [nsIStreamListener::onStopRequest]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "native frame :: :: <TOP_LEVEL> :: line 0" data: no]

Error: [Exception... "'TypeError: Cc is undefined' when calling method: [nsITimerCallback::notify]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "native frame :: :: <TOP_LEVEL> :: line 0" data: no]

Does not work anymore with Thunderbird 38

I recently updated to Thunderbird 38, and the sieve extension does not work anymore. When I click "Manage sieve filters", it just shows a spinning icon "Connecting...", even though the settings did not even change. I verified with Wireshark that not a single package is sent to the server and port used for sieve, so this cannot be a problem with the remote server or the login credentials.

This is using Sieve 0.2.3d, Icedove (Thunderbird in Debian) 38.0.1, with all the other add-ons disabled.

Not able to connect since Thunderbird 38.1.0 (using version 0.2.2)

The extension is no longer able to connect. Maybe it has something to do with this JavaScript error that I found in the error console (the original error log entry contained German labels because Iโ€™m using a system with German locale and I tried to correctly translate the labels):

Timestamp: 21.07.15 23:11:51
Error: TypeError: accountManager.allServers.Count is not a function
Source file: chrome://sieve/content/modules/sieve/SieveAccounts.js
Line number: 1222

Postbox 3 Support

Hi,

It would be nice to use ManagedSieve in Postbox 3. Is there much porting effort?

Best regards

Store sieve script with Unix EOL

I noticed that sieve stores the script with DOS EOLs. Given that most mail servers are Unix derivatives, I think Unix EOLs were more appropriate, although DOS EOLs also work with e.g. dovecot.

Doesn't work with Thunderbird 24

Sieve 0.2.2 doesn't work with Mozilla Thunderbird 24. Before this version, it was working well. This version probably introduces some incompatibilities which cause this problem.

Steps to reproduce:

  1. Select "Sieve Message Filters..." from the menu.
  2. Wait a few seconds.

Expected behavior:
A new tab opens and shows filters for the current account. The "Filters for:" combo box contains mail accounts.

Current behavior:
A new tab opens and shows an "in progress" animation. That's all. The combo box meant above is empty.

Dialog text does not show with dark background theme

My TB uses a dark background with white text so that when the Test/ManulConfig dialog pops up I cannot read the text because the dialog background is hardwired to white, so my default white text is unreadable. The dialog background color needs to respect the default color scheme provided by the OS.

snapshot11

Connection occuring but then nothing.

Hi,

I have Thunderbird 23 (beta) and your sieve add-on (0.2.2).

I have a Dovecot 2.2.4 server with PigeonHole ManageSieve setup. The sieve add-on connects -- well it appears to -- but nothing ever appears except a spinning circle.

I have confirmed that manually uploaded sieve scripts (using the command line program sieve-connect) work.

What is the best way to go about debugging this?

Thanks,
Anand

STARTTLS seems to be required; it should be optional

I have a new managesieve server implementation that I am testing with this plugin. It seems that when I don't offer STARTTLS I am informed that my server doesn't implement managesieve. This is true even if "secure connection" is false. And TLS is definintely being negotiated.

FWIW, my logs indicate the client simply disconnects once it gets the banner without STARTTLS back.

Sieve fileinto extension does not support :create flag

The Graphical Build window produces a dialog error when "fileinto" is used with ":create". The Source window allows ":create" and the sieve backend allows :create .

The following dialog is shown when ":create" is used:
screenshot from 2014-03-24 19 08 02

Here is the source:

#
#2014-3-20
#
require "fileinto";
require "mailbox";
require "imap4flags";

if allof(
anyof(
    address :localpart "From" "<omitted>" 
    , address :localpart "From" "<omitted>" 
  )
, header :contains "Subject" "Fresh Coffee"
    ) {

    fileinto :create "Trash";
}

Workaround

Use the Source window to save the script.

Parse X-Sieve headers

Some servers dump errors during script execution into a X-header. They should be parsed and displayed to the user.

E.g.:
X-Nemesis-Sieve: missing mailbox "\blubb"

Sieve plugin no longer works in TB36 on Ubuntu

On Ubuntu 14.04 and 15.04, using TB36, the sieve Manager Filters page always just sits there with a spinning wheel and never displays anything.

Turning on all debug flags, the error console shows:

Timestamp: 2015-04-25 03:13:13 PM
Warning: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Source File: chrome://sieve/content/modules/sieve/SieveAccounts.js
Line: 448
Timestamp: 2015-04-25 03:13:13 PM
Warning: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Source File: chrome://sieve/content/modules/sieve/SieveResponseCodes.js
Line: 54
Timestamp: 2015-04-25 03:13:13 PM
Warning: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Source File: chrome://sieve/content/modules/sieve/SieveResponse.js
Line: 297
Timestamp: 2015-04-25 03:13:13 PM
Warning: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Source File: chrome://sieve/content/modules/sieve/SieveRequest.js
Line: 168
Timestamp: 2015-04-25 03:13:13 PM
Warning: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Source File: chrome://sieve/content/editor/SieveFilterExplorer.js
Line: 45
Timestamp: 2015-04-25 03:13:13 PM
Error: TypeError: accountManager.allServers.Count is not a function
Source File: chrome://sieve/content/modules/sieve/SieveAccounts.js
Line: 1222
Timestamp: 2015-04-25 03:13:20 PM
Error: uncaught exception: 2147746065

...and then it just sits there forever. Tested against dovecot-2.2.10p3 & dovecot-pigeonhole-0.4.2p2v0 on OpenBSD. This used to work, as recently as ~4 months ago.

sieve-Addon cannot connect to sieve server after TB update to version 38

worked quite before the update.

Tested on two different PCs on Windows 7, with two different mailservers running courier imap. Debug console shows the following errors:

Zeitstempel: 20.07.2015 20:25:13
Warnung: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
Quelldatei: chrome://sieve/content/modules/sieve/SieveAccounts.js
Zeile: 427

(This error repeats in several scripts)

Zeitstempel: 20.07.2015 20:25:13
Fehler: uncaught exception: 2147500033

Zeitstempel: 20.07.2015 20:25:13
Fehler: NS_ERROR_NOT_IMPLEMENTED: Method not implemented'Method not implemented' when calling method: [nsIProtocolHandler::newChannel]
Quelldatei: chrome://sieve/content/modules/sieve/Sieve.js
Zeile: 411

Deal with removing of EnumerateForwards/Backwards from nsISupportsArray

The interfaces of nsISupportsArray changed and was partly dropped.

This causes errors like:

Timestamp: 16.12.2012 13:42:47
Error: TypeError: accountManager.allServers.Count is not a function
Source File: chrome://sieve/content/modules/sieve/SieveAccounts.js
Line: 1222

All in all the Account Manager's interface changed. There is now a length property instead of a Count() method.

// Old syntax 
MailServices.accounts.accounts.Count()

// New syntax
MailServices.accounts.accounts.length

Support :regex match type

I imported an existing working sieve script which includes:

if address :regex :comparator "i;ascii-casemap" ["to", "cc"] "j(i|la).*@mydomain.com"
{
fileinto "INBOX";
stop;
}

The server is happy with it and does the right thing, but de-selecting the "Source" button in the Sieve extension results in a popup box with:

Error while parsing script.
 [ expected but found:
:regex :comparator "i;ascii-casemap" ["to", "cc"] ...

Does the sieve extension not support :regex at all? Can it be persuaded to do so? I have several other regex rules, this is only one example.

'Method not implemented' when calling method: [nsIProtocolHandler::newChannel]

Hello,

I'm using Earlbird (38.0a2) and decided to try the extension as it's a bit tedious to ssh into my mailserver every time I want to change my filters.

Stable version doesn't even seem to load completely. Nightly (0.2.3e) is a bit better. At least it has a functional UI. Though, it can not fetch filter from the server. Spinner keeps spinning and nothing happens.

In the error console I see the following error message:

Error: NS_ERROR_NOT_IMPLEMENTED: Method not implemented'Method not implemented' when calling method: [nsIProtocolHandler::newChannel]
Source File: chrome://sieve/content/modules/sieve/Sieve.js
Line: 411

Server: Dovecot 2.2.13,

SSL warning is shown but not the certificat or the problem

After adding a new server to the plugin it shows in my case an SSL warning.
Sadly the plugin does not provide information on that page what the problem is or let the user see the cert to figure out whats going on. In my case a look into the debug log reveals that the problem is that the cert is self signed.

As SSL errors should be taken seriosly the user should not need to open debug log to find the problem.

sieve stopped working entirely

I'm not sure when it happened since I don't have to use it often, but I went to add a new filter today and sieve doesn't do anything. The tab opens, and I get a spinner in the middle like it is trying to connect, but it isn't. Both netstat and wireshark show no attempt to connect to the server, and the spinner never times out or anything. Nothing is printed in the error log, even with all of the debug settings checked. I'm using thunderbird 24.1.1 and sieve 0.2.2, and tried removing and reinstalling the plugin already.

Not connecting to managesieve

I cannot connect to my Dovecot managesieve. It worked before, I upgraded my Dovecot from 1.x to 2.0 but after upgrade it worked. Then I fix other things in Dovecot and it stopped working.

I don't believe the problem is in Dovecot. On the server I ran "tcpdump port 4190" to catch connecting from Thunderbird but it never happens now. On desktop where is Thunderdbird is run I tried "telnet mailserver 4190" and it happily connects, reflecting it in tcpdump. So for some reason Thunderdbird Sieve extension don't event try to connect.

When I try "Auto Select Port" button in config dialog, immediately "Selecting Port failed..." is shown and tcpdump hasn't detected network activity. IMAP server is correctly entered.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.