Random Names in Mutt

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 mutt to pick one randomly.

First, I setup the send-hook:

send-hook "~C jenn@email.address" source ~/.mutt/for-jenn

Then, in ~/.mutt/for-jenn:

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

And, finally, the from-names.pl script:

#!/usr/bin/perl

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

print $names[rand @names];

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

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

send-hook . source ~/.mutt/from-rayners

And the ~/.mutt/from-rayners file:

unmy_hdr From:
my_hdr From: David Raynes <rayners@rayners.org>

Leave a comment

Recent Entries

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

  • The Olympics Make Me Want To Compete Again

    Every time the Olympics come around (most the summer ones) I always start to delude myself into thinking I could complete once again in the...

  • Minimalist plugins are fun!

    Last night I whipped up one of the smallest plugins I’ve ever written. It is so small in fact that I was able to stuff...

  • Feedburner Widget on MT News

    Movable Type News A WordPress 2.5 Upgrade Guide: And of course there are lots of third-party plugins for the MT dashboard, to integrate statistics and...

  • AD&D Monster Stats for the Presidential Canditates

    Charles Stross (scifi author, D&D nerd, and former perl columnist) posted Politics as she is Played with 3d6: The recent death of Gary Gygax, who...

Close