Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnappyMail's Sieve editor does not support "index" extension, error "this.index is undefined" #1709

Closed
lje opened this issue Aug 14, 2024 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@lje
Copy link

lje commented Aug 14, 2024

Describe the bug
SnappyMail's Sieve editor cannot handle an :index directive in rules.

To Reproduce
I've created the following valid Sieve script as example:

require ["index", "regex"];
if header :index 3 :regex "Received" "envelope-from <([^>]+)>" { keep; }

When trying to edit this script in SnappyMail, I get an "this.index is undefined" message

Screenshots
SnappySieve

Please complete the following information:

  • Browser: Firefox 129.0.1
  • IMAP daemon: dovecot
  • PHP version: 8.1
  • SnappyMail Version: v2.37.1
  • Mode: standalone
@the-djmaze the-djmaze added bug Something isn't working enhancement New feature or request labels Aug 14, 2024
@the-djmaze
Copy link
Owner

the-djmaze commented Aug 14, 2024

it seems a part of RFC 5260 isn't implemented yet.
https://www.rfc-editor.org/rfc/rfc5260.html#section-6

@lje
Copy link
Author

lje commented Aug 15, 2024

The server in quesion does support the "index" extension. The script above was not freshly created in SnappyMail but fetched from the server. I created it before using Sieve Editor and stored in to the server using the ManageSieve protocol.

Does the editor used in SnappyMail perform some kind of client side checking? All checking should be done by the server using the CHECKSCRIPT command of ManageSieve. I assume this is some kind of bug in the editor.

Extension support of the server in question:
Screenshot 2024-08-15 084848

@the-djmaze
Copy link
Owner

Keep in mind that index is a shot in the dark.
You must be 100% certain that every email you receive has the required header on the exact index.

@lje
Copy link
Author

lje commented Aug 17, 2024

Thanks, I'm aware of that. The header in question is a "Received" generated by my own email provider for every incoming mail I want to catch with that filter. The :index makes sure, I don't accidentially catch a "Received" header of any previous mail server along the chain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants