Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Can't discard spam messages on arrival using Sieve filters

Scheduled Pinned Locked Moved Support
sieve
25 Posts 5 Posters 1.3k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    replied to robi on last edited by
    #14

    @robi hmm, the filter is already “delete all incoming messages” though 🤔

    --
    Dustin Dauncey
    www.d19.ca

    robiR 1 Reply Last reply
    0
  • robiR Offline
    robiR Offline
    robi
    replied to d19dotca on last edited by
    #15

    @d19dotca yes, but on "special" folders like inbox and spam which could be hardcoded elsewhere.

    delete-me for sure isn't one of those.

    Life of sky tech

    d19dotcaD 1 Reply Last reply
    0
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    replied to robi on last edited by
    #16

    @robi oh okay, so you’re saying to make a rule that tells all incoming mail to go to a particular new folder then run the other sieve filters on that new folder? I can try later I guess, I’m doubtful that’ll work because that’s kind of the issue… whatever exists that makes spam go to the Spam folder is overwriting everything else, basically completely bypassing Sieve filters. I’ll try when I can though (likely next week, I’m going to be away for the next few days after tomorrow).

    --
    Dustin Dauncey
    www.d19.ca

    robiR 1 Reply Last reply
    0
  • robiR Offline
    robiR Offline
    robi
    replied to d19dotca on last edited by
    #17

    @d19dotca right..

    otherwise it might be time to look through the mail container

    Life of sky tech

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to d19dotca on last edited by
    #18

    @d19dotca Just got around to looking into this. This doesn't work because the mail server processes spam messages using dovecot's sieve_before flag - https://doc.dovecot.org/settings/pigeonhole/#plugin-sieve-setting-sieve-before . You can check the /app/dovecot-config/sieve_before/spam-move.sieve script in the mail container which is moving X-Spam-Flag into the Spam folder. Because the filter below is run before user messages, your filters don't work. This also makes it easy for the end user to not worry about processing spam messages when writing filters, so I think the default behavior is good.

    require ["fileinto","mailbox"];
    
    if header :contains "X-Spam-Flag" "YES" {
        fileinto "Spam";
        stop;
    }
    

    For the original use case of discarding all spam for forwarding mailboxes, this is the default behavior in next release.

    C d19dotcaD 2 Replies Last reply
    3
  • C Online
    C Online
    ccfu
    replied to girish on last edited by ccfu
    #19

    @girish said in Can't discard spam messages on arrival using Sieve filters:

    so I think the default behavior is good.

    As a default I think so too, but whilst the spam protection in Cloudron is reliable, sometimes the end user wants / needs to be able to filter spam messages directly 😉 It would therefore be good to have a simple way of filtering mails to discard spam selectively rather than just having all SPAM go to the SPAM folder. Mails with a SPAMASSASSIN score of over 20, for example, do not need to be saved anywhere, but those with a score of 7 or 8 could in theory be false positives so would warrant 'quarantining' rather than discarding altogether. The same applies to certain sender addresses and subjects.

    This does not need to be something defined in webmail clients per domain, but could be a server-wide setting similar to the custom spamassassin rules.

    girishG 1 Reply Last reply
    2
  • girishG Offline
    girishG Offline
    girish Staff
    replied to ccfu on last edited by
    #20

    @ccfu yes, I can look into adding customization for spam handling in the coming releases. I have also wanted a user editable whitelist/blacklist for spam (instead of having to rely on admin).

    C ? 2 Replies Last reply
    5
  • C Online
    C Online
    ccfu
    replied to girish on last edited by
    #21

    @girish

    Sounds good 🙂

    1 Reply Last reply
    1
  • ? Offline
    ? Offline
    A Former User
    replied to girish on last edited by
    #22

    @girish would it be per-user or per-inbox? I ask since we can have groups using a specific email.

    girishG 1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to A Former User on last edited by
    #23

    @atrilahiji I guess it will have to be per-inbox.

    1 Reply Last reply
    1
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    replied to girish on last edited by
    #24

    @girish said in Can't discard spam messages on arrival using Sieve filters:

    For the original use case of discarding all spam for forwarding mailboxes, this is the default behavior in next release.

    Do you mind just expanding on this a bit more? What is a "forwarding mailbox" in your terms? Are you referring to the other feature request I had about mailing lists having an option to not forward messages identified as spam? If so, that's great! But now I will have to go back to the mailing list functionality I had moved away from a couple weeks ago, haha, but that's all good. If I've misunderstood what you mean by "forwarding mailbox" though, please clarify.

    --
    Dustin Dauncey
    www.d19.ca

    girishG 1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to d19dotca on last edited by
    #25

    @d19dotca sorry, i meant mailing list and not forwarding mailbox!

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks