stalwartlabs / sieve

Sieve filter interpreter for Rust
https://docs.rs/sieve-rs/
GNU Affero General Public License v3.0
21 stars 5 forks source link

Case sensitivity of envelope test #6

Closed rad4day closed 2 months ago

rad4day commented 9 months ago

According to RFC 5227 Section 5.4, the envelope test is case-insensitive in the envelope-part strings.

During testing with stalwart-mail, I encountered that

  envelope :contains "to" "test@example.com"

is a valid test string while

  envelope :contains "To" "test@example.com"

is rejected with

CHECKSCRIPT failed: NO "Invalid envelope \"To\" at line 14, column 19."

Relevant code around src/compiler/lexer/string.rsL326