Gnus development mailing list
 help / color / mirror / Atom feed
* spam-split of spam.el with bsfilter
@ 2020-09-21 16:15 Hirotaka Honda
  2020-09-22  1:55 ` 黃炳熙
  0 siblings, 1 reply; 6+ messages in thread
From: Hirotaka Honda @ 2020-09-21 16:15 UTC (permalink / raw)
  To: ding

Dear all

I have been using nnmail-split-fancy as nnmail-split-methods with spam-split function on Emacs 24.5.1. It worked very well.

After I changed my computer, installed Emacs 27.1 with Gnus v5.13, and compiled bogofilter, I could not make bogofilter work for spam-split (somehow, I could get values by S t in summery buffer), however long time I examined.

Luckily I found that bsfilter seems supported by spam.el.
bsfilter is able to handle spams in Japanese.

Environment
Previous (x86_64-apple-darwin15.3.0, NS apple-appkit-1404.34) of 2016-02-28 on my MacOS
Current (build 1, x86_64-apple-darwin19.6.0, Carbon Version 162 AppKit 1894.6) of 2020-09-06

Problem 1
spam-split function seems sending mail text to bsfilter. But even when it replies "X-Spam-Flag: Yes", it will not send it to the folder specified by the value spam-split-group.

I made a script, bsfilter-test, which confirmed the problem.

Probelem 2
When I try spam-generic-score at summery buffer by keys S t, I always get the message "Spamicity score 0" even if the message tested was evaluated as spam by bogofilter on the command line of shell.

I would be grateful if someone gives me any clues or hints to solve the problems.

;;;; init file settings relating to spam.el is as the following:
(require 'spam)
(spam-initialize)

(setq spam-junk-mailgroups '("mail.spam"))
(setq gnus-spam-process-destinations '(("nnml:.*" "nnml:mail.spam"))
	  gnus-ham-process-destinations '(("nnml:mail.spam" "nnml:mail.misc")))
(setq spam-split-group '("mail.spam")) ;; nnml:xx wrong  9.17.2 Filtering Incoming Mail
(setq spam-mark-ham-unread-before-move-from-spam-group t) ;; Manual

(setq spam-bogofilter-program "/opt/local/bin/bogofilter")
(setq spam-bogofilter-database-directory "/Users/hirotaka/.bogofilter") ;; right

(setq spam-bsfilter-program "/Users/hirotaka/Applications/bin/bsfilter-test")
(setq spam-use-bsfilter t)
(setq spam-bsfilter-database-directory "/Users/hirotaka/.bsfilter")

(setq gnus-install-group-spam-parameters nil) ;; necessary?

(setq gnus-spam-process-newsgroups
      '(("nnml:.*" ((spam spam-use-bsfilter)
			(ham spam-use-bsfilter)))))

(setq gnus-parameters
	  '( ("nnml:mail\\.spam"
 		  (display . all)
		  (spam-contents gnus-group-spam-classification-spam)
		  (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter)))
		  (spam-process-destination . "nnml:mail.spam")
		  (ham-process-destination . "nnml:mail.misc")
		  (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark))
		  (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter"))
		 ("nnml:mail\\.misc"
 		  (display . all)
		  (spam-contents gnus-group-spam-classification-ham)
		  (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter)))
		  (spam-process-destination . "nnml:mail.spam")
		  (ham-process-destination . "nnml:mail.misc")
		  (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark))
		  (spam-marks (gnus-spam-mark))
		  (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter"))
		 ("nnml:mail\\.hirotaka"
 		  (display . all)
		  (spam-contents gnus-group-spam-classification-ham)
		  (spam-process ((spam spam-use-bsfilter) (ham spam-use-bsfilter)))
		  (spam-process-destination . "nnml:mail.spam")
		  (ham-process-destination . "nnml:mail.misc")
		  (ham-marks (gnus-del-mark gnus-read-mark gnus-ticked-mark gnus-killed-mark))
		  (spam-marks (gnus-spam-mark))
		  (spam-bsfilter-database-directory . "/Users/hirotaka/.bsfilter"))))

;;;; bsfilter-test is as the following:
#!/opt/local/bin/bash
LOG=$HOME/tmp/bsfilter-spamel-log
FARGV=("$@")
FARGC=("$#")
TARGV=()
for ((i=0; i< $FARGC ;i++)){
	TARGV[i]=`echo ${FARGV[i]} | nkf -w`
	echo $i ${FARGV[i]} ":" ${TARGV[i]} >> $LOG
	}
nkf -w | bsfilter ${TARGV[0]} ${TARGV[1]} ${TARGV[2]} ${TARGV[3]} ${TARGV[4]} ${TARGV[5]} ${TARGV[6]} ${TARGV[7]} ${TARGV[8]} ${TARGV[9]} ${TARGV[10]} ${TARGV[11]} ${TARGV[12]} | tee -a $LOG
# nkf -w: nkf is a tool to convert coding. -w option means output UTF-8

-- 
Hirotaka Honda
Honda Law Office
ParkAxis ShibuyaSakuragaoka South 801
8-11  Sakuragaokacho, Shibuya-Ku
Tokyo 150-0031 Japan
Tel +81 3 3463 6602 Fax +81 3 3463 6608
http://www.hondalaw.com


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

* Re: spam-split of spam.el with bsfilter
  2020-09-21 16:15 spam-split of spam.el with bsfilter Hirotaka Honda
@ 2020-09-22  1:55 ` 黃炳熙
  2020-09-22  2:09   ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: 黃炳熙 @ 2020-09-22  1:55 UTC (permalink / raw)
  To: The Gnus

[sorry for beside comments]

Dear Hirotaka,

Hirotaka Honda <hirotaka@hondalaw.com> writes:

> Dear all
>
> I have been using nnmail-split-fancy as nnmail-split-methods with spam-split function on Emacs 24.5.1. It worked very well.
>
> After I changed my computer, installed Emacs 27.1 with Gnus v5.13, and compiled bogofilter, I could not make bogofilter work for spam-split (somehow, I could get values by S t in summery buffer), however long time I examined.
>
> Luckily I found that bsfilter seems supported by spam.el.
> bsfilter is able to handle spams in Japanese.
>
> Environment
> Previous (x86_64-apple-darwin15.3.0, NS apple-appkit-1404.34) of 2016-02-28 on my MacOS
> Current (build 1, x86_64-apple-darwin19.6.0, Carbon Version 162 AppKit 1894.6) of 2020-09-06
>
> Problem 1
> spam-split function seems sending mail text to bsfilter. But even when it replies "X-Spam-Flag: Yes", it will not send it to the folder specified by the value spam-split-group.
>
> I made a script, bsfilter-test, which confirmed the problem.
>
> Probelem 2
> When I try spam-generic-score at summery buffer by keys S t, I always get the message "Spamicity score 0" even if the message tested was evaluated as spam by bogofilter on the command line of shell.
>
> I would be grateful if someone gives me any clues or hints to solve the problems.
>
> ...sorry for snip...

Everyone know that spam guarding is not easy. So i would like to give
you simple way. [All incoming mails ===> Gmail inbox] by forwarding,
that make classify to normal mails and spam mails. Actually there is no
stress with spam things...

Plus the best way is Google Apps!

Sincereley, Gnus fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//


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

* Re: spam-split of spam.el with bsfilter
  2020-09-22  1:55 ` 黃炳熙
@ 2020-09-22  2:09   ` Emanuel Berg
  2020-09-23  0:48     ` 黃炳熙
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2020-09-22  2:09 UTC (permalink / raw)
  To: ding

Byung-Hee wrote:

> Everyone know that spam guarding is not easy.
> So i would like to give you simple way. [All
> incoming mails ===> Gmail inbox] by forwarding,
> that make classify to normal mails and spam mails.

I never get any spam! I don't know what I'm
doing wrong... *sob*

Maybe it is this solution [1] that has kept me safe
all these years. But somehow I doubt it. It is common
that people put their mails on their homepages, even
as mailto: links which should be prime pray
for crawlers.

I think nowadays spammers get their targets from huge
Darknet dumps...

(not that I got spam before Darknet)


[1] https://dataswamp.org/~incal/mailto.png

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal



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

* Re: spam-split of spam.el with bsfilter
  2020-09-22  2:09   ` Emanuel Berg
@ 2020-09-23  0:48     ` 黃炳熙
  2020-09-23  1:01       ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: 黃炳熙 @ 2020-09-23  0:48 UTC (permalink / raw)
  To: The Gnus

Emanuel Berg <moasenwood@zoho.eu> writes:

> Byung-Hee wrote:
>
>> Everyone know that spam guarding is not easy.
>> So i would like to give you simple way. [All
>> incoming mails ===> Gmail inbox] by forwarding,
>> that make classify to normal mails and spam mails.
>
> I never get any spam! I don't know what I'm
> doing wrong... *sob*

Maybe you are Usenet(NNTP) man, so spammers don't know you are in the
world, i guess.

> Maybe it is this solution [1] that has kept me safe
> all these years. But somehow I doubt it. It is common
> that people put their mails on their homepages, even
> as mailto: links which should be prime pray
> for crawlers.
>
> I think nowadays spammers get their targets from huge
> Darknet dumps...
>
> (not that I got spam before Darknet)

Darknet... i need time to think about what Darknet is.

> [1] https://dataswamp.org/~incal/mailto.png

It looks good! Beautiful Email address, indeed^^^

Sincerely, Gnus fan Byung-Hee from Darknet (maybe?)

-- 
^고맙습니다 _布德天下_ 감사합니다_^))//


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

* Re: spam-split of spam.el with bsfilter
  2020-09-23  0:48     ` 黃炳熙
@ 2020-09-23  1:01       ` Emanuel Berg
  2020-09-23  2:30         ` 黃炳熙
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2020-09-23  1:01 UTC (permalink / raw)
  To: ding

Byung-Hee wrote:

> Maybe you are Usenet(NNTP) man, so spammers don't
> know you are in the world, i guess.

I was active on a couple of groups but now it is
reduced to a minimum. I subscribe to the following
Usenet groups, from nntp.aioe.org:

  alt.os.linux
  alt.test    
  alt.tv.survivor
  alt.usage.english
  rec.sport.boxing
  rec.woodworking

and the following MLs, with Gmane:

  gmane.comp.shells.zsh.user
  gmane.comp.terminal-emulators.tmux.user
  gmane.comp.video.ffmpeg.user
  gmane.discuss
  gmane.emacs.bugs
  gmane.emacs.devel
  gmane.emacs.gnus.general
  gmane.emacs.gnus.user
  gmane.emacs.help
  gmane.emacs.orgmode
  gmane.emacs.w3m
  gmane.linux.debian.user
  gmane.test

>> Maybe it is this solution [1] that has kept me
>> safe all these years. But somehow I doubt it.
>> It is common that people put their mails on their
>> homepages, even as mailto: links which should be
>> prime pray for crawlers. I think nowadays spammers
>> get their targets from huge Darknet dumps... (not
>> that I got spam before Darknet)
>
> Darknet... i need time to think about what
> Darknet is

Darknet is the part of deep web which is encrypted.
You reach deep web (and so darknet as well)
anonymously, with Tor. You can buy drugs, guns, and
much worse things on Darknet, if you have enough
Bitcoins...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal



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

* Re: spam-split of spam.el with bsfilter
  2020-09-23  1:01       ` Emanuel Berg
@ 2020-09-23  2:30         ` 黃炳熙
  0 siblings, 0 replies; 6+ messages in thread
From: 黃炳熙 @ 2020-09-23  2:30 UTC (permalink / raw)
  To: The Gnus

Emanuel Berg <moasenwood@zoho.eu> writes:

> Byung-Hee wrote:
>
>> Maybe you are Usenet(NNTP) man, so spammers don't
>> know you are in the world, i guess.
>
> I was active on a couple of groups but now it is
> reduced to a minimum. I subscribe to the following
> Usenet groups, from nntp.aioe.org:
>
>   alt.os.linux
>   alt.test    
>   alt.tv.survivor
>   alt.usage.english
>   rec.sport.boxing
>   rec.woodworking
>
> and the following MLs, with Gmane:
>
>   gmane.comp.shells.zsh.user
>   gmane.comp.terminal-emulators.tmux.user
>   gmane.comp.video.ffmpeg.user
>   gmane.discuss
>   gmane.emacs.bugs
>   gmane.emacs.devel
>   gmane.emacs.gnus.general
>   gmane.emacs.gnus.user
>   gmane.emacs.help
>   gmane.emacs.orgmode
>   gmane.emacs.w3m
>   gmane.linux.debian.user
>   gmane.test

Oh good information! Thanks^^^

>>> Maybe it is this solution [1] that has kept me
>>> safe all these years. But somehow I doubt it.
>>> It is common that people put their mails on their
>>> homepages, even as mailto: links which should be
>>> prime pray for crawlers. I think nowadays spammers
>>> get their targets from huge Darknet dumps... (not
>>> that I got spam before Darknet)
>>
>> Darknet... i need time to think about what
>> Darknet is
>
> Darknet is the part of deep web which is encrypted.
> You reach deep web (and so darknet as well)
> anonymously, with Tor. You can buy drugs, guns, and
> much worse things on Darknet, if you have enough
> Bitcoins...

That's good to know, thank you Emanuel^^^

Sincerely, Gnus fan Byung-Hee (i am not from Darknet!)

-- 
^고맙습니다 _布德天下_ 감사합니다_^))//


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

end of thread, other threads:[~2020-09-23  2:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 16:15 spam-split of spam.el with bsfilter Hirotaka Honda
2020-09-22  1:55 ` 黃炳熙
2020-09-22  2:09   ` Emanuel Berg
2020-09-23  0:48     ` 黃炳熙
2020-09-23  1:01       ` Emanuel Berg
2020-09-23  2:30         ` 黃炳熙

Gnus development mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/ding

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 ding ding/ http://inbox.vuxu.org/ding \
		ding@inbox.vuxu.org
	public-inbox-index ding

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git