|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
9 Oct 2019, 07:54 PM | #1 |
Essential Contributor
Join Date: Dec 2017
Location: Scotland
Posts: 484
|
Does FM's 'How to use Sieve' page have an error on it?
I was reading through: https://www.fastmail.com/help/techni...tml?u=cd9841d4
I think one part is wrong, namely the text about using ":count" in the "Comparators" section. They say: Here's some sample code: address :count "lt" :comparator "i;ascii-numeric" ["to", "cc"] "5". This tests if the total number of To and CC fields is less than 5 (Note that this tests the fields in the message, not the addresses in those fields. Indeed, this test will always be true if the message is RFC 2822 compliant).I think they've got this the wrong way round. Their sample address :count .../does/ count the number of addresses contained in the email's TO and CC headers... I think they should have put header :count ... The reference to RFC-compliance is because the RFC says that an email should only ever have at most one TO header and at most one CC header, so the count of the number of those headers should always be 0, 1 or 2, ie always less than 5. Amazingly FM even include an 'always be true' link to the appropriate part of the RFC5231 description of ":count" where there's an example that (to my mind) directly contradicts their own advice. The example in the RFC says: The test: I'll raise this with FM... unless someone here says I have misunderstood. |
9 Oct 2019, 10:02 PM | #2 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
Preferably, a code example shouldn't be an example of a pointless use, so it wouldn't be sensible to change the example to fit the text.
The author seems a bit confused about the word "field". :count is counting the number of fields, not the number of items within a field. |
14 Oct 2019, 07:16 PM | #3 |
Essential Contributor
Join Date: Dec 2017
Location: Scotland
Posts: 484
|
Ticket raised.
|