<?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>Views From The Hill &#187; Linux</title>
	<atom:link href="http://dustint.com/archives/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://dustint.com</link>
	<description>Tales Of A (Former) SFU Computing Scientist</description>
	<lastBuildDate>Thu, 17 Jun 2010 20:14:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fakemail for Developers</title>
		<link>http://dustint.com/archives/27</link>
		<comments>http://dustint.com/archives/27#comments</comments>
		<pubDate>Sat, 07 Jun 2008 07:34:18 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://dustint.com/?p=27</guid>
		<description><![CDATA[The other day when I was setting up email notifications for a Zend Framework application, I stumbled across Fakemail. From the developers website: fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue [...]]]></description>
			<content:encoded><![CDATA[<p>The other day when I was setting up email notifications for a Zend Framework application, I stumbled across Fakemail.</p>
<p>From the developers website:</p>
<blockquote><p>fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue content.</p></blockquote>
<p>I am quite impressed with this handy little script (written in both Python and Perl), as it works exactly as advertised: taking out the time required to properly configure a SMTP server and saving the hassle of having dozens of test messages showered across inboxes. Instead of forwarding emails on to their recipients, it simply saves a raw copy of the email to the specified directory.</p>
<p>The script has a windows installer that bundles the script with python and will run on all flavors of Linux and Unix assuming that they have perl or python installed.</p>
<p>To configure Zend_Mail use fakemail place the following in your bootstrapper or common config file:<br />
[php]Zend_Mail::setDefaultTransport(new Zend_Mail_Transport_Smtp(&#8216;localhost&#8217;,array(<br />
&#8216;port&#8217; =&gt; 10025<br />
)));[/php]</p>
<p>The &#8216;localhost&#8217; variable is the address of the computer that fakemail is running on (likely the local machine). The port number is the port that is specified when fakemail is run on the command line.</p>
<p>For more information about fakemail, binaries, and a usage guide. Visit the developers website at Sourceforce: <a href="http://www.lastcraft.com/fakemail.php">http://www.lastcraft.com/fakemail.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dustint.com/archives/27/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo blacklist.py init Script</title>
		<link>http://dustint.com/archives/22</link>
		<comments>http://dustint.com/archives/22#comments</comments>
		<pubDate>Wed, 04 Jun 2008 06:41:28 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[blacklist.py]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[ssh security]]></category>

		<guid isPermaLink="false">http://dustint.com/?p=22</guid>
		<description><![CDATA[I have several servers which run an assortment of http, svn, ssh, and ftp services. One of the largest annoyances are automated breaking scripts pounding my services. Recently, I have been looking into blacklist.py: a handy python script written by Reto Glauser, which monitors syslog-ng logs looking for possible break-in attempts. The script uses iptables [...]]]></description>
			<content:encoded><![CDATA[<p>I have several servers which run an assortment of http, svn, ssh, and ftp services. One of the largest annoyances are automated breaking scripts pounding my services. Recently, I have been looking into <a href="http://blinkeye.ch/mediawiki/index.php/SSH_Blocking">blacklist.py</a>: a handy python script written by Reto Glauser, which monitors syslog-ng logs looking for possible break-in attempts. The script uses iptables to block future traffic from suspicious IP&#8217;s for a specified amount of time.</p>
<p>After I got the script setup and running I wanted a Gentoo init script that would automatically start the script on boot. After reading through some examples in my /etc/init.d/ directory I seem to have managed to cook up something that works:<span id="more-22"></span></p>
<pre>[code]
#!/sbin/runscript
# blacklist is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# blacklist is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# Copyright: Dustin Thomson
# Homepage: http://dustint.com
# Date: 2008-06-03
# Version 0.0.1

EXEC=/usr/sbin/blacklist
PID=/var/run/blacklist.pid

depend(){
        need net
}

checkconfig(){
        if [ ! -e /usr/sbin/blacklist ] ; then
                eerror "blacklist not found in /usr/sbin/blacklist"
                return 1
        fi
}

start() {
        checkconfig || return 1
        ebegin "Starting Blacklist"
        $EXEC &amp;
        eend $?
}

stop()  {
        ebegin "Stopping Blacklist"
        start-stop-daemon --stop --retry 20 --quiet --pidfile $PID
        eend $?
}
[/code]</pre>
<p>Alternatively, for those with wget, cd into /etc/init.d/ and:</p>
<pre>wget <a href="http://dustint.com/wp-content/uploads/2008/06/blacklist">http://dustint.com/wp-content/uploads/2008/06/blacklist</a>
chmod +x blacklist</pre>
<p>I have placed blacklist.py in /usr/sbin/ and renamed it to simply blacklist</p>
<p>Reto also hosts a handy &#8220;stage-4&#8243; <a href="http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4)">backup script</a> which can create a full backup of your filesystem.</p>
]]></content:encoded>
			<wfw:commentRss>http://dustint.com/archives/22/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
