Gnus development mailing list
 help / color / mirror / Atom feed
* spam filtering setup
@ 2007-09-09  9:31 Cezar
  2007-09-12 19:43 ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Cezar @ 2007-09-09  9:31 UTC (permalink / raw)
  To: ding


Hello,

  I have read the manual a few times by now but I still can't make my
gnus filter spam and I don't know what am I doing wrong.

  The problem is I still get a lot of spam and think filtering doesn't
actually happen.

  I am using emacs from cvs and gnus 5.11.

  Here is my .gnus.el :

(require 'bbdb)
(bbdb-initialize 'gnus 'message)
(add-hook 'message-setup-hook 'bbdb-define-all-aliases)
(setq gnus-select-method '(nntp "news.gmane.org"))
(add-to-list 'gnus-secondary-select-methods '(nntp "news.readfreenews.net"))
(add-to-list 'gnus-secondary-select-methods '(nnml "private"))

(setq mail-sources
      '((file :path "/var/mail/cezar")
        (maildir :path "/home/cezar/.maildir")))

(require 'spam)
(spam-initialize)
(setq spam-use-bogofilter t)
(setq gnus-install-group-spam-parameters nil)
(setq gnus-spam-process-newsgroups
      '(("nnml:.*" (gnus-group-spam-exit-processor-bogofilter
                    gnus-group-ham-exit-processor-bogofilter)))
      gnus-spam-process-destinations '(("nnml:.*" "nnml:spambox"))
      gnus-ham-process-destinations '(("nnml:spambox" "nnml:reclassify"))
      spam-junk-mailgroups '("nnml:spambox")
      spam-split-group "nnml:spambox")

(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
  '(|
    ("subject" ".*SECURITY" "WebSecurity")
    ("subject" ".*Webappsec" "WebSecurity")
    ("subject" ".*WSG" "WebStandards")
    (: spam-split)
    (to "me@mydomain.com" "Personal")
    (from ".*@mydomain.com" "Personal")  ;; from work
    "mail.other"))

(setq gnus-visible-headers
      '("^From" "^Subject" "^Date" "^Newsgroups" "^Followup-To"
        "^User-Agent" "^X-Newsreader" "^X-Mailer"))

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "mixandgo.ro"
      smtpmail-auth-credentials
      '(("mixandgo.ro" 25 "cezar@mixandgo.ro" "askjdh983JK")))

(setq smtpmail-debug-info t smtpmail-debug-verb t)

(add-hook 'message-mode-hook
          (function (lambda()
                      (local-set-key (kbd "<tab>") 'bbdb-complete-name)
                      )))

(setq gnus-message-archive-group
      '((if (message-news-p)
            "sent.news"
          "sent.mail")))

(defun signature-to-end-of-forwarded-message ()
  (save-excursion
    (goto-char (point-min))
    (re-search-forward
     (concat "^" (regexp-quote mail-header-separator) "$") nil t)
    (forward-line 1)
    (let* ((start (point))
           (end (progn
                  (save-excursion
                    (re-search-forward "^------- Start of forwarded message -" nil t)
                    (beginning-of-line)
                    (point)))))
      (goto-char (point-max))
      (insert-buffer-substring (current-buffer) start end)
      (delete-region start end))))

(add-hook 'gnus-mail-forward-hook 'signature-to-end-of-forwarded-message)

(defun my-gnus-summary-view-html-alternative-in-mozilla ()
      "Display the HTML part of the current multipart/alternative MIME message
    in mozilla."
      (interactive)
      (save-current-buffer
        (gnus-summary-show-article)
        (set-buffer gnus-article-buffer)
        (let ((file (make-temp-file "html-message-" nil ".html"))
              (handle (nth 3 (assq 1 gnus-article-mime-handle-alist))))
          (mm-save-part-to-file handle file)
          (browse-url-firefox (concat "file://" file)))))

(define-key gnus-summary-mode-map [?K ?M]
  'my-gnus-summary-view-html-alternative-in-mozilla)

;; Rs Gnus Summary
(require 'rs-gnus-summary)
(rs-gnus-summary-line-initialize)
;; Alias for the content-type function:
(defalias 'gnus-user-format-function-ct 'rs-gnus-summary-line-content-type)
;; Alias for the size function:
(defalias 'gnus-user-format-function-size 'rs-gnus-summary-line-message-size)
(setq gnus-balloon-face-0 'rs-gnus-balloon-0)
(setq gnus-balloon-face-1 'rs-gnus-balloon-1)
(rs-gnus-summary-tree-arrows-ascii)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: spam filtering setup
  2007-09-09  9:31 spam filtering setup Cezar
@ 2007-09-12 19:43 ` Ted Zlatanov
       [not found]   ` <87tzpw7wz0.fsf@myhost.localdomain>
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2007-09-12 19:43 UTC (permalink / raw)
  To: Cezar; +Cc: ding

On Sun, 09 Sep 2007 12:31:45 +0300 Cezar <cezar@mixandgo.ro> wrote: 

C>   I have read the manual a few times by now but I still can't make my
C> gnus filter spam and I don't know what am I doing wrong.

C>   The problem is I still get a lot of spam and think filtering doesn't
C> actually happen.

Your setup looks OK, but I would use the latest Gnus from CVS, it's
quite stable and has many improvements.

Make sure your bogofilter database is working.  Filter a few spam
messages through it to see what it thinks.  If it is passing spam
through, there's not much spam.el will do about it.  Gnus will just rely
on bogofilter (when spam-use-bogofilter is set) to decide what's spam
and what isn't.

Ted



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: spam filtering setup
       [not found]   ` <87tzpw7wz0.fsf@myhost.localdomain>
@ 2007-09-17 21:19     ` Ted Zlatanov
  2007-09-19 10:33       ` the (sorted) SPAM that CHANGED my LIFE jidanni
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2007-09-17 21:19 UTC (permalink / raw)
  To: Cezar; +Cc: Ding Mailing List

On Sat, 15 Sep 2007 18:46:27 +0300 Cezar <cezar@mixandgo.ro> wrote: 

C> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Sun, 09 Sep 2007 12:31:45 +0300 Cezar <cezar@mixandgo.ro> wrote: 
>> 
C> I have read the manual a few times by now but I still can't make my
C> gnus filter spam and I don't know what am I doing wrong.
>> 
C> The problem is I still get a lot of spam and think filtering doesn't
C> actually happen.
>> 
>> Your setup looks OK, but I would use the latest Gnus from CVS, it's
>> quite stable and has many improvements.
>> 
>> Make sure your bogofilter database is working.  Filter a few spam
>> messages through it to see what it thinks.  If it is passing spam
>> through, there's not much spam.el will do about it.  Gnus will just rely
>> on bogofilter (when spam-use-bogofilter is set) to decide what's spam
>> and what isn't.

C> How can I do that ? How can I test if bogofilter is doing it's job ?

Read the Bogofilter documentation.  Basically you have to take a message
and pipe it into Bogofilter.  From Gnus you can go to an article (AKA
message) and type 

M-: (spam-check-bogofilter)

and that should show you the article's score.  But I would check from
the command line first, so you're sure that if something unexpected
happens it's not because Bogofilter is misconfigured.

Note your reply went only to me.  It should go to the Gnus mailing list
so a) others can comment if I'm wrong, and b) it will be saved in the
mailing list archives.

Thanks
Ted



^ permalink raw reply	[flat|nested] 4+ messages in thread

* the (sorted) SPAM that CHANGED my LIFE
  2007-09-17 21:19     ` Ted Zlatanov
@ 2007-09-19 10:33       ` jidanni
  0 siblings, 0 replies; 4+ messages in thread
From: jidanni @ 2007-09-19 10:33 UTC (permalink / raw)
  To: users; +Cc: ding

Gentlemen, imaging reviewing your daily spambox as I do,

 . 1 070918|5.4|zzzz          :zzzzzzzzzzzzzzzz
 . 1 070919|5.4|Timmy Stzzzzrd:*  zzzzzzzzzzz(( :![zzz
 . 3 070919|12.8|Nizzle Schzzzi:Nicole Scherzzzz goes zzz-less
 .    1 070919|6.1|Nizzle Szzerzi:
 .    1 070919|13.2|Niczze Sczzzzi:
 .+1 070919|6.5|<jidanni@jidan:September
 . 1 070919|6.9|Marcie Correa :Experience zzzzzzzzzzzz like never before.
 . 1 070919|7.0|zzzzzzz       :zzzzzzzzzz 
 . 1 070919|7.4|Jerry Reid    :Welcome to the world of zzzz people!
 . 1 070918|7.6|info@zzzzzzc.c:zzzzz Forum for HR and zzzzzzzz Managers

That's right, in emacs' gnus, threaded and by X-Spam-Status, all
without downloading their despicable bodies over my phone line.

I feel now so in control, _a day without spam is a day without
sunshine_ (lack of spam indicates network failure... Condition Red.)

Read more about how I do it in my
http://jidanni.org/comp/spam/spamdealer.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-19 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-09  9:31 spam filtering setup Cezar
2007-09-12 19:43 ` Ted Zlatanov
     [not found]   ` <87tzpw7wz0.fsf@myhost.localdomain>
2007-09-17 21:19     ` Ted Zlatanov
2007-09-19 10:33       ` the (sorted) SPAM that CHANGED my LIFE jidanni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).