Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[mutt] label mails with colored tags

321 views
Skip to first unread message

Peter Jordan

unread,
Oct 22, 2009, 12:40:02 PM10/22/09
to
Hello,

I plan to migrate from thunderbird to mutt.

In thunderbird it is possible to define custom tags (e.g. debian with
color red), so that the mails labeled with debian are highlighted red.

Is that also possible with mutt?

PJ


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Neal Hogan

unread,
Oct 22, 2009, 12:50:02 PM10/22/09
to
On Thu, Oct 22, 2009 at 11:31 AM, Peter Jordan <usern...@gmx.info> wrote:
> Hello,
>
> I plan to migrate from thunderbird to mutt.
>
> In thunderbird it is possible to define custom tags (e.g. debian with color
> red), so that the mails labeled with debian are highlighted red.
>
> Is that also possible with mutt?

Sure

http://www.mutt.org/doc/devel/manual.html#color

Wayne

unread,
Oct 22, 2009, 1:10:01 PM10/22/09
to
Peter Jordan wrote:
> Neal Hogan, Thu Oct 22 2009 18:41:58 GMT+0200 (CEST):

>> On Thu, Oct 22, 2009 at 11:31 AM, Peter Jordan <usern...@gmx.info>
>> wrote:
>>> Hello,
>>>
>>> I plan to migrate from thunderbird to mutt.
>>>
>>> In thunderbird it is possible to define custom tags (e.g. debian with
>>> color
>>> red), so that the mails labeled with debian are highlighted red.
>>>
>>> Is that also possible with mutt?
>>
>> Sure
>>
>> http://www.mutt.org/doc/devel/manual.html#color
>>
>>
> And how to label mails with tags?
>

For a start
While in mutt, hit F1 (the Manual page) and do a search for 'tag'.

Wayne

Peter Jordan

unread,
Oct 22, 2009, 1:10:02 PM10/22/09
to
Neal Hogan, Thu Oct 22 2009 18:41:58 GMT+0200 (CEST):
> On Thu, Oct 22, 2009 at 11:31 AM, Peter Jordan <usern...@gmx.info> wrote:
>> Hello,
>>
>> I plan to migrate from thunderbird to mutt.
>>
>> In thunderbird it is possible to define custom tags (e.g. debian with color
>> red), so that the mails labeled with debian are highlighted red.
>>
>> Is that also possible with mutt?
>
> Sure
>
> http://www.mutt.org/doc/devel/manual.html#color
>
>
And how to label mails with tags?

PJ

Peter Jordan

unread,
Oct 22, 2009, 1:30:01 PM10/22/09
to
Wayne, Thu Oct 22 2009 19:07:04 GMT+0200 (CEST):

> Peter Jordan wrote:
>> Neal Hogan, Thu Oct 22 2009 18:41:58 GMT+0200 (CEST):
>> And how to label mails with tags?
>>
>
> For a start
> While in mutt, hit F1 (the Manual page) and do a search for 'tag'.
>
> Wayne
>
>

sorry, but as far as I understand, tagging in mutt means to select
multiple message for a common action.

I want to label a message with a tag like "debian", "work", "private" ASO

PJ

Tim Tebbit

unread,
Oct 22, 2009, 1:40:02 PM10/22/09
to
Peter Jordan wrote:
> Wayne, Thu Oct 22 2009 19:07:04 GMT+0200 (CEST):
>> Peter Jordan wrote:
>>> Neal Hogan, Thu Oct 22 2009 18:41:58 GMT+0200 (CEST):
> sorry, but as far as I understand, tagging in mutt means to select
> multiple message for a common action.
>
> I want to label a message with a tag like "debian", "work", "private" ASO
>
> PJ

I used to have mutt-patched, used sidebar and accomplish the same thing
filtering those messages in to their own respective folders. A little
cleaner imo.

Something like the below worked for me.

mailboxes /Mail/Debian-User
mailboxes /Mail/Mutt-User

# Sidebar Settings

set sidebar_visible
set sidebar_width
# set sedebar_delim

# Sidebar keys

bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open

Neal Hogan

unread,
Oct 22, 2009, 3:00:01 PM10/22/09
to
On Thu, Oct 22, 2009 at 12:21 PM, Peter Jordan <usern...@gmx.info> wrote:
> Wayne, Thu Oct 22 2009 19:07:04 GMT+0200 (CEST):
>>
>> Peter Jordan wrote:
>>>
>>> Neal Hogan, Thu Oct 22 2009 18:41:58 GMT+0200 (CEST):
>>> And how to label mails with tags?
>>>
>>
>> For a start
>> While in mutt, hit F1 (the Manual page) and do a search for 'tag'.
>>
>> Wayne
>>
>>
>
> sorry, but as far as I understand, tagging in mutt means to select multiple
> message for a common action.
>
> I want to label a message with a tag like "debian", "work", "private" ASO

As far as I can tell, you're using 'tag' two different ways. There is
the mutt 'tag' (which is close to what you suggest) and then there is
your 'tag', which appears to mean something like 'certain part of an
email (eg, address, phrase in subject, etc.)'. If you want messages
from debian-users@ to be highlighted in red and ones from joeSchmoe to
be in yellow, you can do this.

Wayne's post is suggesting that you do some work and read the
documentation. Your original question has been answered. You can do
the work to find out the details of how to do it.

It's not that hard.

Pedro Insua

unread,
Oct 22, 2009, 4:40:01 PM10/22/09
to
On Thu, Oct 22, 2009 at 06:31:40PM +0200, Peter Jordan wrote:
> Hello,
>
> I plan to migrate from thunderbird to mutt.
>
> In thunderbird it is possible to define custom tags (e.g. debian
> with color red), so that the mails labeled with debian are
> highlighted red.
>
> Is that also possible with mutt?
>

Read the doc of mutt

and well... a line of my muttrc
color index red black "~h \"^To:.*debian-user@lists\.debian\.org\""


> PJ
>
>

--
Porqu� loitar e matar, se podes amar e sonhar

/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \

Wolodja Wentland

unread,
Oct 24, 2009, 1:00:27 PM10/24/09
to
On Fri, Oct 23, 2009 at 17:00 -0400, Rob Owens wrote:
> On Thu, Oct 22, 2009 at 06:31:40PM +0200, Peter Jordan wrote:
> > Is that also possible with mutt?

> Why not instead use procmail to file all debian mail in a "debian"
> folder. Here's part of my .procmailrc

Exactly!

> :0:
> * ^TOdebi...@lists.debian.org
> debian-user

I would suggest using maildir and the following catch-all rule for
debian mailing lists:


:0
* ^X-Mailing-List: <debi...@lists.debian.org>
* ^X-Mailing-List: <debian-\/[-a-zA-Z0-9]+
debian.$MATCH/

That will create maildirs for all debian lists to which you are
subscribed. Combined with the following:

mailboxes `find ~/mail/ -type d -name cur -printf '%h '| sed "s/ /\n/g"|sort | tr '\n' ' '`

somewhere in your muttrc you will never have to make any adjustment for
new maildirs and debian mailing lists you subscribe to.

kind regards

Wolodja

signature.asc

Nate Bargmann

unread,
Oct 24, 2009, 1:30:51 PM10/24/09
to
Since a couple of you are recommending maildir, is there an easy way to
transisition from mox format to maildir? For example, my indox file is
1.3 GiB and if I delete a message from more than a few days old it can
take several minutes before the writing is complete. (Yes, I should
manage my inbox better...)

I also have my procmail working well sort each mailing list into its
own mbox file. How drastic would those changes be?

- Nate >>

--

"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://n0nb.us/index.html

Wolodja Wentland

unread,
Oct 24, 2009, 1:30:51 PM10/24/09
to
On Fri, Oct 23, 2009 at 19:00 -0500, Nate Bargmann wrote:
> Since a couple of you are recommending maildir, is there an easy way to
> transisition from mox format to maildir? For example, my indox file is
> 1.3 GiB and if I delete a message from more than a few days old it can
> take several minutes before the writing is complete. (Yes, I should
> manage my inbox better...)
How do you stand that? I would say it's time for maildirs. ;-)

There are plenty of scripts to do this, but maybe:

http://batleth.sapienti-sat.org/projects/mb2md/

just works for you? Just install it with:

# aptitude install mb2md

If there is a better one I would hope that it will be mentioned by
another reader. You could also just google for "mbox2maildir", "convert
mbox to maildir" and the like.

> I also have my procmail working well sort each mailing list into its
> own mbox file. How drastic would those changes be?

What change? The conversion itself or adapting the procmail rules to use
maildirs instead of mboxes? Both are not hard, the conversion will take
some time and the latter will be as easy as just appending a '/' at the
end of the rule.

Some mutt unrelated performance tips.

* read: http://www.mutt.org/doc/devel/manual.html#tuning

and compile your own version of mutt that enables tokyocabinet. This is
a bug in Debian which was closed although it shouldn't have been [1].

To compile it yourself you have to:

$ apt-get source mutt

Apply the following patch to mutt-X.Y.Z/debian/rules

--- snip ---
--- mutt-1.5.20/debian/rules 2009-10-24 11:39:17.000000000 +0200
+++ mutt-1.5.20-tokyo/debian/rules 2009-10-07 12:29:00.000000000 +0200
@@ -10,8 +10,9 @@
###
# header cache backend
# HCACHE_DB := bdb
-HCACHE_DB := gdbm
+# HCACHE_DB := gdbm
# HCACHE_DB := qdbm
+HCACHE_DB := tokyocabinet
###
# GPGME backend
GPGME := --enable-gpgme
@@ -34,6 +35,9 @@
ifeq ($(HCACHE_DB),qdbm)
hcache_db := --without-gdbm --without-bdb --without-tokyocabinet
endif
+ifeq ($(HCACHE_DB),tokyocabinet)
+ hcache_db := --without-gdbm --without-qdbm --without-bdb --enable-tokyocabinet
+endif

confflags = --prefix=/usr \
--sysconfdir=/etc \
--- snip ---

$ dch -l+tokyocabinet
$ dpkg-buildpackage -rfakeroot -uc -b
$ dpkg -i mutt-X.Y.Z.deb

I really hope that this wishlist bug gets fixed or at least reopened.

kind regards

Wolodja

signature.asc

Rob Owens

unread,
Oct 24, 2009, 1:40:02 PM10/24/09
to
On Thu, Oct 22, 2009 at 06:31:40PM +0200, Peter Jordan wrote:
> Hello,
>
> I plan to migrate from thunderbird to mutt.
>
> In thunderbird it is possible to define custom tags (e.g. debian with
> color red), so that the mails labeled with debian are highlighted red.
>
> Is that also possible with mutt?
>
Why not instead use procmail to file all debian mail in a "debian"
folder. Here's part of my .procmailrc

PATH=/usr/local/bin:/usr/bin:/bin
HOME=/home/rob
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/.procmaillog

:0:
* ^TOdebi...@lists.debian.org
debian-user

-Rob

Jochen Schulz

unread,
Oct 24, 2009, 1:40:21 PM10/24/09
to
Nate Bargmann:

>
> Since a couple of you are recommending maildir, is there an easy way to
> transisition from mox format to maildir?

$ apt-cache search convert mbox maildir
mb2md - Converting Mbox mailboxes to Maildir format

> I also have my procmail working well sort each mailing list into its
> own mbox file. How drastic would those changes be?

For existing rules, you just have to append a '/' to the mailbox targets
in your procmail recipes. That tells procmail to save in maildir format
instead of mbox.

A general catch-all rule for Debian mailing lists has already been
posted.

J.
--
I often play sports / do exercise.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>

signature.asc

Jari Fredriksson

unread,
Oct 24, 2009, 1:40:21 PM10/24/09
to

24.10.2009 0:00, Rob Owens kirjoitti:
> On Thu, Oct 22, 2009 at 06:31:40PM +0200, Peter Jordan wrote:
>> Hello,
>>
>> I plan to migrate from thunderbird to mutt.
>>
>> In thunderbird it is possible to define custom tags (e.g. debian with
>> color red), so that the mails labeled with debian are highlighted red.
>>
>> Is that also possible with mutt?
>>
> Why not instead use procmail to file all debian mail in a "debian"
> folder. Here's part of my .procmailrc
>
> PATH=/usr/local/bin:/usr/bin:/bin
> HOME=/home/rob
> MAILDIR=$HOME/Mail
> DEFAULT=$MAILDIR/mbox
> LOGFILE=$MAILDIR/.procmaillog
>
> :0:
> * ^TOdebi...@lists.debian.org
> debian-user
>
> -Rob
>
>

Hum.

Why to use mbox format, as it is horrible if you think about incremental
backup and anyway it is horrible.

Maildir rocks.

--
http://www.iki.fi/jarif/

Are you making all this up as you go along?

signature.asc

Nate Bargmann

unread,
Oct 24, 2009, 11:10:02 PM10/24/09
to
* Wolodja Wentland <went...@cl.uni-heidelberg.de> [2009 Oct 24 04:45 -0500]:

> On Fri, Oct 23, 2009 at 19:00 -0500, Nate Bargmann wrote:
> > Since a couple of you are recommending maildir, is there an easy way to
> > transisition from mox format to maildir? For example, my indox file is
> > 1.3 GiB and if I delete a message from more than a few days old it can
> > take several minutes before the writing is complete. (Yes, I should
> > manage my inbox better...)
> How do you stand that? I would say it's time for maildirs. ;-)

I just completed the conversion. Thanks to both of you for suggesting
the mb2md package. I had not found that before and it made everything
a snap. I embelished Mutt a bit using info from its wiki on Maildir
and adjusted Procmail as well. So far, so good.

Thanks much!

Nick Lidakis

unread,
Oct 24, 2009, 11:40:01 PM10/24/09
to
On Sat, Oct 24, 2009 at 12:15:26AM +0300, Jari Fredriksson wrote:
>
> Hum.
>
> Why to use mbox format, as it is horrible if you think about incremental
> backup and anyway it is horrible.
>
> Maildir rocks.

I'm a former Thunderbird user and now use mutt. I'm currently using
the mbox format, and I notice that I can't read any emails until mutt has
finished downloading from my mail server. Does this have anything to do with
mbox having locks? Can this be rectified with using maildir?

John L Fjellstad

unread,
Oct 25, 2009, 7:10:02 AM10/25/09
to
Peter Jordan <usern...@gmx.info> writes:

> Hello,
>
> I plan to migrate from thunderbird to mutt.
>
> In thunderbird it is possible to define custom tags (e.g. debian with
> color red), so that the mails labeled with debian are highlighted red.
>
> Is that also possible with mutt?

Tagging is called labeling in mutt.

You can add a label header, X-Label, and have mutt sort (and color) on
that.
if you add the X-Label header, you can limit your view to that label
with ~y pattern (check the mutt documentation).

I basically label it with either maildrop (automatic labeling when mail
comes in), or editlabel(1) script

(1) http://blitiri.com.ar/p/other/mutt-labels/

--
John L. Fjellstad
web: http://www.fjellstad.org/ Quis custodiet ipsos custodes

Chris Bannister

unread,
Nov 1, 2009, 3:10:01 AM11/1/09
to
On Sat, Oct 24, 2009 at 10:05:32PM -0500, Nate Bargmann wrote:
> * Wolodja Wentland <went...@cl.uni-heidelberg.de> [2009 Oct 24 04:45 -0500]:
> > On Fri, Oct 23, 2009 at 19:00 -0500, Nate Bargmann wrote:
> > > Since a couple of you are recommending maildir, is there an easy way to
> > > transisition from mox format to maildir? For example, my indox file is
> > > 1.3 GiB and if I delete a message from more than a few days old it can
> > > take several minutes before the writing is complete. (Yes, I should
> > > manage my inbox better...)
> > How do you stand that? I would say it's time for maildirs. ;-)
>
> I just completed the conversion. Thanks to both of you for suggesting
> the mb2md package. I had not found that before and it made everything
> a snap. I embelished Mutt a bit using info from its wiki on Maildir
> and adjusted Procmail as well. So far, so good.

Since locking isn't needed for maildir, remove the colon after the 0,
i.e

for mbox

:0:

for maildir

:0

--
Chris.

Nate Bargmann

unread,
Nov 1, 2009, 8:00:02 AM11/1/09
to
* Chris Bannister <mocki...@earthlight.co.nz> [2009 Nov 01 02:06 -0600]:

> On Sat, Oct 24, 2009 at 10:05:32PM -0500, Nate Bargmann wrote:

> > I just completed the conversion. Thanks to both of you for suggesting
> > the mb2md package. I had not found that before and it made everything
> > a snap. I embelished Mutt a bit using info from its wiki on Maildir
> > and adjusted Procmail as well. So far, so good.
>
> Since locking isn't needed for maildir, remove the colon after the 0,
> i.e
>
> for mbox
>
> :0:
>
> for maildir
>
> :0

Thanks for that tidbit (yes, I'm revisiting the docs). The only
remaining "issue" is that locally generated cron mail doesn't have a
date and time (my MTA is the very simple esmtp package) which puts it
at the top of my Inbox. Not really a problem now that I'm aware of it.
In the mbox format they were appended at the bottom of the file and
Mutt able to determine the date/time of themessage and sort it
accordingly.

- Nate >>

--

"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://n0nb.us/index.html

0 new messages