add more specific sieve-rules for Junk

Discussion in 'Feature Requests' started by bax, Apr 4, 2014.

  1. bax

    bax Member

    Hi!

    I have a suggestion for a maybe more intuitive rule for treating spam:

    Code:
    require ["fileinto", "imap4flags", "regex", "date", "relational", "vacation"];
    
    <tmpl_if name="move_junk" op="==" value="y">
    # Move spam to spam folder
    if header :contains "X-Spam-Flag" "YES" {
      setflag "\\Seen";
      addflag "$junk";
      fileinto "Junk";
      # Stop here so that we do not reply on spams
      stop;
    }
    </tmpl_if>
    Maybe it has to be extended for all email clients but I have the feeling that this is closer to what many people would expect Junk to be treated like (mark as read and label as "Junk" for the IMAP-client).
     
  2. bax

    bax Member

  3. bax

    bax Member

    actualized to better reflect what Apple Mail adds:

    Code:
    <tmpl_if name="move_junk" op="==" value="y">
    # Move spam to spam folder
    if header :contains "X-Spam-Flag" "YES" {
      setflag "\\Seen";
      addflag "$Junk";
      addflag "Junk";
      addflag "JunkRecorded";
      fileinto "Junk";
      # Stop here so that we do not reply on spams
      stop;
    }
    </tmpl_if>
     
    Last edited: Apr 22, 2014

Share This Page