Custom Sieve Filter no SPAM mail move to Junk

Issue #696 resolved
David Andlinger created an issue

I have created a custom filter to move emails from a specific sender directly to a folder.

require ["fileinto"];
if address :is "from" "sender@domain.com"
{
      fileinto "Folder.Subfolder";
}

Since I added this filter, SPAM mails are no longer moved to the Junk Folder.

Comments (9)

  1. SB

    Does the sub folder already exist?

    Also may be worth testing if its case sensitive for the folder name too.

    --

    A slightly different example i found is pasted here:

    require "fileinto";
    if address "From" "someone@example.org"
    {
        fileinto "Someone";
    }
    

    and also

    require ["envelope", "fileinto", "mailbox"];
    if envelope "From" "someone@i-dont-like.com"
    {
        fileinto :create "Trash";
    }
    

  2. David Andlinger reporter

    Yes, the subfolder exists.

    The filter works. All e-mails from sender@domain.com will be moved to the folder "Folder.Subfolder". But as long as the filter is active, SPAM emails will not be moved to the Junk folder.

  3. SB

    Sorry I misunderstood your question.

    Please will you post your full filter, including the spam filtering?

  4. David Andlinger reporter

    This is my full filter.

    Will the default filters be overwritten when I add a custom filter?

  5. SB

    I think any time you make a change to custom filter it overwrites the default spam one. You should just be able to add it in to your custom one:

    if header :contains "subject" "SPAM"
    {
    fileinto "Junk";
    }

  6. David Andlinger reporter

    But this filter would mean that any email with the word "SPAM" in the subject would be moved to the junk folder.

    Shouldn't it be checked for SPAM headers in the email?

  7. SB

    There are 5 asterisks either side of the word spam but it has filtered them out.

    create a new mailbox and see the custom filter for the exact text

  8. Log in to comment