I recently started using mutt with my gmail IMAP mail address.

Because I loved it so much, I also set it up with my college email address. This, sadly, is hosted by the college ICT team under Outlook Webapp, which seems not to adhere to some vary basic standards such as message quoting.

On every mail service I've used (not many but hey), a message is quoted using the following method:

This is my new message
>this is 
>a quoted message
>> this is a 
>> quoted message inside the quoted message

or something similar. Mutt seems to pick this up and colorize them appropriatly.

However, the Outlook Webapp has following qutoing scheme:

This is my new message

-----Original Message-----
From: Foo@Bar
Subject: Foobar
Date: 1st of Foo, 2012 20:18
To: Bar@Baz

this is 
a quoted message

-----Original Message-----
From: Bar@Baz
Subject: Foobar
Date: 1st of Foo, 2012 20:13
To: Foo@Bar

this is
a quoted message inside the quoted message

Is there a way to tell mutt how to pick this up?

Note that when different users have different languages set in the web app this will also reflect in the quoting, eg a Dutch person will have -----Oorspronkelijk bericht----- instead of it's english counterpart, and it will be sent around like that. So there will be some mixing up.

It feel saddened by the lack of respect for simple standards like this, because they make life so much harder than it has to be.

Note: I have renounced using the outlook webapp, and thus I set up a new gmail account. My outlook webmail get's forwarded to this gmail account and I can reply to it using my normal college email adress from the gmail webapp or mutt. The bad quotin remains a problem though.

1 Answer 1


Well, I could not find any Mutt color like configuration statements that allow to apply color information over multiple lines.

Perhaps the easiest way to deal with Outlook message is to setup a filter, e.g. something like:

$ awk '/-----Original Message-----/ { level++; }
       { for (i=0;i<level;++i) printf(">"); printf("%s%s", $0,"\n"); } '

mutt has even a display_filter command:

When set, specifies a command used to filter messages. When a message is viewed it is passed as standard input to $display_filter, and the filtered message is read from the standard output.

Probably you can make this command conditional (via hooks) - i.e. only execute it when the message has a outlook specific user agent header. Perhaps via the message-hook:

This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message. command is executed if the pattern matches the message to be displayed.

  • This mightwork indeed. It needs a bit of tweaking to make nested qutoing possible. My awk is (very) rusty, so it will take a while before I get there.
    – romeovs
    Commented Apr 1, 2012 at 9:15
  • @romeovs, you can write the filter in any programming language you like. Commented Apr 1, 2012 at 11:36
  • yeah of course, but sed and awk seem to be the best choices no?
    – romeovs
    Commented Apr 1, 2012 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .