Thursday, November 22, 2012

Dealing with Vcard meeting requests in Mutt

Receiving Vcard Meeting requests that have been generated in Microsoft exchange or MS outlook
arrives in to your Mutt inbox, as an illegible mess of text that is difficult to make heads or tails out of

To configure your mutt to play nicely with Vcard meeting requests do the following.
First install the following (If they are not already installed)

yum install perl
yum install perl-devel
yum install perl-Data-ICal
yum install perl-Text-Autoformat

or use apt-get install if your distribution is Debian based

Then edit your .muttrc and add in the following lines

alternative_order text/calendar
This tells Mutt to display the text/calendar part in preference to the text/plain part.

color index black yellow "~b text/calendar"
this shows all meeting requests as black on yellow
change the colours to which ever you would prefer

The final step is to decode the vCalendar text into something that’s a bit more readable.

To do this we use the following perl script

click on the link then

you can copy and paste the text into your own local file

name the file vcal2text

and save it in /usr/local/bin

Give the script execute permissions

chmod +x /usr/local/bin/vcal2text

Start up Mutt and all Vcard meeting requests will be Legible

1 comment:

Tom Schutter said...

I have just discovered what I think is a security problem in vcalendar-filter. Any perl code in the description section of a vcard is executed by the script.

Line 51 of vcalendar-filter is:

$properties->{$property} = eval qq{"$properties->{$property}"};

This will take the description part of the vcard and execute it as perl code. I can't find any reason why the description should be evaluated.

This is the vcalendar-filter that is Copyright (C) 2008 Martyn Smith.

It should be sufficient to just remove the offending line. Alternatively, there is an updated version of vcalendar-filter available at:
This version has the following improvements:

* [SECURITY FIX] remove perl "eval" of event description

* emit Emacs diary section [Tom Schutter]

* handle non-standard timezone spec like '(UTC-06:00) Central Time (US & Canada)' [Tom Schutter]

* It makes little sense to have multiple BR in a row, so do not act on a BR if the previous key was not seen [Todd T. Fries]

* skip lines with just whitespace too [Todd T. Fries]

* slight reformatting, but invade timezone police for sane output [Todd T. Fries]