<?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>Axeorcat.com</title>
	<atom:link href="http://www.axeorcat.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.axeorcat.com</link>
	<description>Would you prefer to be an axe or a cat? That is the question. //  I Code. I Sysadmin. I Beer.</description>
	<lastBuildDate>Wed, 01 Sep 2010 17:41:39 +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>Upgrading from Karmic to Lucid Desktop i386</title>
		<link>http://www.axeorcat.com/339-upgrading-from-karmic-to-lucid-desktop-i386</link>
		<comments>http://www.axeorcat.com/339-upgrading-from-karmic-to-lucid-desktop-i386#comments</comments>
		<pubDate>Wed, 12 May 2010 16:33:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=339</guid>
		<description><![CDATA[Upgrading standard desktop version takes about 2 hours on a trusty old Dell 2650 server. Got the message that bluetooth and a bunch of other packages are no longer supported by the Ubuntu team. Presume this is mostly just package restructuring  &#8211; bluetooth is in the linux kernel as I understand it.
TIP: to enable [...]]]></description>
			<content:encoded><![CDATA[<p>Upgrading standard desktop version takes about 2 hours on a trusty old Dell 2650 server. Got the message that bluetooth and a bunch of other packages are no longer supported by the Ubuntu team. Presume this is mostly just package restructuring  &#8211; bluetooth is in the linux kernel as I understand it.</p>
<p>TIP: to enable the official <strong>Sun Java JDK </strong>on Lucid Linux you have to enable the <strong>partner</strong> repository in your /etc/apt/sources.list file.</p>
<p>Then you can simply</p>
<pre>aptitude install sun-java6-jdk</pre>
<p>as normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/339-upgrading-from-karmic-to-lucid-desktop-i386/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple patch allows correct permissions for auto install of Wordpress plugins</title>
		<link>http://www.axeorcat.com/329-simple-patch-allows-correct-permissions-for-auto-install-of-wordpress-plugins</link>
		<comments>http://www.axeorcat.com/329-simple-patch-allows-correct-permissions-for-auto-install-of-wordpress-plugins#comments</comments>
		<pubDate>Fri, 30 Apr 2010 14:49:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=329</guid>
		<description><![CDATA[This problem comes up now and again:

you want to use the Wordpress web admin interface to install plugins/themes etc
your webserver user correctly has write access to the wp-content directory as documented (you probably set it group writeable)
Wordpress fails to perform the install (and instead asks you for your FTP details instead as a fallback)

Why does [...]]]></description>
			<content:encoded><![CDATA[<p>This problem comes up now and again:</p>
<ul>
<li>you want to use the Wordpress web admin interface to install plugins/themes etc</li>
<li>your webserver user correctly has write access to the wp-content directory as documented (you probably set it group writeable)</li>
<li>Wordpress fails to perform the install (and instead asks you for your FTP details instead as a fallback)</li>
</ul>
<p>Why does this happen?</p>
<p>The problem is a well known bug in the Wordpress code in function <strong>get_filesystem_method</strong>(). This function contains a call to <strong>getmyuid</strong>() and compares the result to the owner of a temp file it creates.</p>
<p>To fix this Wordpress problem, one simple fix is:</p>
<ul>
<li>edit the file <strong>wp-admin/includes/file.php</strong> (make a backup of  this file just in case)</li>
<li>search for the text &#8220;<strong>getmyuid</strong>&#8221; and replace all occurrences  with &#8220;<strong>posix_getuid</strong>&#8220;</li>
</ul>
<p>Your upgrade or install should then work fine by simply setting the correct write permissions on the content folder and subfolders (e.g. &#8220;chmod -R g+w wp-content&#8221;). This is just a hack but is a simple way to get things working.</p>
<h2>More details below for anyone who&#8217;s interested</h2>
<p>The WP code tries to test if the webserver user is equal to the owner of the   Wordpress core code files. This fails as the owner of the core Wordpress code files in many setups will often not be the same as the owner of dynamically web-server created files (for security in fact it should not be. If it was, any bug or malicious feature in any plugin, or within Wordpress itself, would be able to completely overwrite any or all of the Wordpress core software).</p>
<p>This is probably (a) because they share this function to see if the whole installation can be upgraded and/or (b) because they assume all the WP code tree will be owned by the same user/group.</p>
<p>It would be more intuitive if the WP plugin &#038; themse install/upgrade code actually called  a different function to simply see if the relevant folder can be written to rather than the main core code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/329-simple-patch-allows-correct-permissions-for-auto-install-of-wordpress-plugins/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup a central Git repository</title>
		<link>http://www.axeorcat.com/324-setup-a-central-git-repository</link>
		<comments>http://www.axeorcat.com/324-setup-a-central-git-repository#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:14:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=324</guid>
		<description><![CDATA[On the server side create a repo with files then fetch it into a bare repo which becomes our central repo.

mkdir repo
cp -r /tmp/myproject repo/myproject
cd repo
mkdir myproject.git
cd myproject.git
git --bare init
git --bare fetch ../myprojectmaster:master
git config --global user.name scuadm
git config --global user.email scuadm@localhost
rm -rf ../myproject

]]></description>
			<content:encoded><![CDATA[<p>On the server side create a repo with files then fetch it into a bare repo which becomes our central repo.</p>
<pre>
mkdir repo
cp -r /tmp/myproject repo/myproject
cd repo
mkdir myproject.git
cd myproject.git
git --bare init
git --bare fetch ../myprojectmaster:master
git config --global user.name scuadm
git config --global user.email scuadm@localhost
rm -rf ../myproject
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/324-setup-a-central-git-repository/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How big (diskspace wise) is a basic but functional linux server install?</title>
		<link>http://www.axeorcat.com/320-how-big-is-a-basic-but-functional-linux-server-install</link>
		<comments>http://www.axeorcat.com/320-how-big-is-a-basic-but-functional-linux-server-install#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:32:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=320</guid>
		<description><![CDATA[I have a Debian Lenny server that has apache/php installed and a bunch of other standard tools (tcpdump etc) but no database.
The server files (and I&#8217;m guessing reserved blocks) come to a total of 1.27GB.


pe7:/# du -sm /*
5       /bin
23      /boot
0     [...]]]></description>
			<content:encoded><![CDATA[<p>I have a Debian Lenny server that has apache/php installed and a bunch of other standard tools (tcpdump etc) but no database.</p>
<p>The server files (and I&#8217;m guessing reserved blocks) come to a total of <strong>1.27GB</strong>.</p>
<pre>

pe7:/# du -sm /*
5       /bin
23      /boot
0       /cdrom
1       /dev
5       /etc
1       /home
0       /initrd.img
0       /initrd.img.old
122     /lib
1       /lost+found
1       /media
1       /mnt
1       /opt
1       /root
3       /sbin
1       /selinux
0       /sys
1       /tmp
575     /usr
547     /var
0       /vmlinuz
0       /vmlinuz.old
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/320-how-big-is-a-basic-but-functional-linux-server-install/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Birthday Hardy Heron!</title>
		<link>http://www.axeorcat.com/281-happy-birthday-hardy-heron</link>
		<comments>http://www.axeorcat.com/281-happy-birthday-hardy-heron#comments</comments>
		<pubDate>Tue, 20 Apr 2010 19:33:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=281</guid>
		<description><![CDATA[Ubuntu Hardy Heron was well named (luckily!). 
Hardy has definitely been the most reliable Ubuntu release for me so far. 
Hardy has performed robustly for 2 years for me since April 2008 and still going strong in daily use in 2010. Yes, I still use it on (a) my development server and (b) a Tecra [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Ubuntu Hardy Heron</strong> was well named (luckily!). </p>
<p>Hardy has definitely been the most reliable Ubuntu release for me so far. </p>
<p>Hardy has performed robustly for 2 years for me since <strong>April 2008</strong> and still going strong in daily use in 2010. Yes, I still use it on (a) my <strong>development server</strong> and (b) a <strong>Tecra M5</strong> laptop. <em>Thanks Ubuntu for a decent LTS release</em>!</p>
<p>I did <em>try </em> each time to upgrade (or fresh install) my laptop to both <strong>Intrepid </strong>and <strong>Jaunty</strong> when they came out&#8230;but they both failed either to install or work properly, leaving me reaching for my trusty <strong>Hardy LTS </strong>disk to do a restore. </p>
<p>I didn&#8217;t bother with <strong>Karmic </strong>as <strong>Lucid </strong>should be out this month&#8230;and being an LTS I&#8217;m hoping it&#8217;ll be another star like Hardy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/281-happy-birthday-hardy-heron/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux vs FreeBSD PHP performance</title>
		<link>http://www.axeorcat.com/295-linux-vs-freebsd-php-performance</link>
		<comments>http://www.axeorcat.com/295-linux-vs-freebsd-php-performance#comments</comments>
		<pubDate>Tue, 20 Apr 2010 18:42:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=295</guid>
		<description><![CDATA[FreeBSD p04/p10 setup slower than single Linux p09 for some reason
Apache/Network seems same
From office to DC same performance on requesting small static file:  ab -n 100 -c 5 http://srv/robots.txt
On each server same performance requesting a smallish text file from  localhost on each machine itself : (ab -n 100 -c 5   http://dev.lan/100k.txt)
[dev-lin] Requests [...]]]></description>
			<content:encoded><![CDATA[<p>FreeBSD p04/p10 setup slower than single Linux p09 for some reason</p>
<p><strong>Apache/Network </strong>seems same</p>
<p>From office to DC same performance on requesting small static file:  ab -n 100 -c 5 http://srv/robots.txt</p>
<p>On each server same performance requesting a smallish text file from  localhost on each machine itself : (ab -n 100 -c 5   http://dev.lan/100k.txt)</p>
<p>[dev-lin] Requests per second:    1821.00</p>
<p>[p04-bsd] Requests per second:    1113.86</p>
<p>[p09-lin] Requests per second:    1197.81</p>
<p><strong>PG Bench</strong> &#8211; <strong>p10 is much faster</strong></p>
<p>pg_bench from p04 shows the p10 Freebsd db server is <em>much faster </em>at  network queries than the p09 Linux server</p>
<p><strong>Basic standalone PHP test &#8211; p04 (FreeBSD) is much faster<br />
</strong></p>
<p>office -&gt; p09  10.3 per second -   ab -n 10 -c 5  http://srv/test-pg.php?dbhost=localhost</p>
<p>p09 local 14 per second ab -n 10 -c 5  http://srv/test-pg.php?dbhost=localhost</p>
<p>p04-&gt;p09 13 per second</p>
<p>p04 local 80 per second!!</p>
<p><strong>Full Complex Page</strong> &#8211; p09 faster</p>
<p>ab -n 10 -c 5 http://srv/full.php</p>
<p>p09 local &#8211; 2.89 per second</p>
<p>p04 local &#8211; 2.72 per second</p>
<p><strong>Full Home Page</strong> &#8211; p09 faster<strong><br />
</strong></p>
<p>ab -n 10 -c 5 http://srv/</p>
<p>p04 local 1.54 per second</p>
<p>p09 local 2.4 per second</p>
<p>p09 local 2.6 per second (no open_basedir)</p>
<p>p04 local no openbasedir 3.88 per second</p>
<p>During long stress tests, with open_basedir enabled p04 at 15/85%CPU</p>
<p>whilst p10 is at just 6/1% CPU (user/sys)</p>
<p>p04 apache taking <strong>27m </strong>/ p10 pg taking <strong>40m</strong><br />
p09 apache takes <strong>29m </strong>/ pg takes <strong>26m</strong></p>
<p>Tried changing accept, php settings, disabling modules etc but no  effect.</p>
<p>BUT openbasedir did it!! Went to 3.88 per second.</p>
<p>So there you have it:<strong> on FreeBSD, &#8220;openbasedir&#8221; will kill your PHP performance for a complex PHP application.</strong> Disable it, and you&#8217;ll be 50% faster than Linux in this case (caveat: not a like for like comparison as the servers in this test are differently spec&#8217;d and in fact my tests elsewhere show Linux is generally faster for my uses especially if building from source).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/295-linux-vs-freebsd-php-performance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beauty of Maths</title>
		<link>http://www.axeorcat.com/91-beauty-of-maths</link>
		<comments>http://www.axeorcat.com/91-beauty-of-maths#comments</comments>
		<pubDate>Thu, 08 Apr 2010 15:39:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=91</guid>
		<description><![CDATA[[ reproduced from an email I got ]
Beauty of Maths!
1 x 8 + 1 = 9
12 x 8 + 2 = 98
123 x 8 + 3 = 987
1234 x 8 + 4 = 9876
12345 x 8 + 5 = 98765
123456 x 8 + 6 = 987654
1234567 x 8 + 7 = 9876543
12345678 x 8 + [...]]]></description>
			<content:encoded><![CDATA[<p>[ reproduced from an email I got ]</p>
<p>Beauty of Maths!</p>
<p>1 x 8 + 1 = 9<br />
12 x 8 + 2 = 98<br />
123 x 8 + 3 = 987<br />
1234 x 8 + 4 = 9876<br />
12345 x 8 + 5 = 98765<br />
123456 x 8 + 6 = 987654<br />
1234567 x 8 + 7 = 9876543<br />
12345678 x 8 + 8 = 98765432<br />
123456789 x 8 + 9 = 987654321</p>
<p>1 x 9 + 2 = 11<br />
12 x 9 + 3 = 111<br />
123 x 9 + 4 = 1111<br />
1234 x 9 + 5 = 11111<br />
12345 x 9 + 6 = 111111<br />
123456 x 9 + 7 = 1111111<br />
1234567 x 9 + 8 = 11111111<br />
12345678 x 9 + 9 = 111111111<br />
123456789 x 9 +10= 1111111111</p>
<p>9 x 9 + 7 = 88<br />
98 x 9 + 6 = 888<br />
987 x 9 + 5 = 8888<br />
9876 x 9 + 4 = 88888<br />
98765 x 9 + 3 = 888888<br />
987654 x 9 + 2 = 8888888<br />
9876543 x 9 + 1 = 88888888<br />
98765432 x 9 + 0 = 888888888</p>
<p>Brilliant, isn&#8217;t it?</p>
<p>And finally, take a look at this symmetry:</p>
<p>1 x 1 = 1<br />
11 x 11 = 121<br />
111 x 111 = 12321<br />
1111 x 1111 = 1234321<br />
11111 x 11111 = 123454321<br />
111111 x 111111 = 12345654321<br />
1111111 x 1111111 = 1234567654321<br />
11111111 x 11111111 = 123456787654321<br />
111111111 x 111111111=12345678987654321 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/91-beauty-of-maths/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Phone SAR values</title>
		<link>http://www.axeorcat.com/57-mobile-phone-sar-values</link>
		<comments>http://www.axeorcat.com/57-mobile-phone-sar-values#comments</comments>
		<pubDate>Mon, 29 Mar 2010 17:30:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=57</guid>
		<description><![CDATA[sar (all 2w/kg values):
n96 rm-247 2w/kg 0.91
n96 rm-297 2w/kg 0.87
n96 rm-472 2w/kg 0.82
nokia 6650 0.64 GPS
nokia 5310 0.98 &#8211; 1.07  £99
nokia 6300 0.57 &#8211; 0.63   £80 good review, nice phone, no GPS
nokia 6300i 0.97
Nokia 6600 (NHL-10) 0.80
Nokia 6600 Slide(RM-414) 0.44
Sony 760i 0.53 freezin phone
]]></description>
			<content:encoded><![CDATA[<p>sar (all 2w/kg values):</p>
<p>n96 rm-247 2w/kg 0.91<br />
n96 rm-297 2w/kg 0.87<br />
n96 rm-472 2w/kg 0.82</p>
<p>nokia 6650 0.64 GPS<br />
nokia 5310 0.98 &#8211; 1.07  £99<br />
nokia 6300 0.57 &#8211; 0.63   £80 good review, nice phone, no GPS<br />
nokia 6300i 0.97</p>
<p>Nokia 6600 (NHL-10) 0.80<br />
Nokia 6600 Slide(RM-414) 0.44</p>
<p>Sony 760i 0.53 freezin phone</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/57-mobile-phone-sar-values/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business Plan Questions To Consider</title>
		<link>http://www.axeorcat.com/18-business-plan</link>
		<comments>http://www.axeorcat.com/18-business-plan#comments</comments>
		<pubDate>Sat, 27 Feb 2010 17:54:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=18</guid>
		<description><![CDATA[Q: What do investors look for in a business plan?
A: A clear understanding of the business. How do you plan to make money? How much money is required? Why is your company unique? Why can it overcome much larger and better financed competition? What does the competition look like, both startup and large company competition? [...]]]></description>
			<content:encoded><![CDATA[<p>Q: What do investors look for in a business plan?</p>
<p>A: A clear understanding of the business. How do you plan to make money? How much money is required? Why is your company unique? Why can it overcome much larger and better financed competition? What does the competition look like, both startup and large company competition? Who are the people in your team? What are their complete backgrounds? What is the company going to focus on?</p>
<p>Q: How seriously do investors take the business plan?</p>
<p>A: Very seriously. The business plan includes your business model, your team, your competition, all of which can be the difference between success and failure in business.</p>
<p>Q: Which sections of the business plan are the most interesting for investors?</p>
<p>A: The people are the most important. The business model is often very critical. The competition discussion is always important. We understand that the best people can overcome almost anything. We also believe that a large market, and large margins can be somewhat forgiving.</p>
<p>*       What business is the company in?<br />
*       What is the company&#8217;s mission?<br />
*       Is the idea powerful enough to be the solid foundation of a big business or could it simply end up as a feature of someone else&#8217;s product?<br />
*       Is the path to market plausible for a new entrant?<br />
*       How will the company be financed, not only initially but all the way to self-sufficiency?<br />
*       What are the key milestones that must be achieved on the company&#8217;s path to success?<br />
*       How will the company be valued if it is successful?<br />
*       What is the likely exit strategy for investors?</p>
<p>*       How long will it take for the business to generate $100 million in annual sales?<br />
*       What market share will it have to obtain to achieve those levels of sales?<br />
*       What size organization will have to be built to achieve these sales levels?<br />
*       At what stage does the business become profitable?<br />
*       Who are the key competitors?<br />
*       How is the new company going to effectively compete with incumbents and new entrants?</p>
<p>*       What evidence is there to suggest that there is a pressing need for the solution?<br />
*       What cost would customers attribute to this problem and what value to the proposed solution?<br />
*       How is this need being addressed currently and why is this not sufficient?<br />
*       Has this need been recognized by industry groups, standards bodies and incumbent vendors?<br />
*       How significant and costly is the change required to embrace the proposed solution?</p>
<p>*       What value do customers place on a solution to the problem the company is addressing?<br />
*       What departments and officers have budgets specifically allocated to solving the problem?<br />
*       How will the customer&#8217;s job change if the problem is solved?<br />
*       How long is the sales cycle?<br />
*       What are the customer&#8217;s key criteria in making a purchase decision?</p>
<p>*       If the need the company is addressing is so great, why is no one else offering a compelling solution?<br />
*       Are the product&#8217;s advantages compelling enough to outweigh the customer s preference for continuing to deal with its existing, established vendors?<br />
*       What is the source of the company&#8217;s differentiation?<br />
*       How can this source of differentiation be protected and enhanced over a long period of time?</p>
<p>*       What are the key risks facing the business?<br />
*       Which of these risks could be fatal to the business?<br />
*       What partnerships could help the company mitigate and address these risks?<br />
*       What alternative paths are available to the company if a major risk materializes?</p>
<p>*       How will the company conserve cash and get all of its employees to think like owners of the business?<br />
*       How will the headcount grow over the next 18-24 months?<br />
*       Which companies are likely to be the best sources of talent to recruit?<br />
*       What compensation packages does the company intend to offer employees at various levels of the organization?<br />
*       Are the incentives of key executives, founders and investors aligned?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/18-business-plan/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create linux email account without shell account &#8211; Postfix/Dovecot virtual user setup</title>
		<link>http://www.axeorcat.com/231-how-to-setup-postfixdovecot-in-virtual-mode</link>
		<comments>http://www.axeorcat.com/231-how-to-setup-postfixdovecot-in-virtual-mode#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:45:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.axeorcat.com/?p=231</guid>
		<description><![CDATA[We want a virtual mail server setup i.e. we don&#8217;t want to have to create linux accounts on our server for every mailbox (for security and maintenance reasons).

Tell Postfix to use virtual mailboxes under a single vmail linux user/group with mail stored in maildir format under /home/vmail (Refs: http://www.postfix.org/VIRTUAL_README.html and ubuntu.

In main.cf comment out the [...]]]></description>
			<content:encoded><![CDATA[<p>We want a virtual mail server setup i.e. we don&#8217;t want to have to create linux accounts on our server for every mailbox (for security and maintenance reasons).</p>
<p>
Tell Postfix to use virtual mailboxes under a single vmail linux user/group with mail stored in maildir format under /home/vmail (Refs: <a href="http://www.postfix.org/VIRTUAL_README.html">http://www.postfix.org/VIRTUAL_README.html</a> and <a href="https://help.ubuntu.com/community/PostfixVirtualMailBoxClamSmtpHowto">ubuntu</a>.
</p>
<p>In main.cf comment out the mailbox_command line and setup the following:</p>
<pre>
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = /etc/postfix/vdomains
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/valiasmaps
home_mailbox = Maildir/
#mailbox_command = procmail -a "$EXTENSION"
</pre>
<p>Then we will create these files:</p>
<ul>
<li>/etc/postfix/vdomains &#8211; contains each domain we want to process email for</li>
<li>/etc/postfix/valiasmaps &#8211; contains emails we want to forward to local or remote accounts (on change run &#8220;postmap valiasmaps&#8221;)</li>
<li>/etc/postfix/vmailbox &#8211; contains emails to be stored on this machine, defining the filesystem path for them (on change run &#8220;postmap vmailbox &#8220;)</li>
</ul>
<p>Ok so now Postfix will store/forward incoming mail, but we need to tell dovecot to authenticate against plain files in dovecot.conf.</p>
<pre>
mail_location = maildir:/home/vmail/%d/%n
disable_plaintext_auth = no
passdb passwd-file {
  args = /etc/dovecot/passwd
}
userdb passwd-file {
  args = /etc/dovecot/users
}
</pre>
<p>Maintenance:</p>
<ul>
<li>Each forwarded email address should be added to valiasmaps (+ run postmap)</li>
<li>Each locally managed email address must be added to vmailbox (+ run postmap), and to dovecot&#8217;s passwd &amp; users file</li>
</ul>
<p>The Server Files</p>
<p><strong>/etc/dovecot/users</strong></p>
<pre>
contact@mydomain.com::5000:5000::/home/vmail/mydomain.com/:/bin/false::
</pre>
<p><strong>/etc/dovecot/passwd</strong></p>
<pre>
contact@mydomain.com:$1$sPOUe4qI$v1ai6yA/RPiiW9AlArdoa0
</pre>
<p><strong>/etc/postfix/vmailbox</strong></p>
<pre>
# Define locally stored virtual email accounts here, one email account per line
# * First column is the public email address
# * Second column is the relative storage folder
# The folder format should match what you setup in the dovecot conf

contact@mydomain.com  ansdb.com/contact/
</pre>
<p><strong>/etc/postfix/vdomains</strong></p>
<pre>
# List all domains that this server will accept mail for
mydomain.com
</pre>
<p><strong>/etc/postfix/valiasmaps</strong></p>
<pre>
# Define virtual address to account.
# * First column is the public email address
# * Second column is a local unix account or another email address to forward to

postmaster@mydomain.com postmaster
contact@mydomain.com  bob@example.org
</pre>
<p>Little script to help out.</p>
<pre>
# save this as "adddovecotuser.sh"
echo "$1" &gt; /tmp/user
user=`cat /tmp/user | cut -f1 -d "@"`
domain=`cat /tmp/user | cut -f2 -d "@"`
echo "$user@$domain::5000:5000::/home/vmail/$domain/:/bin/false::" &gt;&gt; /etc/dovecot/users
</pre>
<p>You can create Maildir directories like this by hand</p>
<pre>
/usr/bin/maildirmake.dovecot /home/vmail/$domain/$user 5000:5000
</pre>
<pre>
# save this as "mkdovecotpasswd.sh"
mkpasswd --hash=md5 $2  &gt; /tmp/hash
echo "$1:`cat /tmp/hash`" &gt;&gt; /etc/dovecot/passwd
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.axeorcat.com/231-how-to-setup-postfixdovecot-in-virtual-mode/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
