<?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>Intrepid Blog &#187; email</title>
	<atom:link href="http://blog.affien.com/archives/tag/email/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>E-Mail server issues</title>
		<link>http://blog.affien.com/archives/2006/11/09/e-mail-server-issues/</link>
		<comments>http://blog.affien.com/archives/2006/11/09/e-mail-server-issues/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 22:12:42 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2006/11/09/e-mail-server-issues/</guid>
		<description><![CDATA[I had some problems with a recent mysql update &#8212; it broke some packages including qmail-send, which caused quite a lot of mail to be dropped the last few days. Sorry for that.
Update: mail was fortunately not dropped  , it&#8217;s still in the qmail queue, it just hasn&#8217;t been delivered yet. So there&#8217;ll only [...]]]></description>
			<content:encoded><![CDATA[<p>I had some problems with a recent mysql update &#8212; it broke some packages including qmail-send, which caused quite a lot of mail to be dropped the last few days. Sorry for that.</p>
<p><strong>Update</strong>: mail was fortunately not dropped <img src='http://blog.affien.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , it&#8217;s still in the qmail queue, it just hasn&#8217;t been delivered yet. So there&#8217;ll only be a delay.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2006/11/09/e-mail-server-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep your email secure (and what just doesn&#8217;t work)</title>
		<link>http://blog.affien.com/archives/2006/05/21/keep-your-email-secure-and-what-just-doesnt-work/</link>
		<comments>http://blog.affien.com/archives/2006/05/21/keep-your-email-secure-and-what-just-doesnt-work/#comments</comments>
		<pubDate>Sat, 20 May 2006 23:15:26 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2006/05/21/keep-your-email-secure-and-what-just-doesnt-work/</guid>
		<description><![CDATA[The best way to keep your e-mail address secure from evil spam bots is some kind of javascript and obfuscation, which unfortunately isn&#8217;t always available. There are enough alternatives though.
Usually people tend to replace the &#8216;@&#8217; with some short replacement like &#8216;{at}&#8217; or &#8216;bij&#8217;. This just doesn&#8217;t help.
Any programmer with a bit of knowledge of [...]]]></description>
			<content:encoded><![CDATA[<p>The best way to keep your e-mail address secure from evil spam bots is some kind of javascript and obfuscation, which unfortunately isn&#8217;t always available. There are enough alternatives though.</p>
<p>Usually people tend to replace the &#8216;@&#8217; with some short replacement like &#8216;{at}&#8217; or &#8216;bij&#8217;. This just doesn&#8217;t help.</p>
<p>Any programmer with a bit of knowledge of regex can create a program that scans for domain names and interprets every small bit of text in front of it as an @ sign.</p>
<p>Some smarter people also replace the dot. This works, unless your email-host uses a easily recognizable TLD (.com) or domainname (gmail.com).</p>
<p>Also putting &#8216;SPAM&#8217; in your email-adress some.personREMOVETHISFORSPAM@foo.bar is easily filtered.</p>
<p>Best thing is to use something out of the box.</p>
<p>For instance, my email address is X@Y, where:<br />
X = bas.westerbaan<br />
Y = gmail.com<br />
Also I&#8217;ve got an email-address on w-nz.com, namely bas.westerbaan.</p>
<p>Or even maybe w-nz.com@bas.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2006/05/21/keep-your-email-secure-and-what-just-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update on the anti-email-harvester mailto links</title>
		<link>http://blog.affien.com/archives/2004/12/22/update-on-the-anti-email-harvester-mailto-links/</link>
		<comments>http://blog.affien.com/archives/2004/12/22/update-on-the-anti-email-harvester-mailto-links/#comments</comments>
		<pubDate>Wed, 22 Dec 2004 21:50:13 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mailto]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2004/12/22/update-on-the-anti-email-harvester-mailto-links/</guid>
		<description><![CDATA[In the previous post I described a simple though effective method to get rid of the constantly cleverer spam email harvester bots.
I&#8217;ve made a little update on the algorithm, it now uses only 1 number for each character and uses a cascading incremental xor transform.
Python code for the algorithm itself:
def alphaicx(s):
    ret [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://blog.w-nz.com/archives/2004/12/21/protecting-your-email-address-against-spam-bots/">previous post</a> I described a simple though effective method to get rid of the constantly cleverer spam email harvester bots.</p>
<p>I&#8217;ve made a little update on the algorithm, it now uses only 1 number for each character and uses a cascading incremental xor transform.</p>
<p>Python code for the algorithm itself:</p>
<blockquote><pre>def alphaicx(s):
    ret = ""
    cascvalue = 0
    for i in range(0, len(s)):
        ret = ret + chr(ord(s[i]) ^ cascvalue)
        cascvalue = (ord(ret[i]) + 1) % 255
    return ret
def betaicx(s):
    ret = ""
    cascvalue = 0
    for i in range(0, len(s)):
        ret = ret + chr(ord(s[i]) ^ cascvalue)
        cascvalue = ((ord(ret[i]) ^ cascvalue) + 1) % 255
    return ret</pre>
</blockquote>
<p>I designed the algorithm in Python. <a href="http://blog.w-nz.com/archives/2004/12/20/rgb-to-hex-and-why-the-python-interactive-mode-is-so-damned-handy/">Python is great for that kind of stuff</a>.</p>
<p>As you can see there are 2 functions, when you encode something with <code>alphaicx</code> you can decode it with <code>betaicx</code>, and visa versa. <code>betaicx</code> creates tougher code though. <strong>This <em>encryption</em> is pretty lousy, but hard enough to stop spam bots</strong>.</p>
<p>I&#8217;ve ported <code>betaicx</code> to PHP, and <code>alphaicx</code> to Javascript. The <a href="http://w-nz.com/tools/secureemail.php?">running example (very usefull though)</a> has been updated.</p>
<p>The PHP/Javascript code for the function:</p>
<blockquote><pre>function JSBotProtect($text){
	$cxred = "0";
	$cascval = 0;
	for($i = 0; $i &lt; strlen($text); $i++){
		$value = (ord($text[$i]) ^ $cascval);
		$cxred .= "," . $value;
		$cascval = (($value ^ $cascval) + 1) % 255;
	}
	return &lt;&lt;&lt;EOF
&lt;script type="text/javascript"&gt;var cxred=String.fromCharCode({$cxred});
var uncxred=""; var cascval=0;for(i=1;i&lt;cxred .length; i++)
{uncxred+=String.fromCharCode(cxred.charCodeAt(i)^cascval);
cascval=((uncxred.charCodeAt(i-1))+1)%255;}document.write(uncxred);&lt;/script&gt;
EOF;
}</pre>
</blockquote>
<p>I&#8217;ll more compact <code>uncxred</code> storage. Probable just normal hex, or when I can get it working BASE64.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2004/12/22/update-on-the-anti-email-harvester-mailto-links/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protecting your email address against spam bots</title>
		<link>http://blog.affien.com/archives/2004/12/21/protecting-your-email-address-against-spam-bots/</link>
		<comments>http://blog.affien.com/archives/2004/12/21/protecting-your-email-address-against-spam-bots/#comments</comments>
		<pubDate>Tue, 21 Dec 2004 22:43:26 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2004/12/21/protecting-your-email-address-against-spam-bots/</guid>
		<description><![CDATA[Spam bots get smarter these days in harvesting email addresses. They usualy use a regex which searches for &#8216;.. dot .. ltd&#8217;, which isn&#8217;t that resource intensive. When that is done a more advanced regex is put in there to get the email adress somehow removing stuff like &#8217;spam&#8217;.
Using normal javascript encoding doesn&#8217;t work anymore, [...]]]></description>
			<content:encoded><![CDATA[<p>Spam bots get smarter these days in harvesting email addresses. They usualy use a regex which searches for &#8216;.. dot .. ltd&#8217;, which isn&#8217;t that resource intensive. When that is done a more advanced regex is put in there to get the email adress somehow removing stuff like &#8217;spam&#8217;.</p>
<p>Using normal javascript encoding doesn&#8217;t work anymore, for it isn&#8217;t that hard for a spider to regognize encoded strings and decode them, whether this is in javascript code or normal html escapes.</p>
<p>Therefore we need to get more inventive:</p>
<blockquote><pre>function JSBotProtect($text){
	$xorred = "0";
	$layer = "0";
	for($i = 0; $i &lt; strlen($text); $i++){
		$layerbit = mt_rand(0, 255);
		$xorred .= "," . (string)(ord($text[$i]) ^ $layerbit);
		$layer .= "," . (string)$layerbit;
	}
	return &lt;&lt;&lt;EOF
	&lt;script type="text/javascript"&gt;
		var xorred = String.fromCharCode({$xorred});
		var layer = String.fromCharCode({$layer});
		var unxorred = "";
		for(i = 1; i &lt; xorred.length; i++){
			unxorred += String.fromCharCode(
				xorred.charCodeAt(i)^layer.charCodeAt(i));
		}
		document.write(unxorred);
	&lt;/script&gt;
EOF;
}</pre>
</blockquote>
<p>This PHP function returns a javascript block of code which stores the sensitive string like an email address in 2 parts, which when xorred with eachother result in the original email address.</p>
<p><a href="http://w-nz.com/tools/secureemail.php">An implementation to get a mailto: link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2004/12/21/protecting-your-email-address-against-spam-bots/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
