<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>David Raynes: Mutt</title>
<link>http://www.rayners.org/archives/computing/config_files/mutt/index.php</link>
<description></description>
<language>en-us</language>
<copyright>Copyright 2005</copyright>
<lastBuildDate>Fri, 09 Jul 2004 08:15:11 -0500</lastBuildDate>
<pubDate>Wed, 11 May 2005 17:01:05 -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>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>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>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>