<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>David Raynes: Config Files</title>
<link>http://www.rayners.org/archives/computing/index.php</link>
<description></description>
<language>en-us</language>
<copyright>Copyright 2005</copyright>
<lastBuildDate>Tue, 30 Dec 2003 21:25:37 -0500</lastBuildDate>
<pubDate>Thu, 04 Aug 2005 09:48:59 -0500</pubDate>
<generator>http://www.movabletype.org/?v=3.16</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>

<item>
<title>Random Names in Mutt</title>
<description>I like to goof around with the email I send to my wife while she is at work. Mainly, I...</description>
<link>http://www.rayners.org/2004/07/random_names_in.php</link>
<guid>http://www.rayners.org/2004/07/random_names_in.php</guid>
<content:encoded><![CDATA[<p>I like to goof around with the email I send to my wife while she is at work.  Mainly, I just switch the name her client displays to any number of our inside jokes.  Yesterday, I implemented a way for <a href="http://www.mutt.org/">mutt</a> to pick one randomly.</p>

<p>First, I setup the <code>send-hook</code>:</p>

<pre><code>send-hook &quot;~C jenn@email.address&quot; source ~/.mutt/for-jenn</code></pre>

<p>Then, in <code>~/.mutt/for-jenn</code>:</p>

<pre><code>unmy_hdr From:
my_hdr From: \
    `/usr/bin/perl /home/rayners/.mutt/from-names.pl` \
    &lt;my-home@email.address&gt;</code></pre>

<p>And, finally, the <code>from-names.pl</code> script:</p>

<pre><code><span class="linecomment">#!/usr/bin/perl</span>

@names = (
    'Name 1',
    'Name 2',
    'Name 3',
    );

<span class="category2">print</span> $names[<span class="category2">rand</span> @names];</code></pre>

<p>So now whenever I start writing an email to her, the <code>From:</code> line of the email pops up with a different name.</p>

<p>Now, to make sure that normal emails from me are not affected, I placed the following <code>send-hook</code> before the earlier one:</p>

<pre><code>send-hook . source ~/.mutt/from-rayners</code></pre>

<p>And the <code>~/.mutt/from-rayners</code> file:</p>

<pre><code>unmy_hdr From:
my_hdr From: David Raynes &lt;rayners@rayners.org&gt;</code></pre>

]]></content:encoded>
<category>Mutt</category>
<pubDate>Fri, 09 Jul 2004 08:15:11 -0500</pubDate>
</item>
<item>
<title>Turning Off Auto Ignore</title>
<description>While I was speaking with Joi on IRC today, BitchX kept ignoring him (in all honesty though, he was pasting...</description>
<link>http://www.rayners.org/2004/06/turning_off_aut.php</link>
<guid>http://www.rayners.org/2004/06/turning_off_aut.php</guid>
<content:encoded><![CDATA[<p>While I was speaking with <a href="http://joi.ito.com/">Joi</a> on <span class="caps">IRC </span>today, <a href="http://www.bitchx.org/">BitchX</a> kept ignoring him (in all honesty though, he was pasting some stuff into messages to me, so they were coming in pretty quick).  Anyways, after some digging, I found an undocumented command for <a href="http://faq.bitchx.org/view_faq.php?tag=auto+ignore+disable">turning off auto-ignore</a> for a given nick:</p>

<pre><code>/addnoflood nickname</code></pre>

<p>Unfortunately, it appears that setting is not saved with the <code>/save</code> command, so I will need to add it to my <code>~/.bitchxrc</code> file.</p>

]]></content:encoded>
<category>BitchX</category>
<pubDate>Mon, 14 Jun 2004 17:46:11 -0500</pubDate>
</item>
<item>
<title>Fun with BitchX</title>
<description>I have been on IRC quite a bit lately, and I have been having some fun getting my current client,...</description>
<link>http://www.rayners.org/2004/06/fun_with_bitchx.php</link>
<guid>http://www.rayners.org/2004/06/fun_with_bitchx.php</guid>
<content:encoded><![CDATA[<p>I have been on <span class="caps">IRC </span>quite a bit lately, and I have been having some fun getting my current client, <a href="http://www.bitchx.org/">BitchX</a>, working nicely.  I have not done too much so far, but I have got a few more tricks up my sleeve.</p>

<p>First of all, the following in my <code>~/.bitchxrc</code> file automatically validates me with NickServ on <a href="http://www.freenode.net">Freenode</a> and <a href="http://www.wyldryde.net">Wyldryde</a>:</p>

<pre><code> # My &quot;passwords&quot;
assign FREENODE_PASSWORD password
assign WYLDRYDE_PASSWORD password

 # Command to register with NickServ
 # Sending the appropiate password to the network

alias nsreg {
    userhost NickServ -cmd {
        if ( rmatch($3@$4 NickServ@services.) ) {
            echo NSREG: Sending FreeNode Credentials
            ^msg nickserv identify $FREENODE_PASSWORD
        }
        if ( rmatch($3@$4 services@wyldryde.net) ) {
            echo NSREG: Sending WyldRyde Credientials
            ^msg nickserv identify $WYLDRYDE_PASSWORD
        }
    }
}

 # Catch the notice from NickServ that the nick is registered

on ^notice 'NickServ This nickname is \\[owned registered\\]*' {
    ^nsreg
}</code></pre>

<p>And finally, since there are many people who refer to me without using my nick (rayners), I put in the following code to catch other words and highlight those messages:</p>

<pre><code>assign AR_WORDLIST david raynes dave rayners

on ^public '% % *\\[$AR_WORDLIST\\]*' {
        echo $fparse(PUBLIC_AR &quot;&quot; $0 &quot;&quot; $2-)
}</code></pre>

<p>I will probably add some more words later, but that is working well enough so far.</p>

]]></content:encoded>
<category>BitchX</category>
<pubDate>Thu, 03 Jun 2004 22:39:14 -0500</pubDate>
</item>
<item>
<title>Teaching Mutt about the wonders of Microsoft</title>
<description>Normally, I cryptographically sign all my outgoing emails with GnuPG. Unfortunately, Outlook Express does not handle those signature attachments all...</description>
<link>http://www.rayners.org/2004/01/teaching_mutt_a.php</link>
<guid>http://www.rayners.org/2004/01/teaching_mutt_a.php</guid>
<content:encoded><![CDATA[<p>Normally, I cryptographically sign all my outgoing emails with <a href="http://www.gnupg.org/">GnuPG</a>.  Unfortunately, Outlook Express does not handle those signature attachments all too well.  It has even gone so far as to mark those attachments as unsafe (as relayed to me in a recent email).</p>

<p>So, I have come up with the following additions to my <a href="http://www.mutt.org/">mutt</a> config file to handle this situation:</p>

<pre><code>message-hook ~A &quot;set pgp_autosign&quot;
message-hook &quot;~h 'X-Mailer: Microsoft Outlook Express'&quot; &quot;set nopgp_autosign&quot;</code></pre>

<p>Unfortunately, to make sure this is used, I need to be reading the message when I reply to it, instead of just hitting the reply key in the header list.</p>

<p>True, I could tell <a href="http://www.mutt.org/">mutt</a> to use the old-style cryptographic signatures (with <a href="http://www.mutt.org/doc/manual/manual-6.html#pgp_create_traditional"><code>pgp_create_traditional</code></a>), but I feel like I am trying to make a point here. :)</p>

]]></content:encoded>
<category>Mutt</category>
<pubDate>Sun, 04 Jan 2004 00:30:54 -0500</pubDate>
</item>
<item>
<title>FreeBSD and Subversion</title>
<description>After having some weird hang-ups in Subversion today, I tracked down a question and answer in the FAQ: On FreeBSD,...</description>
<link>http://www.rayners.org/2003/12/freebsd_and_subversion.php</link>
<guid>http://www.rayners.org/2003/12/freebsd_and_subversion.php</guid>
<content:encoded><![CDATA[<p>After having some weird hang-ups in <a href="http://subversion.tigris.org/">Subversion</a> today, I tracked down a question and answer in the <a href="http://subversion.tigris.org/project_faq.html"><span class="caps">FAQ</span></a>:</p>

<blockquote cite="http://subversion.tigris.org/project_faq.html#freebsd-hang"><p>On FreeBSD, certain operations (especially svnadmin create) sometimes hang. Why?</p>

<p>This is usually due to a lack of available entropy on the system. You probably need to configure the system to gather entropy from sources such as hard-disk and network interrupts. Consult your system manpages, specifically random(4) and rndcontrol(8) on how to effect this change.</p></blockquote>

<p>I was not sure initially if that was the problem I was having (mostly it was the mentioning of <em>svnadmin create</em> that threw me off).  The thing was that everything was working fine on my server machine, which has almost the exact same setup as my personal machine.  Commits were working just fine on the server, and hanging on my machine.  Eventually, after futzing around with a few other thoughts, I decided to give it a try.</p>

<p>So, I read the <em>rndcontrol</em> manpage, and it said that:</p>


<ul>
<li><em>rndcontrol</em> takes <span class="caps">IRQ </span>numbers as arguments, from which entropy will be gathered</li>
<li>The default is to gather from none</li>
</ul>



<p>Then I look at my <em>dmesg</em> output and discovered that my ethernet card was sitting on <span class="caps">IRQ</span> 11, so that is what I handed off to <em>rndcontrol</em>.  Suddenly, things were working just fine again.</p>

<p><strong>Minor Update</strong> (2003-12-31 09:58)</p>

<p>I forgot to mention the config file changes I made when I finally got all this working.  I just added the following to my <em>/etc/rc.conf</em> file:</p>

<pre><code>rand_irqs=&quot;11&quot;</code></pre>

]]></content:encoded>
<category>Computing</category>
<pubDate>Tue, 30 Dec 2003 21:25:37 -0500</pubDate>
</item>
<item>
<title>Bringing Mutt and IMAP a little closer together</title>
<description>Recently I decided to tinker with my email paradigm on my network here at home. I used to run fetchmail...</description>
<link>http://www.rayners.org/2003/11/bringing_mutt_a.php</link>
<guid>http://www.rayners.org/2003/11/bringing_mutt_a.php</guid>
<content:encoded><![CDATA[<p>Recently I decided to tinker with my email paradigm on my network here at home.  I used to run <a href="http://catb.org/~esr/fetchmail/">fetchmail</a> on my main machine to gather all the email from my various accounts (passing it through <a href="http://www.rayners.org/2003/07/sorting_mailing.php">procmail</a> of course).  Unfortunately, when I boot into Windows, I completely lose access to my mail.  So, I installed <a href="http://dovecot.procontrol.fi/">dovecot</a> on my extra/server machine, and copied over my fetchmail/procmail setup.  Now I can access my email in both operating systems, and using practically any mail client I feel like using (usually <a href="http://www.mutt.org/">mutt</a>, but sometimes <a href="http://www.ximian.com/products/evolution/">evolution</a> or <a href="http://www.mozilla.org/projects/thunderbird/">thunderbird</a>).</p>

<p>Unfortunately, the little <a href="http://www.rayners.org/2003/07/filtering_bug_r.php">trick</a> I used to let mutt know about all the mailboxes my procmail recipies create no longer works, as the folders are not physically located on my machine.  I could do it manually, but <span class="caps">IMAP </span>already allows for something like this with its folder subscibing feature.  Mutt supports this somewhat, but not to the extent that I would like (i.e. it can list subscribed folders, but it will not look for new mail in them, which is what I really want).  So, I took a few minutes and threw together a quick perl script to list all my subsctibed folders in a mutt-compatible format.</p>

<p>Here's the code:</p>

<pre><code>#!/usr/bin/perl

use Mail::IMAPClient;

my $server = shift;
my $user = shift;
my $pass = shift;

my $imap = Mail::IMAPClient-&gt;new (
    Server =&gt; $server, 
    User =&gt; $user, 
    Password =&gt; $pass,
    ) or die &quot;Cannot connect to $server as $user: $@&quot;;

my @subscribedFolders = $imap-&gt;subscribed
                or warn &quot;Could not find subscribed folders: $@\n&quot;;

map { print &quot; =$_&quot;; } @subscribedFolders;</code></pre>

<p>It is certainly not robust, but it gets the job done for the time being.  And besides, it gave me a good excuse to play around with <a href="http://search.cpan.org/dist/Mail-IMAPClient/">Mail::IMAPClient</a>.</p>

<p>Here is the line in my <em>~/.muttrc</em> file that uses the script:</p>

<pre><code class="codesnip">mailboxes `/usr/bin/perl ~/imapFolders.pl server rayners mypassword`</code></pre>

]]></content:encoded>
<category>Mutt</category>
<pubDate>Thu, 06 Nov 2003 01:21:07 -0500</pubDate>
</item>
<item>
<title>Sorting Mailing Lists with Procmail</title>
<description>Bill writes about the usefulness of list header metadata, so I thought I&apos;d put up the procmail recipies I use...</description>
<link>http://www.rayners.org/2003/07/sorting_mailing.php</link>
<guid>http://www.rayners.org/2003/07/sorting_mailing.php</guid>
<content:encoded><![CDATA[<p>Bill writes about the <a href="http://www.ideaspace.net/users/wkearney/archives/entries/000395.html">usefulness of list header metadata</a>, so I thought I'd put up the <a href="http://www.procmail.org/">procmail</a> recipies I use to catch mailing list emails.</p>

<pre><code class="codesnip">
 # Yahoo Groups
 # (e.g. Mailing-List: list mt-dev@yahoogroups.com)
:0:
* ^Mailing-List: list \/[^@]+
lists/$MATCH

 # Mailman and other intelligent software lists
 # (e.g. List-Post: &lt;mailto:Pluginmanager-l@rayners.org&gt;)
:0:
* ^List-Post: \&lt;mailto:\/[^@]+
lists/$MATCH

 # Other list software?
 # (e.g. X-Mailing-List: &lt;ftjava-test@firedrake.org&gt;)
:0:
* ^X-Mailing-List: \&lt;\/[^@]+
lists/$MATCH

 # Mojo Lists
 # (e.g. List: lug)
:0:
* ^List-Software: Mojo Mail
* ^List: \/[^@]+
lists/$MATCH

 # ListProc (all those UMBC lists)
 # (e.g. Sender: owner-umbclinux@listproc.umbc.edu)
:0:
* ^Sender: owner-\/[^@]+
lists/$MATCH

 # More lists (realms-l)
 # (e.g. From owner-realms-l@ORACLE.WIZARDS.COM)
:0:
* ^From owner-\/[^@]+
lists/$MATCH</code></pre>

<p>Most of the mailing list software out there adds the headers and I can catch them relatively easily.  With others, however, I have to do a little digging.  And the realms-l list drives me insane.  Here's how it identifies itself within the email:</p>

<pre><code class="codesnip">Sender: The Forgotten Realms Mailing List &lt;REALMS-L@ORACLE.WIZARDS.COM&gt;</code></pre>

<p>I suppose I could look for that specifically, but that's exactly the point.  I shouldn't have to write filters for specific mailing lists.  It defeats the whole purpose of putting the list data in the email headers.</p>

<p>Anyways, for all you procmail/regexp experts out there, how do you think I could handle this odd case:</p>

<pre><code class="codesnip">Sender: port-sgimips-owner@NetBSD.org</code></pre>

]]></content:encoded>
<category>Procmail</category>
<pubDate>Wed, 23 Jul 2003 17:12:00 -0500</pubDate>
</item>
<item>
<title>Filtering Bug Reports from the MT Plugin Directory Bug Tracker</title>
<description>I love procmail. I just spent a few minutes playing around with my ~/.procmailrc file and now any bug reports...</description>
<link>http://www.rayners.org/2003/07/filtering_bug_r.php</link>
<guid>http://www.rayners.org/2003/07/filtering_bug_r.php</guid>
<content:encoded><![CDATA[<p>I love <a href="http://www.procmail.org/">procmail</a>.  I just spent a few minutes playing around with my <em>~/.procmailrc</em> file and now any bug reports I get from the <a href="http://mt-plugins.org/">MT Plugin Directory</a> <a href="http://bugs.mt-plugins.org/">Bug Tracker</a> are now placed into <em>~/Mail/bugs/<strong>Project Name</strong></em>.</p>

<p>Here is the relevant portion of my <em>~/.procmailrc</em> file:</p>

<pre><code># Catch bug reports from bugs.mt-plugins.org
:0:
* ^From: plugins@mt-plugins\.org
{
        :0 B
        * ^Proje[ck]t: \/.+
        bugs/`echo &quot;$MATCH&quot; | sed -e 's/ /_/g'`
}</code></pre>

<p>And from my <em>~/.muttrc</em> file to see all those mailboxes:</p>

<pre><code>mailboxes `for file in ~/Mail/bugs/*; do echo -n &quot;=bugs/$(basename $file) &quot;; done`</code></pre>

<p><strong>Update:</strong> (2003-06-08 18:14)</p>

<p>Thanks go to <a href="http://michaelrose.org/marathon/">Mike</a> for the suggestion.  So, here's the updated recipe:</p>

<pre><code># Catch bug reports from bugs.mt-plugins.org
:0:
* ^From: plugins@mt-plugins\.org
* B ?? ^Proje[ck]t: \/.+
bugs/`echo &quot;$MATCH&quot; | sed -e 's/[^-_A-Za-z0-9]/_/g'`</code></pre>

]]></content:encoded>
<category>Procmail</category>
<pubDate>Tue, 08 Jul 2003 16:16:22 -0500</pubDate>
</item>


</channel>
</rss>