@cindex spam configuration examples
@cindex spam
-@subsubheading Ted's setup
+@subsubheading Ted \e$B$N@_Dj\e(B
From Ted Zlatanov <tzz@@lifelogs.com>.
@example
-;; for gnus-registry-split-fancy-with-parent and spam autodetection
-;; see gnus-registry.el for more information
+;; gnus-registry-split-fancy-with-parent \e$B$H\e(B spam \e$B$N<+F08!CN$N$?$a!#\e(B
+;; \e$B>\:Y$O\e(B gnus-registry.el \e$B$r;2>H!#\e(B
(gnus-registry-initialize)
(spam-initialize)
-;; I like control-S for marking spam
+;; \e$B;d$O\e(B spam \e$B0u$rIU$1$k$N$K\e(B control-S \e$B$r9%$`!#\e(B
(define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
(setq
- spam-log-to-registry t ;; for spam autodetection
+ spam-log-to-registry t ;; Spam \e$B$N<+F08!CN$N$?$a!#\e(B
spam-use-BBDB t
- spam-use-regex-headers t ; catch X-Spam-Flag (SpamAssassin)
- ;; all groups with "spam" in the name contain spam
+ spam-use-regex-headers t ;; X-Spam-Flag (SpamAssassin) \e$B$r$D$+$^$($k!#\e(B
+ ;; \e$BL>A0$K\e(B "spam" \e$B$r4^$`$9$Y$F$N%0%k!<%W$K$O\e(B spam \e$B5-;v$,$"$k!#\e(B
gnus-spam-newsgroup-contents '(("spam" gnus-group-spam-classification-spam))
- ;; see documentation for these
+ ;; \e$B$3$l$i$N\e(B docstring \e$B$r;2>H!#\e(B
spam-move-spam-nonspam-groups-only nil
spam-mark-only-unseen-as-spam t
spam-mark-ham-unread-before-move-from-spam-group t
nnimap-split-rule 'nnimap-split-fancy
- ;; understand what this does before you copy it to your own setup!
+ ;; \e$B$"$J$?$N@_Dj$KDI2C$9$kA0$K!"$3$l$,2?$r$9$k$+M}2r$;$h\e(B!
nnimap-split-fancy '(|
- ;; trace references to parents and put in their group
+ ;; References \e$B$r?F$^$GC)$C$F$=$l$i$N%0%k!<%W$rF~$l$k!#\e(B
(: gnus-registry-split-fancy-with-parent)
- ;; this will catch server-side SpamAssassin tags
+ ;; \e$B$3$l$O%5!<%P!<B&$N\e(B SpamAssassin \e$B%?%0$r$D$+$^$($k!#\e(B
(: spam-split 'spam-use-regex-headers)
(any "ding" "ding")
- ;; note that spam by default will go to "spam"
+ ;; Spam \e$B5-;v$O%G%#%U%)%k%H$G\e(B "spam" \e$B$K9T$/$3$H$KCm0U!#\e(B
(: spam-split)
+ ;; \e$B%G%#%U%)%k%H$N%a!<%k%\%C%/%9!#\e(B
;; default mailbox
"mail"))
-;; my parameters, set with `G p'
+;; `G p' \e$B$G@_Dj$7$?;d$N%Q%i%a!<%?!#\e(B
-;; all nnml groups, and all nnimap groups except
-;; "nnimap+mail.lifelogs.com:train" and
-;; "nnimap+mail.lifelogs.com:spam": any spam goes to nnimap training,
-;; because it must have been detected manually
+;; \e$B$9$Y$F$N\e(B nnml \e$B%0%k!<%W$H!"\e(B"nnimap+mail.lifelogs.com:train"
+;; \e$B$H\e(B "nnimap+mail.lifelogs.com:spam" \e$B$r=|$$$?$9$Y$F$N\e(B nnimap
+;; \e$B%0%k!<%W$G$O!"$I$N\e(B spam \e$B$b\e(B nnimap \e$B%H%l!<%K%s%0$K9T$/!#\e(B
+;; \e$B$=$l$O<jF0$G8!CN$7$J$1$l$P$J$i$J$$$+$i!#\e(B
((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
-;; all NNTP groups
-;; autodetect spam with the blacklist and ham with the BBDB
+;; \e$B$9$Y$F$N\e(B NNTP \e$B%0%k!<%W!#\e(B
+;; Spam \e$B$r\e(B blacklist \e$B$G!"\e(Bham \e$B$r\e(B BBDB \e$B$G<+F08!CN!#\e(B
((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
-;; send all spam to the training group
+;; \e$B$9$Y$F$N\e(B spam \e$B$r%H%l!<%K%s%0%0%k!<%W$KAw$k!#\e(B
(spam-process-destination . "nnimap+mail.lifelogs.com:train"))
-;; only some NNTP groups, where I want to autodetect spam
+;; \e$B;d$,\e(B spam \e$B$r<+F08!CN$5$;$?$$!"$$$/$D$+$N\e(B NNTP \e$B%0%k!<%W!#\e(B
((spam-autodetect . t))
-;; my nnimap "nnimap+mail.lifelogs.com:spam" group
+;; \e$B;d$N\e(B nnimap "nnimap+mail.lifelogs.com:spam" \e$B%0%k!<%W!#\e(B
-;; this is a spam group
+;; \e$B$3$l$O\e(B spam \e$B%0%k!<%W!#\e(B
((spam-contents gnus-group-spam-classification-spam)
- ;; any spam (which happens when I enter for all unseen messages,
- ;; because of the gnus-spam-newsgroup-contents setting above), goes to
- ;; "nnimap+mail.lifelogs.com:train" unless I mark it as ham
+ ;; \e$B$I$s$J\e(B spam \e$B$b;d$O\e(B ham \e$B0u$rIU$1$J$1$l$P\e(B
+ ;; "nnimap+mail.lifelogs.com:train" \e$B$K9T$/\e(B (\e$BA0=R$N\e(B
+ ;; gnus-spam-newsgroup-contents \e$B@_Dj$K$h$j!"$9$Y$F$N$^$@FI$^$l$?$3$H\e(B
+ ;; \e$B$,L5$$%a%C%;!<%8$rFI$`$H$=$&$J$k\e(B)\e$B!#\e(B
(spam-process-destination "nnimap+mail.lifelogs.com:train")
- ;; any ham goes to my "nnimap+mail.lifelogs.com:mail" folder, but
- ;; also to my "nnimap+mail.lifelogs.com:trainham" folder for training
+ ;; \e$B$I$s$J\e(B ham \e$B$b;d$N\e(B "nnimap+mail.lifelogs.com:mail" \e$B%U%)%k%@$K9T$/\e(B
+ ;; \e$B$,!";d$N\e(B "nnimap+mail.lifelogs.com:trainham" \e$B%U%)%k%@$K$b%H%l!<\e(B
+ ;; \e$B%K%s%0$N$?$a$K9T$/!#\e(B
- (ham-process-destination "nnimap+mail.lifelogs.com:mail"
+ (ham-process-destination "nnimap+mail.lifelogs.com:mail"
"nnimap+mail.lifelogs.com:trainham")
- ;; in this group, only '!' marks are ham
+ ;; \e$B$3$N%0%k!<%W$G$O\e(B '!' \e$B0u$,IU$$$F$$$k$b$N$@$1$,\e(B ham\e$B!#\e(B
(ham-marks
(gnus-ticked-mark))
- ;; remembers senders in the blacklist on the way out - this is
- ;; definitely not needed, it just makes me feel better
+ ;; \e$B=P$+$1$k4V:]$K\e(B blacklist \e$B$KAw?.<T$r3P$($5$;$k\e(B - \e$B$3$l$OL@$i$+$K\e(B
+ ;; \e$BITMW$G!"C1$K;d$N]5J0$r@2$i$9$?$a$K$"$j$^$9!#\e(B
(spam-process (gnus-group-spam-exit-processor-blacklist)))
-;; Later, on the IMAP server I use the "train" group for training
-;; SpamAssassin to recognize spam, and the "trainham" group for
-;; recognizing ham - but Gnus has nothing to do with it.
+;; \e$B$=$N8e\e(B IMAP \e$B%5!<%P!<>e$G!";d$O\e(B SpamAssassin \e$B$,\e(B spam \e$B$rG'<1$9$k\e(B
+;; \e$B%H%l!<%K%s%0$N$?$a$K\e(B "train" \e$B%0%k!<%W$r!"\e(Bham \e$B$rG'<1$9$k%H%l!<\e(B
+;; \e$B%K%s%0$N$?$a$K\e(B "trainham" \e$B%0%k!<%W$r;H$$$^$9!#$G$b\e(B Gnus \e$B$O$=$&\e(B
+;; \e$B$$$&$3$H$O$d$C$F$/$l$^$;$s!#\e(B
@end example
-@subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
+@subsubheading \e$B%5!<%P!<>e$N\e(B IMAP \e$B%5!<%P!<$G!"E}7WE*$J_I2a4o$H\e(B @file{spam.el} \e$B$r;H$&\e(B
From Reiner Steib <reiner.steib@@gmx.de>.
-My provider has set up bogofilter (in combination with @acronym{DCC}) on
-the mail server (@acronym{IMAP}). Recognized spam goes to
-@samp{spam.detected}, the rest goes through the normal filter rules,
-i.e. to @samp{some.folder} or to @samp{INBOX}. Training on false
-positives or negatives is done by copying or moving the article to
-@samp{training.ham} or @samp{training.spam} respectively. A cron job on
-the server feeds those to bogofilter with the suitable ham or spam
-options and deletes them from the @samp{training.ham} and
-@samp{training.spam} folders.
+\e$B;d$N%W%m%P%$%@$O\e(B (@acronym{IMAP}) \e$B%a!<%k%5!<%P!<>e$G\e(B (@acronym{DCC} \e$B$HO"\e(B
+\e$B78$7$?\e(B) bogofilter \e$B$r2TF/$5$;$F$$$^$9!#G'<1$5$l\e(B
+\e$B$?\e(B spam \e$B$O\e(B @samp{spam.detected} \e$B$X9T$-!";D$j$K$ODL>o$N_I2a5,B'$,E,MQ$5$l\e(B
+\e$B$k!"\e(B \e$B$9$J$o$A\e(B @samp{some.folder} \e$B$+\e(B @samp{INBOX} \e$B$K9T$-$^$9!#9NDj$N<:GT\e(B
+\e$B$"$k$$$OH]Dj$N%H%l!<%K%s%0$O!"\e(B@samp{training.ham} \e$B$^$?\e(B
+\e$B$O\e(B @samp{training.spam} \e$B$=$l$>$l$K5-;v$r%3%T!<$9$k$+0\F0$5$;$k$3$H$K$h$C\e(B
+\e$B$F9T$J$o$l$^$9!#%5!<%P!<>e$N\e(B cron \e$B%8%g%V$,!"$=$l$i$rE,@Z$J\e(B ham \e$B$^$?\e(B
+\e$B$O\e(B spam \e$B%*%W%7%g%s$H$H$b$K\e(B bogofilter \e$B$KM?$(!"\e(B@samp{training.ham} \e$B$*$h\e(B
+\e$B$S\e(B @samp{training.spam} \e$B%U%)%k%@$+$i$=$l$i$r:o=|$7$^$9!#\e(B
-With the following entries in @code{gnus-parameters}, @code{spam.el}
-does most of the job for me:
+\e$B0J2<$N\e(B @code{gnus-parameters} \e$B$N9`$K$h$C$F!"\e(B@code{spam.el} \e$B$O$[$H$s$I$N\e(B
+\e$B;E;v$r;d$N$?$a$K$3$J$7$^$9\e(B:
@lisp
("nnimap:spam\\.detected"
(spam-contents gnus-group-spam-classification-ham))
@end lisp
-@itemize
+@itemize
@item @b{The Spam folder:}
-In the folder @samp{spam.detected}, I have to check for false positives
-(i.e. legitimate mails, that were wrongly judged as spam by
-bogofilter or DCC).
-
-Because of the @code{gnus-group-spam-classification-spam} entry, all
-messages are marked as spam (with @code{$}). When I find a false
-positive, I mark the message with some other ham mark (@code{ham-marks},
-@ref{Spam ELisp Package Global Variables}). On group exit, those
-messages are copied to both groups, @samp{INBOX} (were I want to have
-the article) and @samp{training.ham} (for training bogofilter) and
-deleted from the @samp{spam.detected} folder.
-
-The @code{gnus-article-sort-by-chars} entry simplifies detection of
-false positives for me. I receive lots of worms (sweN, @dots{}), that all
-have a similar size. Grouping them by size (i.e. chars) makes finding
-other false positives easier. (Of course worms aren't @i{spam}
-(@acronym{UCE}, @acronym{UBE}) strictly speaking. Anyhow, bogofilter is
-an excellent tool for filtering those unwanted mails for me.)
+@samp{spam.detected} \e$B%U%)%k%@$K$*$$$F!";d$O9NDj$N<:GT\e(B (\e$B$9$J$o$A!"\e(B
+bogofilter \e$B$+\e(B DCC \e$B$,\e(B spam \e$B$G$"$k$H8m$C$FH=Dj$7$?@5Ev$J%a!<%k\e(B) \e$B$N%A%'%C%/\e(B
+\e$B$r$7$J$1$l$P$J$j$^$;$s!#\e(B
+
+@code{gnus-group-spam-classification-spam} \e$B$N9`$N$?$a$K!"$9$Y$F$N%a%C%;!<\e(B
+\e$B%8$K$O\e(B spam \e$B$N0u\e(B (@code{$}) \e$B$,IU$1$i$l$^$9!#9NDj$K<:GT$7$?$b$N$r8+$D$1$?\e(B
+\e$B$i!";d$O5-;v$K$$$/$D$+$NB>$N\e(B ham \e$B0u\e(B (@code{ham-marks}, @ref{Spam ELisp
+Package Global Variables}) \e$B$rIU$1$^$9!#%0%k!<%W$r=P$k$H$-!"$=$l$i$N5-;v\e(B
+\e$B$O\e(B @samp{INBOX} (\e$B;d$,5-;v$rCV$$$F$*$-$?$$$H$3\e(B
+\e$B$m\e(B) \e$B$H\e(B @samp{training.ham} (bogofilter \e$B$N%H%l!<%K%s%0MQ\e(B) \e$B$NN>J}$N%0%k!<\e(B
+\e$B%W$K%3%T!<$5$l!"\e(B@samp{spam.detected} \e$B%U%)%k%@$+$i:o=|$5$l$^$9!#\e(B
+
+@code{gnus-article-sort-by-chars} \e$B$N9`$O!";d$N<:GT$7$?9NDj$N8!CN$rC1=c$K\e(B
+\e$B$7$^$9!#;d$O!"$9$Y$F;w$?%5%$%:$N!"$?$/$5$s$N%o!<%`\e(B (sweN, @dots{}) \e$B$r<u\e(B
+\e$B$1<h$j$^$9!#$=$l$i$r%5%$%:\e(B (\e$B$D$^$jJ8;z?t\e(B) \e$B$G$^$H$a$k$H!"B>$N4V0c$C$?9NDj\e(B
+\e$B$r8+$D$1$d$9$/$J$k$N$G$9!#\e(B(\e$B$b$A$m$s87L)$K$O%o!<%`$O\e(B @i{spam}
+(@acronym{UCE}, @acronym{UBE}) \e$B$G$O$"$j$^$;$s!#$H$b$"$l!"$=$l$i$NMW$i$J\e(B
+\e$B$$%a!<%k$r_I2a$9$k$N$K\e(B bogofilter \e$B$O;d$K$H$C$FM%=($JF;6q$G$9!#\e(B)
@item @b{Ham folders:}
-In my ham folders, I just hit @kbd{S x}
-(@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
-mail (false negative). On group exit, those messages are moved to
-@samp{training.ham}.
+\e$B;d$N\e(B ham \e$B%U%)%k%@$G!"G'<1$5$l$J$+$C$?\e(B spam \e$B%a!<%k\e(B (\e$BH]Dj$N<:GT\e(B) \e$B$r8+$?$H\e(B
+\e$B$-$O$$$D$G$b!";d$OC1$K\e(B @kbd{S x} (@code{gnus-summary-mark-as-spam}) \e$B$rC!\e(B
+\e$B$-$^$9!#%0%k!<%W$r=P$k$H$-!"$=$l$i$N%a%C%;!<%8$O\e(B @samp{training.ham} \e$B$K\e(B
+\e$B0\$5$l$^$9!#\e(B
@end itemize
-@subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
+@subsubheading @code{spam-report.el} \e$B$G\e(B Gmane \e$B%0%k!<%W$N\e(B spam \e$B$rJs9p$9$k\e(B
From Reiner Steib <reiner.steib@@gmx.de>.
-With following entry in @code{gnus-parameters}, @kbd{S x}
-(@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
-groups as spam and reports the to Gmane at group exit:
+\e$B0J2<$N\e(B @code{gnus-parameters} \e$B$KG<$a$?9`L\$K$h$C$F!"\e(B@kbd{S x}
+(@code{gnus-summary-mark-as-spam}) \e$B$G\e(B @code{gmane.*} \e$B%0%k!<%W$N\e(B spam \e$B5-\e(B
+\e$B;v$K0u$rIU$1!"%0%k!<%W$r=P$k$H$-$K\e(B Gmane \e$B$KJs9p$7$^$9\e(B:
@lisp
("^gmane\\."
(spam-process (gnus-group-spam-exit-processor-report-gmane)))
@end lisp
-Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
-because I don't read the groups directly from news.gmane.org, but
-through my local news server (leafnode). I.e. the article numbers are
-not the same as on news.gmane.org, thus @code{spam-report.el} has to check
-the @code{X-Report-Spam} header to find the correct number.
+\e$B2C$($F!";d$O\e(B news.gmane.org \e$B$+$i$G$O$J$/%m!<%+%k%K%e!<%9%5!<\e(B
+\e$B%P!<\e(B (leafnode) \e$B$rDL$7$F5-;v$rFI$s$G$$$k$N$G!"\e(B
+@code{(setq spam-report-gmane-use-article-number nil)} \e$B$r;H$C$F$$$^$9!#\e(B
+\e$B$D$^$j!"5-;vHV9f$,\e(B news.gmane.org \e$B$K$*$1$k$b$N$H0[$J$k$N$G!"@5$7$$5-;vHV\e(B
+\e$B9f$r8+$D$1$k$?$a$K\e(B @code{spam-report.el} \e$B$K\e(B @code{X-Report-Spam} \e$B%X%C%@!<\e(B
+\e$B$r8!::$5$;$J$1$l$P$J$j$^$;$s!#\e(B
@node Blacklists and Whitelists
@subsubsection \e$B%V%i%C%/%j%9%H$H%[%o%$%H%j%9%H\e(B