<?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>tOMPSON's blog &#187; Security</title>
	<atom:link href="http://dertompson.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://dertompson.com</link>
	<description>some personal, more technical - by Thomas Einwaller</description>
	<lastBuildDate>Mon, 28 Jun 2010 10:24:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>BitDefender failed me (again)</title>
		<link>http://dertompson.com/2009/09/16/bitdefender-failed-me-again/</link>
		<comments>http://dertompson.com/2009/09/16/bitdefender-failed-me-again/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:35:53 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://dertompson.com/?p=803</guid>
		<description><![CDATA[Today I had problems running my newly installed cygwin 1.7 beta and minTTY after updating BitDefender. It only took me some minutes to find out that BitDefender was the cause of the problem (much faster than the last time). After fidling around with some settings and trying some workarounds from various web resources I decided [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had problems running my newly installed cygwin 1.7 beta and minTTY after updating BitDefender. It only took me some minutes to find out that BitDefender was the cause of the problem (<a href="http://dertompson.com/2009/04/21/skype-io-error/">much faster than the last time</a>).</p>
<p>After fidling around with some settings and trying some workarounds from various web resources I decided to uninstall BitDefender. Now I am looking for a good replacement. Any recommendations for a Windows 7 antivirus program?</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2009/09/16/bitdefender-failed-me-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Certificate issues with openjdk under Debian</title>
		<link>http://dertompson.com/2009/06/15/certificate-issues-with-openjdk-under-debian/</link>
		<comments>http://dertompson.com/2009/06/15/certificate-issues-with-openjdk-under-debian/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 20:31:15 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://dertompson.com/?p=774</guid>
		<description><![CDATA[Currently we are developing the connection to mPAY to handle payments for our online time tracking application timr.com. mPAY provides a https URL that takes the payment parameters and returns if the transaction was successful. When testing the call to this URL from our server we always got the following error message: java.security.InvalidAlgorithmParameterException: the trustAnchors [...]]]></description>
			<content:encoded><![CDATA[<p>Currently we are developing the connection to mPAY to handle payments for our<a href="http://timr.com"> online time tracking application timr.com</a>. mPAY provides a https URL that takes the payment parameters and returns if the transaction was successful. When testing the call to this URL from our server we always got the following error message:</p>
<p><code>java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty</code></p>
<p>A google searched showed some pages where errors like these were discussed (<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501487">like here</a>). It seems like there is a bug in openjdk-6-jdk 6b11-9.1+lenny2. The symbolic link<code> /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts</code> is directing to the file <code>/etc/ssl/certs/java/cacerts</code> which is missing. It should be included in the package <code>ca-certificates-java</code> but that package is unavailable under Debian lenny.</p>
<p>I hope this bug is fixed in a future openjdk version, meanwhile I copied the file from one of my Ubuntu servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2009/06/15/certificate-issues-with-openjdk-under-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jungledisk and Hosteurope vserver</title>
		<link>http://dertompson.com/2009/04/27/jungledisk-and-hosteurope-vserver/</link>
		<comments>http://dertompson.com/2009/04/27/jungledisk-and-hosteurope-vserver/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 20:12:34 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[jungledisk]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://dertompson.com/?p=729</guid>
		<description><![CDATA[I am using jungledisk for about half a year now to backup my Ubuntu home server online (photos, mp3, &#8230;). Today I tried to configure the virtual server this blog is running on to backup my blog with jungledisk &#8211; but I had no luck. Jungledisk uses fuse to mount the web service storage and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-731" title="logo_phpbb" src="http://dertompson.com/wp-content/uploads/2009/04/logo_phpbb.gif" alt="logo_phpbb" width="152" height="153" />I am using <a href="http://jungledisk.com/">jungledisk</a> for about half a year now to backup my Ubuntu home server online (photos, mp3, &#8230;). Today I tried to configure the virtual server this blog is running on to backup my blog with jungledisk &#8211; but I had no luck.</p>
<p>Jungledisk uses <a href="http://fuse.sourceforge.net/">fuse</a> to mount the web service storage and it seems that I am not able to load the fuse module on my virtual server. I installed fuse-utils via aptitude but every time I tried to run jungledisk I got the error message:</p>
<p><code>fusermount: failed to open /dev/fuse: Permission denied</code></p>
<p>If I try to load the fuse module by running modprobe fuse I get the error<br />
<code><br />
FATAL: Could not load /lib/modules/2.6.9-023stab048.6-enterprise/modules.dep: No such file or directory</code></p>
<p>Seems like the kernel on my server was compiled by Hosteurope without being able to load modules. I am doing a manual backup now and will have a look into that in some days again.</p>
<p>UPDATE: I sent an email to the support of Hosteurope and their short answer was: It is not possible to use FUSE on their systems <img src='http://dertompson.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2009/04/27/jungledisk-and-hosteurope-vserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup third-party apps of your BlackBerry</title>
		<link>http://dertompson.com/2009/01/12/backup-third-party-apps-of-your-blackberry/</link>
		<comments>http://dertompson.com/2009/01/12/backup-third-party-apps-of-your-blackberry/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 21:44:26 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[RIM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://dertompson.com/?p=666</guid>
		<description><![CDATA[Today I decided to make a complete backup of all the applications currently installed on my BlackBerry. I just bought Sid Meier&#8217;s Pirates! for BlackBerry from Concrete Software. This game is the greatest game I ever played on a mobile device so far and at the same the the best remake of an old classic [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to make a complete backup of all the applications currently installed on my BlackBerry. I just bought <a href="http://www.concretesoftware.com/blackberry/pirates.shtml">Sid Meier&#8217;s Pirates!</a> for BlackBerry from Concrete Software. This game is the greatest game I ever played on a mobile device so far and at the same the the best remake of an old classic like Pirates! is &#8211; ARR!</p>
<p>Backing up the application was easy by following <a href="http://www.boygeniusreport.com/2008/12/21/how-to-back-up-your-blackberry-applications/">BoyGenius&#8217; how to</a>. To hardest part was to find the folder using Vista&#8217;s search &#8211; I ended up firing up find in cygwin.</p>
<p>Having securely stored all my precious applications I am now going to update my Bold to <a href="http://www.blackberryforums.com/general-9000-series-discussion-bold/">OS version 4.6.0.216 just found on blackberryforums</a>. Wish me luck on that one!</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2009/01/12/backup-third-party-apps-of-your-blackberry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSL Debacle</title>
		<link>http://dertompson.com/2008/05/29/openssl-debacle/</link>
		<comments>http://dertompson.com/2008/05/29/openssl-debacle/#comments</comments>
		<pubDate>Thu, 29 May 2008 07:25:05 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://dertompson.com/?p=515</guid>
		<description><![CDATA[There are a lot of sites around the web that inform us about the &#8220;OpenSSL debacle&#8221; in the Debian based Linux systems. A piece of code that was committed &#8220;accidentally&#8221; about two years ago limited the amount of possible SSH keys to about 32000. This means brute force hacking attempts based on the list of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-368" title="Lock" src="http://dertompson.com/wp-content/uploads/2007/12/lock.png" alt="" width="128" height="128" />There are a lot of <a href="http://www.blogaholic.de/blog/2008/05/17/das-debian-openssl-debakel-schnell-handeln/">sites around the web</a> that inform us about the <a href="http://www.links.org/?p=327">&#8220;OpenSSL debacle&#8221;</a> in the Debian based Linux systems. A piece of code that was committed &#8220;accidentally&#8221; about two years ago limited the amount of possible SSH keys to about 32000. This means brute force hacking attempts based on the list of possible keys could easily lead to success.</p>
<p>When I read this about a week ago I reacted immediately and updated my system with:</p>
<p><code>aptitude update<br />
aptitude dist-upgrade</code></p>
<p>The <a href="http://wiki.debian.org/SSLkeys">OpenSSL wiki</a> page describes what has to be done for the various installed packages that use OpenSSL certificates. The tool dowkd.pl allows you to check if there are vulnerable keys on your system.</p>
<p>I use PuTTY a lot in combination with keys created by PuTTYgen &#8211; these keys stored on my various systems are of course not affected by this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2008/05/29/openssl-debacle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail size restrictions in postfix</title>
		<link>http://dertompson.com/2008/03/23/mail-size-restrictions-in-postfix/</link>
		<comments>http://dertompson.com/2008/03/23/mail-size-restrictions-in-postfix/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 17:49:28 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dertompson.com/index.php/2008/03/23/mail-size-restrictions-in-postfix/</guid>
		<description><![CDATA[As I wrote in my post about my mail server configuration I am using postfix as MTA for my emails. This week a friend had problems to send me an email containing some attachments. He got the following error message from my server: SMTP error from remote mail server after MAIL FROM:&#60;anyone@anywhere.com&#62; SIZE=16282613: host example.net [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dertompson.com/wp-content/uploads/2008/02/at.png" class="alignright" alt="at" />As I wrote <a href="http://dertompson.com/index.php/2008/02/13/mail-server-setup-for-debian-etch/">in my post about my mail server configuration</a> I am using postfix as MTA for my emails. This week a friend had problems to send me an email containing some attachments. He got the following error message from my server:</p>
<p><code>SMTP error from remote mail server after MAIL FROM:&lt;anyone@anywhere.com&gt;<br />
SIZE=16282613:<br />
host example.net [87.230.24.156]: 552 5.3.4 Message size exceeds fixed limit</code></p>
<p>I was a bit confused because I did not set any limit. After checking the postfix manual and running the following commands</p>
<p><code>postconf -d</code> (showing the default settings)<br />
<code>postconf -n</code> (showing explicitly configured settings)</p>
<p>I found out that the default maximum message size is configured like</p>
<p><code>message_size_limit = 10240000</code></p>
<p>which means about 10MB. I ran the following commands to adjust the limit:</p>
<p><code>postconf -e "message_size_limit = 102400000"</code></p>
<p>Now I am able to receive mails with a maximum size of about 100 megs. Additionally I change the maximum mailbox size with the following command:</p>
<p><code>postconf -e "mailbox_size_limit = 512000000"<br />
postconf -e "virtual_mailbox_limit = 512000000"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2008/03/23/mail-size-restrictions-in-postfix/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Detailed access control for subversion repositories</title>
		<link>http://dertompson.com/2008/03/08/detailed-access-control-for-subversion-repositories/</link>
		<comments>http://dertompson.com/2008/03/08/detailed-access-control-for-subversion-repositories/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 19:58:43 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dertompson.com/index.php/2008/03/08/detailed-access-control-for-subversion-repositories/</guid>
		<description><![CDATA[Some months ago I wrote this post about Setting up subversion on Debian etch. I mentioned that you could use the AuthzSVNAccessFile directive to add more detailed access control for your subversion repositories. That time I did not need it and I did not look into the detailed documentation. Today I needed to setup another [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dertompson.com/wp-content/uploads/2007/09/svnlogo.png" class="alignright" alt="svn" />Some months ago I wrote <a href="http://dertompson.com/index.php/2007/09/28/setting-up-subversion-on-debian-etch/">this post about Setting up subversion on Debian etch</a>. I mentioned that you could use the AuthzSVNAccessFile directive to add more detailed access control for your subversion repositories. That time I did not need it and I did not look into the detailed documentation. Today I needed to setup another repository for a new user group so I wanted to define which users has access to which repository.</p>
<p>The whole process was simpler than I thought it would be. I just had to add the following line to my Location in the apache virtual host that points to my repository:</p>
<p><code>AuthzSVNAccessFile /path/to/access/file<br />
</code><br />
Then I created the file I pointed out with the directive. There I added entries like</p>
<p><code>[main:/]<br />
tom = rw</code></p>
<p><code>[other:/]<br />
tom = rw<br />
frank = rw</code></p>
<p>With this entries I defined which users have access to the two repositories main and other. It is as easy as this. The modules configured per default for svn in Debian etch already have loaded the authz_svn module. For more details see the <a href="http://svnbook.red-bean.com/en/1.1/ch06s04.html">svn documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2008/03/08/detailed-access-control-for-subversion-repositories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail server setup for Debian etch</title>
		<link>http://dertompson.com/2008/02/13/mail-server-setup-for-debian-etch/</link>
		<comments>http://dertompson.com/2008/02/13/mail-server-setup-for-debian-etch/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 06:19:50 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://dertompson.com/index.php/2008/02/13/mail-server-setup-for-debian-etch/</guid>
		<description><![CDATA[I am running my own mail server now for over five years. There are a lot of good free email services out there but I am not satisfied with their spam filters. I am getting about 300 spam mails a day and with my current solution only one of them makes it into my inbox [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://dertompson.com/wp-content/uploads/2008/02/at.png" alt="at" />I am running my own mail server now for over five years. There are a lot of good free email services out there but I am not satisfied with their spam filters. I am getting about 300 spam mails a day and with my current solution only one of them makes it into my inbox per month.</p>
<p>The second reason is that I do not want to delete or archive my mails to often and I want to have access to them anywhere at any time. Therefor I need an IMAP server with a lot of storage. Most free mail services provide this nowadays but did not five years ago. I thought about using GMAIL lately but I am not completely happy with storing all my mails on Google servers.</p>
<p>First I used an old PC that ran in my home office day and night. My home internet connection always had a high enough upload bandwidth to allow that. The mail server was no dedicated mail server for my domain. I used fetchmail to receive my emails from multiple POP3 servers.</p>
<p>About six months ago I configured a VPS machine to act as the dedicated mail server for my domains. I host multiple mail accounts for my family and friends on it. This post explains what I did to configure my perfect personal mail server.<br />
<span id="more-296"></span></p>
<h2>Basic mail server setup</h2>
<p>The whole system is based on <a href="http://www.us.debian.org/releases/etch/">Debian etch</a> base network installation. The first packages I installed were</p>
<p><code>apt-get install postfix mutt</code></p>
<p>I use postfÃ­x as my mail transfer agent. It provides a huge set of features and is a lot easier to configure than other systems. After installing postfix the configuration dialog asked what kind of system I have. I answered &#8220;Internet site&#8221; because I wanted to configure a dedicated mail server for my domain.</p>
<p>mutt is a simple mail reader which I use to read and send mails for testing when connected over ssh. After the installation of postfix it should be possible to send mails localy between user accounts (tom, root, &#8230;) and to an official mail address with mutt. See the <a href="http://www.mutt.org/doc/manual/">mutt manual</a> on how to control mutt.</p>
<h2>Spam filter</h2>
<p>I found <a href="http://blogbound.com/etch-postfix-spamassassin-vps">this nice article on how to install and configure spamassassin with postfix on debian</a>. Based on this how to I installed the following packages:</p>
<p><code>apt-get install spamassassin spamc pyzor razor</code></p>
<p>With the command line</p>
<p><code>spamassassin --lint -D</code></p>
<p>it is possible to check if spamassassin works and what checks are enabled.</p>
<p>I added a user for spamassassin with the following statements:</p>
<p><code>groupadd -g 5001 spamd<br />
useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd<br />
mkdir /var/lib/spamassassin<br />
chown spamd:spamd /var/lib/spamassassin</code></p>
<p>In the file /etc/default/spamassassin I made the following changes:</p>
<p><code>SAHOME="/var/lib/spamassassin/"<br />
ENABLED=1<br />
OPTIONS="--create-prefs --max-children 2 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log"</code></p>
<p>This enables spamassassin on startup of the server, configures its home directory and defines the maximum number of processes it is allowed to use.</p>
<p>Inside the file <code>/etc/postfix/master.cf</code> I added the following line to tell postfix to filter received mails through spamassassin:</p>
<p><code>smtp inet n - - - 2 smtpd<br />
-o content_filter=spamassassin</code></p>
<p><code>spamassassin unix - n n - - pipe<br />
user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}</code></p>
<p>After this point every incoming mail is checked by spamassassin. I wanted to drop every mail with a spam rating higher than ten points so I added the following line in <code>/etc/postfix/main.cf</code></p>
<p><code>header_checks = regexp:/etc/postfix/header_checks</code></p>
<p>and created the file <code>/etc/postfix/header_checks</code> with this content:</p>
<p><code>/^X-Spam-level: \*\*\*\*\*\*\*\*\*.*$/ DISCARD</code></p>
<p>So far I had my new server where my old PC at home already was. One of the biggest advantages of having my own dedicated mail server for my domain compared to a home server with fetchmail is that it is possible to use <a href="http://www.greylisting.org/">greylisting</a>. This means every time a new mail server wants to send a mail to my domain it is rejected on the first try. If the server tries again after five minutes the mail is accepted. Most spam senders do not try again which reduces spam significant (by about 90 percent!).</p>
<p>All I had to do to get greylisting was to install the correct Debian package</p>
<p><code>apt-get install postgrey</code></p>
<p>and add the following lines to <code>/etc/postfix/main.cf</code>:</p>
<p><code>smtpd_recipient_restrictions =<br />
permit_mynetworks,<br />
reject_unauth_destination,<br />
check_policy_service inet:127.0.0.1:60000</code></p>
<h2>IMAP, POP and Webmail</h2>
<p>Now that mails are received, filtered and stored by the server I had to make them accessible. My choice for this is <a href="http://www.dovecot.org/">dovecot</a> for IMAP and POP in combination with <a href="http://www.squirrelmail.org/">squirrelmail</a> for webmail. Of course there are Debian packages which I installed with</p>
<p><code>apt-get install dovecot-imapd dovecot-pop3d squirrelmail</code></p>
<p>This also installs apache2 as web server with PHP support because squirrelmail is a PHP web application. Inside <code>/etc/dovecot/dovecot.conf</code> I added the protocols IMAP, IMAPS and POP3S:</p>
<p><code>protocols = imap imaps pop3s</code></p>
<p>I only use IMAPS for security reasons but squirrelmail connects over IMAP internally. Now it was possible to run dovecot by executing</p>
<p><code>/etc/init.d/dovecot start</code></p>
<p>To enable squirrelmail I added the example configuration inside of <code>/etc/squirrelmail/apache.conf</code> to my apache2 virtual host and reloaded the apache2 configuration. Now I was able to log into my webmail.</p>
<h2>Virtual mail users</h2>
<p>Since I want to allow all the members of my family to use my mail server without having to add a user account on my Linux system I chose to create virtual mail users. Therefor I first created a real system user under which the mails of all virtual users will be handled.</p>
<p><code>adduser vmail</code></p>
<p>I made sure that he the user is not able to login (shell /bin/false) and has a strong password. Then I added the following lines to <code>/etc/postfix/main.cf</code>:</p>
<p><code>virtual_transport = virtual<br />
virtual_mailbox_domains = /etc/postfix/vhosts<br />
virtual_mailbox_base = /var/mail/vmail<br />
virtual_mailbox_maps = hash:/etc/postfix/vmaps<br />
virtual_uid_maps = static:1001<br />
virtual_gid_maps = static:1001<br />
virtual_alias_maps = hash:/etc/postfix/valias</code></p>
<p>The ID 1001 in this configuration is the user and group ID of the <code>vmail</code> user I just created. Then I created the files configured above. The <code>vhosts</code> file holds the domains for which the mail server should handle incoming mails just like:</p>
<p><code>domain1.com<br />
domain2.com</code></p>
<p>The <code>vmaps</code> file tells the system in which subdirectory of the <code>vmail</code> base directory (in my case <code>/var/mail/vmail</code>) the mails of the virtual users should be stored:</p>
<p><code>tom@domain1.com tom@domain1.com/<br />
tom@domain2.com	tom@domain2.com/<br />
jim@domain2.com	jim@domain2.com/</code></p>
<p>I had to create these directories and make <code>vmail</code> the owner of them. Later this configuration will be ignored because I used maildrop for filtering my mails (see below).</p>
<p>After creating the file I had to call <code>postmap vhosts</code> to generate to map that postfix uses to access it.</p>
<p>In the <code>valias</code> file it is possible to define mail alias which allows to create multiple email addresses that should be stored in the same mailbox like the following:</p>
<p><code>postmaster@domain1.com  tom@domain1.com<br />
postmaster@domain2.com  tom@domain2.com<br />
thomas@domain2.com  tom@domain2.com</code></p>
<p>Like before I had to use <code>postmap</code> to create the map file for this file after every change. A reload of the configuration by calling <code>/etc/init.d/postfix reload</code> makes postfix aware of the changes and it is able to handle incoming mails for the virtual users.</p>
<p>To tell dovecot how to handle virtual users I had to make the following changes to <code>/etc/dovecot/dovecot.conf</code>:</p>
<p><code>mail_location = maildir:/var/mail/vmail/%u</code></p>
<pre>auth default {  mechanisms = plain digest-md5  passdb passwd-file {

Â   # Path for passwd-file

Â   args = /etc/dovecot/passwd

Â  }

userdb passwd-file {

Â    # Path for passwd-file

Â    args = /etc/dovecot/users

Â  }

}</pre>
<p>In the two configured files I added the entries required for the authorization of the virtual users. The file <code>/etc/dovecot/users</code> looks like<br />
<code><br />
tom@domain1.com::1001:1001::/var/mail/vmail/tom@domain1.com/:/bin/false::<br />
tom@domain2.com::1001:1001::/var/mail/vmail/tom@domain2.com/:/bin/false::<br />
jim@domain2.com::1001:1001::/var/mail/vmail/jim@domain2.com/:/bin/false::</code></p>
<p>Here <code>1001</code> again is the ID of the user <code>vmail</code>. By using the dovecot password tool I created the entries for <code>/etc/dovecot/passwd</code>:</p>
<p><code>dovecotpw -u tom</code></p>
<p>The generated password hash has to be copied into the file <code>/etc/dovecot/passwd</code>:</p>
<p><code>tom@domain1.com:5tA1zgMfhrE4U<br />
tom@domain2.com:BUJC6K1tPPNxc<br />
jim@domain2.com:YpdhuPLRTRuqg</code></p>
<p>After reloading the configuration of dovecot it was able to authenticate the virtual users and to find their mail directory.</p>
<h2>Maildrop</h2>
<p>Because I want to sort my incoming mails into different IMAP folders automatically on the server I decided to use maildrop. I installed the Debian maildrop package by calling</p>
<p><code>apt-get install maildrop</code></p>
<p>I added the following two lines to <code>/etc/postfix/main.cf</code></p>
<p><code>maildrop_destination_recipient_limit = 1<br />
virtual_transport = maildrop</code></p>
<p>and removed the line</p>
<p><code>virtual_transport = virtual</code></p>
<p>to tell postfix to delivery mail through maildrop. Additionally I had to include the following in the <code>master.cf</code></p>
<pre>maildropÂ  unixÂ  -Â Â Â Â Â Â  nÂ Â Â Â Â Â  nÂ Â Â Â Â Â  -Â Â Â Â Â Â  -Â Â Â Â Â Â  pipe

flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${recipient}</pre>
<p>When a mail is delivery maildrop looks into the home directory of the user for a file named <code>.mailfilter</code> so I created this file in <code>/home/vmail</code> with the following content:</p>
<pre>DEFAULT="/var/mail/vmail/$1/"

exception {
Â  include "$HOME/mailfilters/$1"
}
to $DEFAULT</pre>
<p>This configuration tells maildrop to look into the folder <code>mailfilters</code> for special configurations for a virtual users or to put the mail to its default directory. In the directory <code>/home/vmail/mailfilters</code> I created the files for the virtual mail users like <code>tom@domain1.com</code>:</p>
<pre>if (/^X-Spam-Flag:.*YES/)
{
Â  exception {
Â    to "$DEFAULT/.spam/"
Â  }
}

if (/^Subject.*LogWatch/ || /^Subject.*Cron/ )
{
Â  exception {
Â    to "$DEFAULT/.logwatch/"
Â  }
}</pre>
<p>Now every mail that is tagged by spamassassin with the <code>X-Spam-Flag</code> header is placed into the IMAP folder called <code>spam</code> and mails with a subject containing â€œLogWatchâ€ are placed in the folder <code>logwatch</code>.</p>
<h2>SASL</h2>
<p>Sending mail through the server that is configured as the MX for a domain reduces the chance that it is mistaken for spam a lot. To allow me to not only receive email with my mailserver but to send my email through it I configured SASL for  secure access and to block all other invalid users.</p>
<p>The packages are installed by the following command line:</p>
<p><code>apt-get install postfix libsasl2 sasl2-bin libsasl2-modules libdb3-util</code></p>
<p>The following lines needed to be added to <code>/etc/postfix/main.cf</code>:</p>
<p><code>smtpd_sasl_auth_enable = yes<br />
smtpd_recipient_restrictions =<br />
permit_mynetworks,<br />
permit_sasl_authenticated,<br />
reject_unauth_destination,<br />
check_policy_service inet:127.0.0.1:60000</code><code><br />
smtpd_sasl_authenticated_header = yes<br />
broken_sasl_auth_clients = yes<br />
smtpd_sasl_security_options = noanonymous</code></p>
<p>Then I created the file <code>/etc/postfix/sasl/smtpd.conf</code> containing the following two lines:</p>
<p><code>pwcheck_method: saslauthd<br />
mech_list: plain login</code></p>
<p>and I created a directory for the SASL daemon:<br />
<code><br />
mkdir -p /var/spool/postfix/var/run/saslauthd</code></p>
<p>This directory is defined in /etc/defaults/saslauthd with<br />
<code><br />
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"</code></p>
<h2>Finished</h2>
<p>This is the complete setup of my mail system. If you got any questions or hints to improve it please let me know it in your comments.</p>
<p>On last tip: It is helpful to test your system while going through the steps above. Therefor I used a testmail written into a file that looks like the this:</p>
<p><code>HELO test.local<br />
MAIL FROM:test@local<br />
RCPT TO:tom<br />
DATA<br />
Subject: testsubject<br />
From: test@local<br />
To: tom</code></p>
<p><code>Hello,<br />
This is a Test<br />
Goodbye<br />
.<br />
QUIT</code></p>
<p>By saving this text into a file, named testmail for example, it is possible to do a quick test of your mail system by executing</p>
<p><code>cat testmail | telnet localhost 25</code></p>
<p>which makes postfix receive the mail, send it through the configured chain and stores it in the appropriate user accounts inbox.</p>
<p>For further information see the following list of sites. These are the sources I used to create my how to:</p>
<p><a href="http://www.howtoforge.com/linux_postfix_virtual_hosting">http://www.howtoforge.com/linux_postfix_virtual_hosting</a><br />
<a href="http://blogbound.com/etch-postfix-spamassassin-vps">http://blogbound.com/etch-postfix-spamassassin-vps</a><a href="http://www.howtoforge.com/linux_postfix_virtual_hosting"><br />
http://postfix.wiki.xs4all.nl/index.php?title=Combine_With_Maildrop_Howto</a><a href="http://www.howtoforge.com/perfect_setup_debian_etch_p5"><br />
</a><a href="http://www.howtoforge.com/perfect_setup_debian_etch_p5">http://www.howtoforge.com/perfect_setup_debian_etch_p5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2008/02/13/mail-server-setup-for-debian-etch/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Get rid of useless Windows restrictions</title>
		<link>http://dertompson.com/2007/12/16/get-rid-of-windows-restrictions/</link>
		<comments>http://dertompson.com/2007/12/16/get-rid-of-windows-restrictions/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 18:00:53 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://dertompson.com/index.php/2007/12/16/get-rid-of-windows-restrictions/</guid>
		<description><![CDATA[Sometimes you have to accomplish work on a windows PC where you do not have administrator privileges. This can be quite frustrating if you are a power user and you are used to your shortcuts and tools. Here are some tips to get rid of useless limitations some system administrators may have configured to your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dertompson.com/wp-content/uploads/2007/12/lock.png" class="alignright" alt="Lock" />Sometimes you have to accomplish work on a windows PC where you do not have administrator privileges. This can be quite frustrating if you are a power user and you are used to your shortcuts and tools. Here are some tips to get rid of useless limitations some system administrators may have configured to your workstation.</p>
<p>To adapt the system to your needs you have to use two tools:</p>
<ol>
<li>
<p style="margin-bottom: 0cm">The group policy editor. To open 	it run <code>gpedit.msc</code> from the command line.</p>
</li>
<li>The Registry editor which may be started by executing regedit 	from the command line. If you get the message that you are not 	allowed to change registry keys you first have to use the Group 	Policy editor to set the value of <code>"Prevent access to 	registry editing tools"</code> under <code>User Configuration 	-&gt; Administrative Templates -&gt; System</code> to <code>Disabled</code>.</li>
</ol>
<p>Most of the following changes can be done by using the Group Policy editor or the registry editor, choose your preferred method.</p>
<ul>
<li>
<p style="margin-bottom: 0cm">No &#8220;Run&#8230;&#8221; entry in 	your start menu &#8211; I do not ask myself why this should be disabled 	but all you have to do is to open the registry and go to 	<code>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer</code>. 	There change the value of <code>NoRun</code> to <code>0</code>. In 	the group policy editor you have to set <code>"Remove Run menu 	from Start Menu"</code> under <code>User Configuration -&gt; 	Administrative Templates -&gt; Start Menu and Taskbar</code> to 	<code>Disabled</code>.</p>
</li>
<li>
<p style="margin-bottom: 0cm">One of my favorite keyboard 	shortcut is Windows-Key + E to launch the Windows Explorer. I found 	out that it not work if the Control Panel is not shown in the Start 	Menu. To enable the shortcut go to <code>User Configuration -&gt; 	Administrative Templates -&gt; Control Panel</code> in the Group 	Policy editor and disable â€œProhibit access to the Control Panelâ€</p>
</li>
<li>
<p style="margin-bottom: 0cm">To allow you to configure the 	Internet Explorer if you need it for testing web applications you 	can enable the Internet Options dialog under <code>User 	Configuration -&gt; Administrative Templates -&gt; Windwos 	Components -&gt; Internet Explorer -&gt; Internet Control Panel</code></p>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2007/12/16/get-rid-of-windows-restrictions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KeePass for BlackBerry (finally)</title>
		<link>http://dertompson.com/2007/10/16/keepass-for-blackberry-finally/</link>
		<comments>http://dertompson.com/2007/10/16/keepass-for-blackberry-finally/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 16:59:37 +0000</pubDate>
		<dc:creator>tompson</dc:creator>
				<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dertompson.com/index.php/2007/10/16/keepass-for-blackberry-finally/</guid>
		<description><![CDATA[Today a version of KeePass was released that works on BlackBerry devices. KeePass is a free, OpenSource password manager. It comes with a desktop client and (thats the best part) can be synchronized with the BlackBerry. I am currently using MiniSafe Desktop which I purchased two years ago for 29 USD from Handango. I am [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dertompson.com/wp-content/uploads/2007/10/screenshot_thumb.jpg" class="alignleft" alt="KeePass Screenshot" />Today a <a href="http://keepass.info/download.html">version of KeePass was released</a> that <a href="http://www.rimarkable.com/keepass-password-safe-for-blackberry">works on BlackBerry devices</a>. KeePass is a free, OpenSource password manager. It comes with a desktop client and (thats the best part) can be synchronized with the BlackBerry.</p>
<p>I am currently using <a href="http://www.simprit.com/minisafe_bb/">MiniSafe Desktop</a> which I purchased two years ago for 29 USD from Handango. I am satisfied with it but I will give KeePass a try because it looks like it has all the features of MiniSafe Desktop but comes for free. I had to reactivate it every time I switched my BlackBerry (which was three times in two years) and it took three days every time to get a new key.</p>
]]></content:encoded>
			<wfw:commentRss>http://dertompson.com/2007/10/16/keepass-for-blackberry-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
