|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
15 Apr 2020, 06:22 PM | #31 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
Code:
### 0. Whitelist test if address :matches "from" "name@domain.tld" { deleteheader "X-Spam-Known-Sender"; addheader "X-Spam-Known-Sender" "yes from sieve Whitelist"; if header :matches "X-Spam-Known-Sender" "*" { addheader "Debug" "X-Spam-Known-Sender=${1}"; } else { addheader "Debug" "Huh?"; } stop; } Code:
Debug: X-Spam-Known-Sender=no X-Spam-Known-Sender: yes from sieve Whitelist Bizarre. |
|
15 Apr 2020, 06:58 PM | #32 | |||
Essential Contributor
Join Date: May 2018
Posts: 477
|
Quote:
Quote:
Update: I looked at the deleteheader/addheader documentation in RFC5293. section 7 (Interaction with Other Sieve Extensions). The following paragraph looks pertinent to this problem (bold emphasis mine). Quote:
Last edited by xyzzy : 15 Apr 2020 at 07:40 PM. |
|||
15 Apr 2020, 07:33 PM | #33 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
|
15 Apr 2020, 07:45 PM | #34 |
Essential Contributor
Join Date: May 2018
Posts: 477
|
Heh, you should see how long some of my posts get in those tickets. It wouldn't be so bad if they didn't make the text portion so narrow. I hate that ticket software. It's not really amiable to posting sieve problems. Leading blanks are removed when you try to show indented code. Asterisks are deleted (so trying to show header :matches "X-Spam-Known-Sender" "*" will remove the *.
By the way I added a small update to my last post. |
15 Apr 2020, 09:28 PM | #35 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
I really only looked at the documentation for the editheader extension. |
|
15 Apr 2020, 11:01 PM | #36 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
|
15 Apr 2020, 11:03 PM | #37 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Ricardo from support has got back to me to say they are now looking into it...
|
16 Apr 2020, 03:14 AM | #38 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
OK, Ricardo from support recognises the problem.
It used to work but got broken when a bug in a different part of sieve was fixed. They hope to have it fixed pretty soon, but cannot promise a date. |
16 Apr 2020, 03:34 AM | #39 |
Essential Contributor
Join Date: May 2018
Posts: 477
|
That sounds like the same reply he sent to me this morning. But he closed my ticket. So I reopened it with a my reply suggesting they should make this a "highe(er)" priority and not close the ticket until it actually is fixed.
|
16 Apr 2020, 04:05 AM | #40 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
He closed my ticked this morning gas well. I re-opened it asking that it stay open until fixed. He wrote back that that’s not how the ticketing system works - it’s closed because it is now on their task list.
|
16 Apr 2020, 04:26 AM | #41 | |
Essential Contributor
Join Date: May 2018
Posts: 477
|
One thing I forgot to mention about all this when changing X-Spam-Known-Sender to "yes" since it had nothing to do with the bug. That is, if you're a purist you might want to add in-addressbook as well to that header. Why? Because at the point in the script where it checks calendar preferences (section 6 - Sieve generated for calendar preferences) it tests "in-addressbook". I guess that's because the original X-Spam-Known-Sender could say "no" but it will always have "in-addressbook" for a known contact.
So below is my chunk of code I've been using for setting X-Spam-Known-Sender and making sure in-addressbook is also set: Code:
if header :matches "X-Spam-Known-Sender" "no*" { # fix up X-Spam-Known-Sender so FM-generated code deleteheader "X-Spam-Known-Sender"; # that checks X-Spam-Known-Sender thinks it is known if header :contains "X-Spam-Known-Sender" "in-addressbook" { # set yes & add in-addressbook if missing addheader "X-Spam-Known-Sender" "yes!${1}"; # make this stand out a little (!) if it's displayed } else { # also add in-addressbook if not already present addheader "X-Spam-Known-Sender" "yes!${1}; in-addressbook!"; # make it stand out a little too (!) } } ---- Update Just got the reply from Ricardo mentioning the same thing about closing tickets. He also said the following: Quote:
Last edited by xyzzy : 16 Apr 2020 at 05:10 AM. |
|
16 Apr 2020, 08:40 AM | #42 |
Essential Contributor
Join Date: Jan 2017
Posts: 278
|
If you set Protection level to custom and uncheck the move and discard boxes you can put your own spam handling code in the block below. This is more flexible than trying to work around the generated code.
For example I've always preferred using a second spam folder for high scoring spam rather than having a discard level. |
16 Apr 2020, 01:09 PM | #43 | |
Essential Contributor
Join Date: May 2018
Posts: 477
|
Quote:
By the way I do have spam protection set to custom (with move and add score set). To each his own I guess. I have no problems with doing what I am doing (well other than FM causing previously fixed bugs to reappear). --- A little off topic but a heads up about that "block below", i.e., before "old" rules sieve section 4 (Sieve generated for forwarding rules). If you are doing that using the "old" rules mode you cannot switch to "new" rules mode because that block needs to be empty to do the switch. So you have to delete it, switch to "new" and then manually add it back in. It's funny they don't like stuff in that block to allow the switch. It's in the same position with either rules mode. The only one they should be complaining about is the block before "old" rules section section 6 (Sieve generated for calendar preferences). That block no longer exists in the "new" rules sieve code. Oh well. It's not worth a ticket since I assume the "old" rules sieve code will eventually be replaced with the "new" rules sieve code. What happens your code in that block then I do not know. Last edited by xyzzy : 16 Apr 2020 at 01:16 PM. |
|
16 Apr 2020, 03:32 PM | #44 | |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
Quote:
Right now, I'm happy to use the generated code (providing they fix the bug). All I am trying to do right now is create a whitelist without the addresses being in my contacts. This is for addresses that I don't send to and so do not want to see as an option when composing eg: mailing lists and "do-not-reply" addresses etc. |
|
16 Apr 2020, 03:33 PM | #45 |
Cornerstone of the Community
Join Date: Jan 2003
Location: Oxfordshire, UK
Posts: 603
|
|