<?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>I can has weblog? &#187; scripting</title>
	<atom:link href="http://justin-hopkins.com/blog/category/scripting/feed" rel="self" type="application/rss+xml" />
	<link>http://justin-hopkins.com/blog</link>
	<description>The thoughts and works of Justin Hopkins.</description>
	<lastBuildDate>Mon, 13 Sep 2010 15:49:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>You know what rocks? This fetchmail init script for Red Hat!</title>
		<link>http://justin-hopkins.com/blog/2010/06/23/you-know-what-rocks-this-fetchmail-init-script-for-red-hat</link>
		<comments>http://justin-hopkins.com/blog/2010/06/23/you-know-what-rocks-this-fetchmail-init-script-for-red-hat#comments</comments>
		<pubDate>Wed, 23 Jun 2010 15:31:08 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[fetchmail]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://justin-hopkins.com/blog/2010/06/23/you-know-what-rocks-this-fetchmail-init-script-for-red-hat</guid>
		<description><![CDATA[This is from the contrib directory of the fetchmail source and is much better than what Google gives you.]]></description>
			<content:encoded><![CDATA[<p>This is from the contrib directory of the fetchmail source and is much better than what Google gives you.</p>

<p><pre></pre></p>]]></content:encoded>
			<wfw:commentRss>http://justin-hopkins.com/blog/2010/06/23/you-know-what-rocks-this-fetchmail-init-script-for-red-hat/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to get a .csv of subscribers on all your Mailman lists</title>
		<link>http://justin-hopkins.com/blog/2009/05/16/how-to-get-a-csv-of-subscribers-on-all-your-mailman-lists</link>
		<comments>http://justin-hopkins.com/blog/2009/05/16/how-to-get-a-csv-of-subscribers-on-all-your-mailman-lists#comments</comments>
		<pubDate>Sat, 16 May 2009 17:16:33 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://justin-hopkins.com/blog/?p=185</guid>
		<description><![CDATA[The boss asked me to create a list of everyone subscribed to every discussion list we have. Ended up being like 3000 lines&#8230;luckly there is a python script that polls the mailman admin web interface. The &#8230; <a class="more-link" href="http://justin-hopkins.com/blog/2009/05/16/how-to-get-a-csv-of-subscribers-on-all-your-mailman-lists">More<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The boss asked me to create a list of everyone subscribed to every discussion list we have. Ended up being like 3000 lines&#8230;luckly there is a python script that polls the mailman admin web interface. The below script makes it quite a bit easier to perform on all the lists.</p>

<p>First thing, you need a file with all of your list names &#8211; this works:<br />
<pre><pre>
ls /usr/local/mailman/lists | cat &gt; lists.txt ## This is where mailman is located on FreeBSD
</pre></pre></p>

<p>Next, download <a href="http://www.msapiro.net/mailman-subscribers.py" title="Mailman Subscribers Script">mailman-subscribers.py</a> to your home directory.</p>

<p>Finally, you need to create a shell script (i.e. getallsubscribers.sh) and paste the following (substitute the [[bracketed text]] with the info for your system):<br />
<pre><pre>
while read line
do
 echo $line | cat &gt;&gt; listsAndMembers.csv
&nbsp;&nbsp;~/mailman-subscribers.py -c [[your.mailman.host]] $line [[listAdminPassword]] | cat &gt;&gt; listsAndMembers.csv
&nbsp;&nbsp;echo | cat &gt;&gt; listsAndMembers.csv
&nbsp;&nbsp;echo | cat &gt;&gt; listsAndMembers.csv
done &lt; lists.txt
</pre></pre></p>

Now make the file executable and run it:<br />
</pre><pre><pre>
chmod +x getallsubscribers.sh
./getallsubscribers.sh
</pre></pre>

<p>That's it. You should have a single file with all of your lists and their subscribers.</p>

<p><strong>edit:</strong> It came up later that it would be nice to get a list of who from each domain was subscribed. This regex will turn up the listname and name/email for each subscriber in the .csv<br />
<pre><pre>
(?:.*(?:gmail\.com)&quot;|^[^&quot;].*$)
</pre></pre></p>]]></content:encoded>
			<wfw:commentRss>http://justin-hopkins.com/blog/2009/05/16/how-to-get-a-csv-of-subscribers-on-all-your-mailman-lists/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

