<?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>Switching... &#187; Unix</title>
	<atom:link href="http://switch.richard5.net/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://switch.richard5.net</link>
	<description>How to build your Mac into a internet server using open source software</description>
	<lastBuildDate>Mon, 25 May 2009 14:13:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Find out the UID and GID of a user</title>
		<link>http://switch.richard5.net/2005/12/11/find-out-the-uid-and-gid-of-a-user/</link>
		<comments>http://switch.richard5.net/2005/12/11/find-out-the-uid-and-gid-of-a-user/#comments</comments>
		<pubDate>Sun, 11 Dec 2005 13:28:16 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[Courier]]></category>
		<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=48</guid>
		<description><![CDATA[For Postfix and Courier IMAP configuration you need to find out the UID and the GID number for the postfix user on your server (you need the information here and here in our ISP in a box project). Because of rights management and permissioning both Postfix and Courier IMAP need the correct user and group [...]]]></description>
			<content:encoded><![CDATA[<p>For Postfix and Courier IMAP configuration you need to find out the UID and the GID number for the postfix user on your server (you need the information <a href="http://switch.richard5.net/isp-in-a-box-using-a-mac-mini/configuring-the-mail-server/configuring-postfix-with-virtual-domains-using-mysql/">here</a> and <a href="http://switch.richard5.net/isp-in-a-box-using-a-mac-mini/configuring-the-mail-server/configuring-the-courier-auth-module/">here</a> in our ISP in a box project). Because of rights management and permissioning both Postfix and Courier IMAP need the correct user and group id to access the virtual maibox directory. The information is not in the default User management System Preference panel as postfix is a system user and not a &#8216;normal&#8217; user. <span id="more-48"></span></p>
<p>You can find this out by starting up the application Netinfo Manager which you can find in the Applications/Utilities folder. Start it up and you see the panel as shown in the image below.</p>
<p><img src="/wp-images/netinfo.gif" alt="The Netinfo Manager application" /></p>
<p>Click on users and then in the next panel click on postfix, in the panel below you will see all the information for that user. With this method you see in the bottom panel the UID and the GID for the postfix user. On the systems I have it was always 27 but I do not know if this is always the case. </p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=48&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_48" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/12/11/find-out-the-uid-and-gid-of-a-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Courier-imap configured with Courier authentication library via MySQL</title>
		<link>http://switch.richard5.net/2005/10/10/courier-imap-configured-with-courier-authentication-library-via-mysql/</link>
		<comments>http://switch.richard5.net/2005/10/10/courier-imap-configured-with-courier-authentication-library-via-mysql/#comments</comments>
		<pubDate>Mon, 10 Oct 2005 20:17:53 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[Courier]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=18</guid>
		<description><![CDATA[Again I made some small progress in getting a fully functional IMAP based mail server running on my Mac mini. After getting Postfix compiled with MySQL support I needed to get started on the IMAP end of things. First downloading the source code as I couldn&#8217;t find any ready made packages I could just install. [...]]]></description>
			<content:encoded><![CDATA[<p>Again I made some small progress in getting a fully functional IMAP based mail server running on my Mac mini. After getting Postfix compiled with MySQL support I needed to get started on the IMAP end of things.</p>
<p>First downloading the source code as I couldn&#8217;t find any ready made packages I could just install. You can get Courier IMAP from <a href="http://www.courier-mta.org/imap/">here</a> and the authentication library from <a href="http://www.courier-mta.org/authlib/">here</a>. I used version 4.0.6 of the IMAP server and version 0.57 of the authlib daemon.</p>
<p>The authlib daemon was as easy as ./configure, make and then as root do a &#8216;make install&#8217; and &#8216;make install-configure&#8217; and then tweak some of the configuration files. The IMAP server took more effort. It needed some parameters during the configuration stage, I took some values on a best guess effort but I still need to find out what they do exactly. I&#8217;ve got it compiled and running with:</p>
<pre class=blocked>
./configure --prefix=/usr/local --with-authpwd=YES  --without-authcram
make
make install</pre>
<p>Now I can read my emails from the server, still needed some configuration tweaking but more on that later. Still while trying to send mail to myself the mail address gets bounced in Postfix, I need to find out why. But to end on a positive note, my mail was copied into the send mail folder on the IMAP server !</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=18&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_18" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/10/10/courier-imap-configured-with-courier-authentication-library-via-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compiling Postfix with PCRE, SASL and MySQL support</title>
		<link>http://switch.richard5.net/2005/10/01/compiling-postfix-with-pcre-sasl-and-mysql-support/</link>
		<comments>http://switch.richard5.net/2005/10/01/compiling-postfix-with-pcre-sasl-and-mysql-support/#comments</comments>
		<pubDate>Sat, 01 Oct 2005 18:32:58 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=17</guid>
		<description><![CDATA[Finally found some spare time to have a look at how to compile Postfix on my Mac mini. When looking around for information on configuring Postifx on the Mac I also bookmarked all the information regarding compiling Postfix. Most of the info I found was out of date or targeted older versions. So I had [...]]]></description>
			<content:encoded><![CDATA[<p>Finally found some spare time to have a look at how to compile Postfix on my Mac mini. When looking around for information on configuring Postifx on the Mac I also bookmarked all the information regarding compiling Postfix. Most of the info I found was out of date or targeted older versions. So I had to combine and try out what still worked and what not. </p>
<p>By the way this is just a quick write down on the things I found out, it&#8217;s not a complete guide. I&#8217;m planning to write a step by step guide on how to compile and configure a proper Postfix mail server on your Mac mini. </p>
<p>Via some backdoor (can&#8217;t remember how I found it) located <a href="http://www.afp548.com/Articles/Panther/postfix211.html">this article</a> on <a href="http://www.afp548.com">AFP548.com</a>. It&#8217;s for an older version of Postfix and OS X (panther)  but it&#8217;s got some nice pointers on the stuff you have to do. You have to remember that I&#8217;m not an Unix guru and just have fumbled my own current Postfix installation into a working environment. This time it&#8217;s going to be a repeatable effort and I&#8217;m looking for all the info I can get.</p>
<p>I&#8217;m including PCRE into the Postfix build as well as it&#8217;s faster than regexp for contect filtering. I&#8217;m not sure if I&#8217;m going to use this but it was quite easy to do. It was as simple as downloading the source from <a href="http://www.pcre.org/">http://www.pcre.org/</a>, extracting, running ./configure, make and make install. Done.</p>
<p>Installing SASL was a bit more complex because of the compiler errors I got when trying to compile the latest release. But to cut a long  story short, I got it compiled when using version 2.1.18 of the source. I&#8217;ve still got to find out which is the latest version that compiles without a problem.</p>
<p>Compiling <a href="http://www.postfix.org">Postfix</a> was also not nuch of a problem. Just getting the latest version of the source (2.2.5 in this case) and getting the first make command working with the options needed. We wanted MySQL support (what all this effort was about) and include PCRE ad SASL. So you end up with a command looking like:</p>
<pre class=blocked>
make -f Makefile.init makefiles &#92;
CCARGS='-DUSE_SASL_AUTH -I/usr/local/include/sasl &#92;
-DHAS_MYSQL -I/Library/Mysql/include/mysql'  &#92;
AUXLIBS='-L/usr/lib -lldap -L/usr/lib -llber -L/usr/lib -lsasl2 &#92;
-L/Library/MySQL/lib/mysql -lmysqlclient -lz -lm'</pre>
<p>I&#8217;m using the <a href="http://www.serverlogistics.com/">Server Logistics</a> package for MySQL (<a href="http://switch.richard5.net/2005/09/07/apache-php-and-mysql-finally/">as told here</a>), if you are sing a package from a different source your path to the mysql.h file might be different. Please check it before compiling.</p>
<p>If the above make command worked for you then issue it, followed by a make and make update command and everything should be up to date and installed. To check if we got MySQL tables in this version run the following command and look for MySQL in the output:</p>
<pre class=blocked>
# postconf -m
btree
cidr
environ
hash
mysql
pcre
proxy
regexp
static
unix</pre>
<p>Next step is the IMAP server and configuration but that is for another time, now I&#8217;m happy I got this done. Just taking one step at a time.</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=17&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_17" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/10/01/compiling-postfix-with-pcre-sasl-and-mysql-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple&#8217;s Postfix and UW IMAP not the solution for me</title>
		<link>http://switch.richard5.net/2005/09/25/apples-postfix-and-uw-imap-not-the-solution-for-me/</link>
		<comments>http://switch.richard5.net/2005/09/25/apples-postfix-and-uw-imap-not-the-solution-for-me/#comments</comments>
		<pubDate>Sun, 25 Sep 2005 19:58:27 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=16</guid>
		<description><![CDATA[I&#8217;ve been trying to get Postfix with IMAP folders working on my Mac mini for some time now. I even got to the point where I was willing to spend money on the Postfix Enabler just to get it working. But yesterday I found out why this isn&#8217;t going to work for me, it&#8217;s all [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get <a href="http://www.postfix.org">Postfix</a> with IMAP folders working on my Mac mini for some time now. I even got to the point where I was willing to spend money on the <a href="http://www.cutedgesystems.com/software/PostfixEnabler/">Postfix Enabler</a> just to get it working. But yesterday I found out why this isn&#8217;t going to work for me, it&#8217;s all about user authentication and management. It seems that Postfix and <a href="http://www.washington.edu/imap/">UW IMAP</a> (the IMAP implementation from the Univesity of Washington) are build with Apple&#8217;s idea of user management. Which means that each user of my mail server must be created as an actual user on the Mac mini and can not be authorized or managed by a seperate administration. </p>
<p>I found this out while having a talk with Bernard Teo from <a href="http://www.cutedgesystems.com">CutEdgeSystems.com</a> on if the postfix enabler supported virtual domains. Bernard was and is one of the fastest email responders I ever encountered when asking support on a piece of software, he responded within 5 minutes. He explained that, despite claims in several forums that it wouldn&#8217;t work, I could configure virtual domains with the Postfix enabler as long as each user on each domain had a seperate mailbox and that was not what I was looking for. I want mailboxes for as many users as it takes while having just one user enabled on my Mac. It&#8217;s going to be a web server for many small domains and I want to be able to handle the e-mail traffic for all those domains with a minimum of hassle like I have on my current Debian servers.</p>
<p>I now will start looking for the best place to get the source code for Postfix with installation and configuration help. I guess that now I&#8217;m going to compile it I will use all the other features I wanted to use from the beginning like MySQL support and for the <a href="http://www.courier-mta.org/">Courier IMAP server</a>  , which in turn would mean that I can provide web based email services using <a href="http://www.squirrelmail.org/">SquirrelMail</a>.</p>
<p>Wish me luck&#8230;</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=16&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_16" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/09/25/apples-postfix-and-uw-imap-not-the-solution-for-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No standard MySQL support in Postfix package</title>
		<link>http://switch.richard5.net/2005/09/14/no-standard-mysql-support-in-postfix-package/</link>
		<comments>http://switch.richard5.net/2005/09/14/no-standard-mysql-support-in-postfix-package/#comments</comments>
		<pubDate>Wed, 14 Sep 2005 20:00:46 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=14</guid>
		<description><![CDATA[Bummer, I thought it was included in the default package, but somehow the configuration I used (copied from my Sun) didn&#8217;t work. I got an error message: postfix/pickup[11145]: fatal: unsupported dictionary type: mysql I started googling the error message and to find out how I could see which kind of lookup tables are support in [...]]]></description>
			<content:encoded><![CDATA[<p>Bummer, I thought it was included in the default package, but somehow the configuration I used (copied from my Sun) didn&#8217;t work. I got an error message: </p>
<pre class=blocked>postfix/pickup[11145]: fatal: unsupported dictionary type: mysql</pre>
<p>I started googling the error message and to find out how I could see which kind of lookup tables are support in the default package installed in OS X. The command I found and used was:</p>
<pre class=blocked>postconf -m</pre>
<p>The result was that the following tables are supported:</p>
<pre class=blocked>
static
sdbm
cidr
regexp
environ
proxy
btree
unix
hash</pre>
<p>Next I will start the configuration process again from scratch to see if I can get it all working via configuration files. I hope I can get the IMAP folders working, I thought that was supported.</p>
<p>I can off course get the sourcecode for Postfix and recompile the whole thing to get everything working as I wanted (with MySQL support for instance) but I really would like to use standard software and not go out and compile everything myself. If someone knows of a standard package I can install like the packages for Apache, MySQL and PHP please let me know !</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=14&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_14" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/09/14/no-standard-mysql-support-in-postfix-package/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configuring Postfix is not an easy task</title>
		<link>http://switch.richard5.net/2005/09/13/configuring-postfix-is-not-an-easy-task/</link>
		<comments>http://switch.richard5.net/2005/09/13/configuring-postfix-is-not-an-easy-task/#comments</comments>
		<pubDate>Tue, 13 Sep 2005 19:03:43 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[PostFix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=12</guid>
		<description><![CDATA[I remember I had a hard time configuring Postfix on my Sun running Debian Linux, all those loose config files which don&#8217;t make a lot of sense from the beginning. On top of that I wanted IMAP folders (easier to use web based mail and use multiple computers to read mail), virtual domains and use [...]]]></description>
			<content:encoded><![CDATA[<p>I remember I had a hard time configuring Postfix on my Sun running Debian Linux, all those loose config files which don&#8217;t make a lot of sense from the beginning. On top of that I wanted IMAP folders (easier to use web based mail and use multiple computers to read mail), virtual domains and use MySQL for account administration. It took me quite some time but I got it done, with lots of espresso and some major googling on error messages and configuration.</p>
<p>There are a lot of HowTo&#8217;s and FAQ files to be found on the internet, each for a specific configuration and a specific operating system. Just have a look at <a href="http://www.postfix.org/docs.html">postfix.org&#8217;s document</a> section to see some of the &#8220;official&#8221; ones. There are more just google for them.</p>
<p>I tried to collect some information on using and configuring Postfix on OS X but it is hard to come by. When asking around I got pointed to the <a href="http://www.cutedgesystems.com/software/PostfixEnabler/">Postfix Enabler</a> which is a great solution if you&#8217;d want a simpel server with one domain, but as far as I could see it doesn&#8217;t work if you&#8217;d want to setup multiple domains.</p>
<p>Others suggested to install OS X server, it&#8217;s got the same basic software installed, but it comes with nice GUI based tools for configuring it all. A shame they can&#8217;t be downloaded somewhere. I&#8217;m not going to go the server route, not on my Mac mini, maybe later on a true Xserver.</p>
<p>I&#8217;m now even more determined to get it working on the Mac just the way I want it done. I&#8217;ve got most sites covering this bookmarked to keep googling to a minimum. I&#8217;m going to document as much as possible and put it on this site so others can benefit from my expirience doing this.  I hope it will help others to get it running in a shorter time frame than I will.</p>
<p>Keep coming back for more info on the subject. I will publish any progress I make.</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=12&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_12" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/09/13/configuring-postfix-is-not-an-easy-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Confusing: /etc and /private/etc</title>
		<link>http://switch.richard5.net/2005/08/31/confusing-etc-and-privateetc/</link>
		<comments>http://switch.richard5.net/2005/08/31/confusing-etc-and-privateetc/#comments</comments>
		<pubDate>Wed, 31 Aug 2005 19:43:34 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=7</guid>
		<description><![CDATA[While I was looking around on my disk where to change the default Apache configuration after I found out that it is installed per default on OSX and I just needed to activate it in the System Preferences / Sharing panel. Click on Personal Web Sharing and you&#8217;re off. More information on how this works [...]]]></description>
			<content:encoded><![CDATA[<p>While I was looking around on my disk where to change the default Apache configuration after I found out that it is installed per default on OSX and I just needed to activate it in the System Preferences / Sharing panel. Click on Personal Web Sharing and you&#8217;re off. </p>
<p>More information on how this works and how to configure Apache can be found <a href="http://www.macdevcenter.com/pub/a/mac/2001/12/07/apache.html">here</a>. That is not what this blog entry was about. </p>
<p>Looking for the httpd.conf file where you configure your Apache webserver I found 2 entries in the filesystem. One was in /etc/httpd/ where you&#8217;d expect it as a regular Linux/Unix user but there is also one to be found in /private/etc/httpd/. So which was I to use ?</p>
<p>After some Googling and looking closer at the directory entries, I found out that /etc is a symbolic link to /private/etc and therefore the same directory. So actually there is only one httpd.conf that is used.</p>
<p>It seems that this has been done to provide compatibility between the unix roots and the OSX&#8217;s own layout of the filesystem which has its origin in NeXT.  </p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=7&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_7" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/08/31/confusing-etc-and-privateetc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Client</title>
		<link>http://switch.richard5.net/2005/08/29/ssh-client/</link>
		<comments>http://switch.richard5.net/2005/08/29/ssh-client/#comments</comments>
		<pubDate>Mon, 29 Aug 2005 18:27:55 +0000</pubDate>
		<dc:creator>Richard5</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://switch.richard5.net/?p=5</guid>
		<description><![CDATA[I always used Putty, a great SSH client for Windows, to connect to my Sun servers securely and safely. You can have a list of connections in a screen and connect wth a click of a mouse button. But I&#8217;m trying to use my new Mac for al my tasks so I set out looking [...]]]></description>
			<content:encoded><![CDATA[<p>I always used <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">Putty</a>, a great SSH client for Windows, to connect to my Sun servers securely and safely. You can have a list of connections in a screen and connect wth a click of a mouse button. But I&#8217;m trying to use my new Mac for al my tasks so I set out looking for a new &#8220;graphical&#8221; client to use SSH. I knew that I could do a SSH from the command-line of the Terminal but I found that to cumbersome, you can&#8217;t have a list of session. So after some googling I couldn&#8217;t find one and went to a forum of  Mac users, searched that one and came up empty. So I posted a question in the forum. Got a great tip I&#8217;d like to share with you:</p>
<ul>
<li>Put the terminal in the dock</li>
<li>Click and hold the left mouse button on the terminal icon</li>
<p><code><img src="http://switch.richard5.net/wp-images/terminaldock.jpg" alt=""/><br />
</code></p>
<li>In the menu that appears, click on the &#8220;Connect to server&#8230;&#8221; option</li>
<p><img src="http://switch.richard5.net/wp-images/connectserverwindow.jpg" alt=""/></p>
<li>A small window appears where you can manage your SSH connections and connect to any server with a mouseclick, just like I used to do with Putty.</li>
</ul>
<p>I hope you like this solution as much as I do, if you have another good solution for this leave a comment.</p>
<p class="akst_link"><a href="http://switch.richard5.net/?p=5&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_5" class="akst_share_link">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://switch.richard5.net/2005/08/29/ssh-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

