[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rmail tips
From: |
Ben Hancock |
Subject: |
Re: Rmail tips |
Date: |
Mon, 12 Feb 2024 05:53:38 -0800 |
[Colin wrote:]
>>> I filter incoming mail by means of procmail and then read the
>>> mailboxes using "rmail-input". This might be too simple for what you
>>> want, of course.
[Ben replied:]
>> This seems like a fine approach and I've tried a similar setup; my
>> issue was that new messages in these inboxes weren't treated as
>> "unseen" by rmail, so it was hard to distinguish new mail.
[Then Colin responded:]
> I don't know if it's possible in rmail to "flag" an email as
> unread. There is a variable "rmail-unseen-attr-index" with a default
> value of 6. Maybe it's possible to use that, but I've never tried.
This was a good clue. Rmail recognizes a set of email labels or
"attributes" that have special meaning[1], including "unseen" (or
unread). After digging into rmail.el and looking at my mail headers more
closely, it looks like each message that is read into rmail-file-name
via the 'rmail' command is given a special header that looks like this:
X-RMAIL-ATTRIBUTES: --------
When a message is "unseen", the dash at position 6 (zero-indexed) gets a
special "U" flag, changing the header to this:
X--RMAIL-ATTRIBUTES: ------U-
Rmail treats these messages differently; it will default to opening the
first unseen message when reading a file into rmail, and unseen messages
get a different face in the summary buffer so they stand out.
I also use fetchmail with maildrop(1) as my mail delivery agent, and it
supports adding a custom header to incoming messages (via the '-A'
flag); I imagine procmail has a similar option. So it seems feasible to
set the set the "unseen" flag on messages that are filtered to different
files this way, even without them being read via the 'rmail' command. I
may give that a shot.
Thanks!
- Ben
[1] See: info '(emacs) Rmail Attributes'
- Re: Rmail tips, Fernando de Morais, 2024/02/06
- Re: Rmail tips, Dr Rainer Woitok, 2024/02/07
- Re: Rmail tips, Ben Hancock, 2024/02/09
- Re: Rmail tips, Colin Baxter, 2024/02/09
- Re: Rmail tips, Ben Hancock, 2024/02/10
- Re: Rmail tips, Colin Baxter, 2024/02/10
- Re: Rmail tips,
Ben Hancock <=
- Re: Rmail tips, Colin Baxter, 2024/02/12
- Re: Rmail tips, Ben Hancock, 2024/02/15
- Re: Rmail tips, Colin Baxter, 2024/02/21
Re: Rmail tips, Fernando de Morais, 2024/02/15
Re: Rmail tips, Fernando de Morais, 2024/02/15