<?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>blog.ryara.net &#187; gentoo</title>
	<atom:link href="http://blog.ryara.net/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ryara.net</link>
	<description></description>
	<lastBuildDate>Sat, 17 Dec 2011 04:21:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mailman with lighttpd and Postfix on Gentoo</title>
		<link>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/</link>
		<comments>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 00:38:41 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mailman]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=67</guid>
		<description><![CDATA[This post details how to setup mailman using lighttpd and postfix on gentoo. Before starting I assume that you have: * Lighttpd setup and working * Postfix setup to handle mail from one domain * MX records setup for the &#8230; <a href="http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post details how to setup mailman using lighttpd and postfix on gentoo.</p>
<p>Before starting I assume that you have:<br />
* Lighttpd setup and working<br />
* Postfix setup to handle mail from one domain<br />
* MX records setup for the subdomain you want to use for lists</p>
<p>First, we need to install mailman, but before we do that we need to make sure it uses the right UID and GID (lighttpd) instead of apache, which is the default. To do this append </p>
<p><code>
<pre>MAILMAN_CGIGID="lighttpd"
MAILMAN_CGIUID="lighttpd"
</pre>
<p></code><br />
to <strong>/etc/make.conf</strong> and then proceed to install mailman:</p>
<p><code>
<pre># emerge mailman</pre>
<p></code></p>
<p>Now it&#8217;s time to configure lighttpd. This we do by adding the following to <strong>/etc/lighttpd/lighttpd.conf</strong>:</p>
<p><code>
<pre>alias.url += (
          "/services/mailman/mailman-icons" => "/usr/lib64/mailman/icons/",
          "/services/mailman/pipermail" => "/var/lib/mailman/archives/public/",
          "/services/mailman" => "/usr/lib64/mailman/cgi-bin/",
)

$HTTP["url"] =~ "^/services/mailman" {
        cgi.assign = (
                "/admin" => "",
                "/admindb" => "",
                "/confirm" => "",
                "/create" => "",
                "/edithtml" => "",
                "/listinfo" => "",
                "/options" => "",
                "/private" => "",
                "/rmlist" => "",
                "/roster" => "",
                "/subscribe" => "")
        server.indexfiles = ("listinfo", "index.html")
}
$HTTP["url"] =~ "^/services/mailman/pipermail/" {
             dir-listing.activate = "enable"
             dir-listing.hide-dotfiles = "enable"
             server.follow-symlink = "enable"
}
</pre>
<p></code><br />
I choose not to serve mailman from a vhost, if you want to do that you&#8217;ll need to change the above accordingly. Otherwise you&#8217;ll just have to change the url matches and aliases to reflect from where you want to host mailman. You will also need to make sure that the alias and cgi modules are enabled (located at the top of <strong>lighttpd.conf</strong>).</p>
<p>The next thing to configure is mailman itself. Append the following to <strong>/etc/mailman/mm_cfg.py</strong>:</p>
<p><code>
<pre>MTA = 'Postfix'
DEFAULT_EMAIL_HOST = 'lists.example.tld'
DEFAULT_URL_HOST = 'example.tld'
DEFAULT_URL_PATTERN = 'http://%s/services/mailman/'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
IMAGE_LOGOS = '/services/mailman/mailman-icons/' 

POSTFIX_STYLE_VIRTUAL_DOMAINS = [DEFAULT_EMAIL_HOST]

PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/services/mailman/pipermail/%(listname)s'
</pre>
<p></code><br />
You should set <code>DEFAULT_EMAIL_HOST</code> to the subdomain you want your lists to use, <code>DEFAULT_URL_HOST</code> to the host from which you will serve the mailman web pages, and change <code>DEFAULT_URL_PATTERN</code>, <code>IMAGE_LOGOS</code>, <code>PUBLIC_ARCHIVE_URL</code> so that they are consistent with your settings in <strong>lighttpd.conf</strong>. The call to <code>add_virtualhost</code> is need when you change either of the <code>_HOST</code> variables like this.</p>
<p>Continuing, there is a few things we need to do as the mailman user. First install the cron jobs:</p>
<p><code>
<pre># su - mailman
mailman $ cd cron
mailman $ crontab crontab.in
mailman $ cd ..
</pre>
<p></code><br />
Then set the site password:</p>
<p><code>
<pre>mailman $ bin/mmsitepass
</pre>
<p></code><br />
The site password works instead of any other password in the mailman installation, and is used to adminstrate it.</p>
<p>Next we create the site-wide mailing list, which is needed for proper operation of mailman:</p>
<p><code>
<pre>mailman $ bin/newlist mailman
</pre>
<p></code><br />
And logout from the mailman account and continue&#8230;</p>
<p>&#8230;with configuring postfix. This is as simple as adding the following two lines to <strong>/etc/postfix/main.cf</strong>:</p>
<p><code>
<pre>virtual_alias_domains = lists.example.tld
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman
</pre>
<p></code></p>
<p>Once again replacing lists.example.tld with the subdomain you want your lists to use.</p>
<p>Now we only need to reload postfix, start mailman and add it to the default runlevel:</p>
<p><code>
<pre># /etc/init.d/postfix reload
# /etc/init.d/mailman start
# rc-update add mailman default
</pre>
<p></code><br />
Congratulations, you should now have a working mailman install!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ebuild for yubikey pam auth</title>
		<link>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/</link>
		<comments>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 20:09:49 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[yubikey]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/</guid>
		<description><![CDATA[(If you don&#8217;t know what a yubikey is, have a look here) So I wrote up ebuilds for yubico-pam and its dependency yubico-c-client. You can get them here. Just extract the tarball into your portage overlay and emerge pam_yubico. If &#8230; <a href="http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>(If you don&#8217;t know what a yubikey is, have a look <a href="http://yubico.com/products/yubikey/">here</a>)</p>
<p>So I wrote up ebuilds for <a href="http://code.google.com/p/yubico-pam/">yubico-pam</a> and its dependency <a href="http://code.google.com/p/yubico-c-client/">yubico-c-client</a>. You can get them <a href='http://blog.ryara.net/wp-content/uploads/2009/01/pam_yubico-ebuildstar.gz' title='Yubico PAM ebuilds'>here</a>.</p>
<p>Just extract the tarball into your portage overlay and emerge pam_yubico. If you don&#8217;t have an overlay, then just do this (as root):<br />
<code>
<pre>mkdir /usr/local/portage/
echo 'PORTDIR_OVERLAY="/usr/local/portage/"' >> /etc/make.conf
tar xvzf pam_yubico-ebuildstar.gz -C /usr/local/portage/
emerge pam_yubico
</pre>
<p></code></p>
<p>For myself I configured sshd to be able to login using either my yubikey or a normal password. I will describe how to do that &#8211; if you need some other configuration have a look at the PAM module&#8217;s site (mentioned above).</p>
<ol>
<li>You will need to get your yubico client id. The only way I know of to do this is through the <a href="https://api.yubico.com/yms/index.php">YMS</a>.
</li>
<li>Configure PAM to make ssh use the newly installed module. This by prepending <code>auth sufficient pam_yubico.so id=16 try_first_pass</code> to <code>/etc/pam.d/sshd</code>. Be sure to change 16 to the ID you aquired in step 1.
</li>
<li>Add your yubikey id to the file pam_yubico looks in, namely <code>~/.yubico/authorized_yubikeys</code>. Create the file with and add the line <code>user:yubikey_id</code>. The yubikey id is the first 12 characters from the OTPs it generates.</li>
</ol>
<p>And that&#8217;s it. You should now be able to log in over SSH using either your regular password or your yubikey.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 1/17 queries in 0.007 seconds using apc
Object Caching 386/420 objects using apc

Served from: blog.ryara.net @ 2012-02-05 09:22:03 -->
