Blog of Sara Jakša

Keeping Track of Arrived Emails in Mutt

Ever since I started to use Mutt for my email client in December, it has become really easy to keep track of emails, that I send. The only blimp, that was not tracked was when I sent almost 300 emails for a call for people to solve my survey for my master thesis at the Faculty of Economics (where I finally have enough of them, which means that there is no step that I would really want to procrastinate on left).

But other than that blimp, the msmpt is keeping track of every message that I send. And it is really easy to see who did I send the messages to. But at the beginning, I had no way of tracking who is sending messages to me. And lets face it, doing one directional would be an interesting analysis already (I do wonder, who I mostly email with), but doing it bidirectionally would be even more interesting.

This is until I came accross the article Tips for Using Mutt. I simply modified the script that they described in setting up the contacts, so it ended up looking like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/bin/sh

MESSAGE=$(cat)

FROM=$(echo "${MESSAGE}" | grep ^"From: ")
DATE=$(echo "${MESSAGE}" | grep ^"Date: ")
SUBJECT=$(echo "${MESSAGE}" | grep ^"Subject: ")

DATA="${FROM} | ${DATE} | ${SUBJECT}"

echo "$DATA" >> /mnt/Stable/mutt_gotten_emails.txt

echo "${MESSAGE}"

I have already tested on the couple of emails that I had gotten, and so far so good. I can't wait to see, what kind of emails do I get. Because I think it will help me with optimizing the email use, so that I spend at least time checking emails as possible.