Announcement

Collapse
No announcement yet.

Deluged by spam

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by Feathers McGraw View Post
    If possible, I'd like to have it delivered to the right folder (spam or inbox) based on its header before I see it. Any ideas? I've done some searching and it seems that Spamassassin will only mark the emails in a certain way, it leaves actually delivering that email to other programs (currently sendmail).
    Postfix calling Sendmail? That's clunky. Maildrop or Procmail are probably better for this, but they are royal PITAs to set up. I would recommend simply creating a Sieve rule in your mail client to do this. That way, Dovecot remains in charge of delivery, and the Sieve rule, which actually runs on the server, moves the mail for you.

    Comment


      #47
      Ah... I think I may have misunderstood, it seems it's just calling a compatibility interface, rather than sendmail. Makes sense, since I haven't actually installed sendmail!

      http://www.postfix.org/sendmail.1.html
      samhobbs.co.uk

      Comment


        #48
        Huh, I didn't know about that. Interesting.

        Comment


          #49
          Originally posted by SteveRiley View Post
          I would recommend simply creating a Sieve rule in your mail client to do this. That way, Dovecot remains in charge of delivery, and the Sieve rule, which actually runs on the server, moves the mail for you.
          I'm confused, if the sieve rule is set up in K9/Thunderbird, then how does it run on the server?
          samhobbs.co.uk

          Comment


            #50
            Sieve rules (a script, actually) are not the same as client rules. While it's true that you typically use your mail client to construct your Sieve script, the script actually lives within your account on the Dovecot server. When Dovecot receives mail from Postfix, it passes each message through your Sieve script. Sieve provides a way to perform server-side message filtering. This is better than client-side filtering because it eliminates the need to repeat rules on each client (think: desktop, laptop, tablet, phone) and ensures that all your various clients have a consistent view of your mailbox.

            KMail has supported the creation of Sieve scripts for quite some time. Recent versions have added a visual editor, a welcome enhancement. Roundcube also has a visual Sieve script creator.

            Here's a sample of what's in mine:
            Code:
            require ["fileinto","body"];
            # rule:[spam]
            if anyof (header :contains "Subject" "*SPAM*", header :contains "Subject" "**SPAM**", header :contains "Subject" "***SPAM***")
            {
            	fileinto "Junk";
            	stop;
            }
            # rule:[Kubuntu Forums]
            if header :contains "From" "support@kubuntuforums.net"
            {
            	fileinto "Lists/Kubuntu Forum";
            	stop;
            }
            # rule:[Kubuntu-users]
            if anyof (header :contains "To" "kubuntu-users@lists.ubuntu.com", header :contains "Cc" "kubuntu-users@lists.ubuntu.com")
            {
            	fileinto "Lists/Kubuntu-users";
            	stop;
            }
            # rule:[Kubuntu-devel]
            if anyof (header :contains "To" "kubuntu-devel@lists.ubuntu.com", header :contains "Cc" "kubuntu-devel@lists.ubuntu.com")
            {
            	fileinto "Lists/Kubuntu-devel";
            	stop;
            }
            # rule:[Subscriptions]
            if anyof (header :contains "To" "chd@lists.quackwatch.org", header :contains "To" "newsoftheweird@googlegroups.com", header :contains "To" "bobparks-whatsnew@listserv.umd.edu")
            {
            	fileinto "Lists/Subscriptions";
            	stop;
            }
            # rule:[KDE-announce]
            if anyof (header :contains "To" "kde-announce@kde.org", header :contains "To" "kde-announce-apps@kde.org", header :contains "Cc" "kde-announce@kde.org", header :contains "Cc" "kde-announce-apps@kde.org")
            {
            	fileinto "Lists/KDE-announce";
            	stop;
            }
            # rule:[Horn List]
            if anyof (header :contains "To" "horn@yahoogroups.com", header :contains "Cc" "horn@yahoogroups.com", header :contains "To" "horn@nbbc.us", header :contains "Cc" "horn@nbbc.us", header :contains "To" "horn@bogusville.us", header :contains "Cc" "horn@bogusville.us")
            {
            	fileinto "Lists/Horn List";
            	stop;
            }
            Postfix accepts inbound mail, then Dovecot receives it from Postfix and sorts it into folders according to the rules in my Sieve script. Whenever I open any mail client, messages are already sorted appropriately. Sieve is very cool.

            Comment


              #51
              Very well explained, thanks! That's very cool, I'll have to have a crack at that myself.

              It took me a while to realise the "horn" stuff is probably something innocent - of the French Horn variety? - and not any of the things that flashed through my mind initially!
              samhobbs.co.uk

              Comment


                #52
                No, your first intuition was correct

                You're probably going to make Simon blush again.

                Comment


                  #53
                  Pahaha
                  samhobbs.co.uk

                  Comment


                    #54
                    Just wanted to say, I have just got Spamassassin and Dovecot LMTP* with Sieve working on my mail server.

                    Sieve is really cool! I'm so glad you mentioned it or I would never have known about it.

                    Still to do: set up managesieve. Not because I really need it but because it sounds cool!

                    Thanks

                    Edit: LMTP not LDAP!!
                    Last edited by Feathers McGraw; Mar 08, 2014, 06:06 AM.
                    samhobbs.co.uk

                    Comment


                      #55
                      mmm... have you noticed that Steve hasn't been since Feb 27th
                      Must be at a presentation or working hard on something? (Rearranging this forum?)
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #56
                        Yeah I thought that was strange too, I actually emailed him a couple of days ago... all is well, he's just busy working/travelling etc
                        samhobbs.co.uk

                        Comment


                          #57
                          Originally posted by Feathers McGraw View Post
                          Sieve is really cool! I'm so glad you mentioned it or I would never have known about it.
                          There is much to like about modern email systems. Learning to run a complete email server of your own is probably one of the most educational endeavors a person can undertake.

                          Originally posted by Feathers McGraw View Post
                          Still to do: set up managesieve. Not because I really need it but because it sounds cool!
                          You need it if you want to manage your Sieve scripts using KMail's built-in script editor. Managesieve is a standard protocol for remotely editing scripts; see RFC 5804.

                          Originally posted by GreyGeek View Post
                          mmm... have you noticed that Steve hasn't been since Feb 27th
                          Must be at a presentation or working hard on something? (Rearranging this forum?)
                          March is ball-bustingly busy month for me; always has been. I'm either speaking, or planning to speak, or traveling for customer meetings, or getting ready for HONK!TX. Check out our promo pix:

                          Comment


                            #58
                            Welcome back!
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #59
                              I finally got around to adding Managesieve. I really like Kmail's implementation
                              samhobbs.co.uk

                              Comment


                                #60
                                Yeah, the graphical editor is quite nice. That's a relatively recent addition; previously, you had to type your sieve scripts manually. I would instead use Roundcube's editor. No need to do that now, of course.

                                Comment

                                Working...
                                X