Discussion:
How to organize mail in folders?
(too old to reply)
Kai Grossjohann
2007-07-10 22:57:10 UTC
Permalink
I used to use Gnus which is a newsreader at heart. Therefore the method
to organize mail in folders ("groups" in Gnus-speak) was different from
what I think I need with Mutt.

I'd like to get some ideas from you how you organize your mail.

For reference, here is what I think the problem might be.

I distribute incoming mail across several folders according to the
address they were sent to -- I am subscribed to quite a number of
mailing lists.

For most mailing lists, I want to know which messages are still to do,
and also to keep old messages that have already been processed.

With Gnus, I marked the to-do messages as important ("flagged" them, in
Mutt-speak, I think). After it was done, the message was marked as
read. Gnus would automatically show me both new messages and important
messages, hiding the ones marked as read.

I think Mutt always shows me all messages, so this method cannot be
used.

tia,
Kai
William Yardley
2007-07-10 23:02:54 UTC
Permalink
Post by Kai Grossjohann
With Gnus, I marked the to-do messages as important ("flagged" them, in
Mutt-speak, I think). After it was done, the message was marked as
read. Gnus would automatically show me both new messages and important
messages, hiding the ones marked as read.
I think Mutt always shows me all messages, so this method cannot be
used.
If you delete them, they won't show up anymore. :>

If you don't like the idea of totally deleting them, you could apply the
trash folder patch, and save them to a trash folder for later deleting
and / or archiving. If you want to keep different trashes for different
folders, this can be accomplished with folder hooks.

Personally, I leave messages marked as "New" until I've responded to
them or dealt with whatever needed to be dealt with, and then I either
leave them in the folder (but unread), or delete them.

I don't think you can /hide/ old and / or read messages, but you can
color them differently if you want.

w
Gary Johnson
2007-07-10 23:06:04 UTC
Permalink
Post by Kai Grossjohann
With Gnus, I marked the to-do messages as important ("flagged" them, in
Mutt-speak, I think). After it was done, the message was marked as
read. Gnus would automatically show me both new messages and important
messages, hiding the ones marked as read.
I think Mutt always shows me all messages, so this method cannot be
used.
Type l (the letter ell) to limit the messages that mutt displays,
followed by

~F|~N

to display only those messages that are either flagged (~F) or new
(~N). See the mutt manual, especially the section on "Patterns" for
more examples.

HTH,
Gary
Patrick Shanahan
2007-07-10 23:23:31 UTC
Permalink
Post by Gary Johnson
Type l (the letter ell) to limit the messages that mutt displays,
followed by
~F|~N
to display only those messages that are either flagged (~F) or new
(~N). See the mutt manual, especially the section on "Patterns" for
more examples.
You might even consider binding the limit[s] (described above) to
easily remembered key strokes, and you are good to go :^)
--
Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535 @ http://counter.li.org
Angel Olivera
2007-07-11 02:13:10 UTC
Permalink
Post by Patrick Shanahan
Post by Gary Johnson
Type l (the letter ell) to limit the messages that mutt displays,
followed by
~F|~N
to display only those messages that are either flagged (~F) or new
(~N). See the mutt manual, especially the section on "Patterns" for
more examples.
You might even consider binding the limit[s] (described above) to
easily remembered key strokes, and you are good to go :^)
That + a folder-hook and he might get the exact desired behavior.
--
redondos
Kai Grossjohann
2007-07-11 15:03:23 UTC
Permalink
Post by Kai Grossjohann
I used to use Gnus which is a newsreader at heart. Therefore the method
to organize mail in folders ("groups" in Gnus-speak) was different from
what I think I need with Mutt.
I'd like to get some ideas from you how you organize your mail.
Thank you for all your suggestions how I might achieve the old behavior
with Mutt that I had with Gnus. They are very useful. But it's not
what I was looking for, that would be continuing war^H^H^HGnus with
other means.

What I'm looking for is some suggestions on how else I might organize my
mail, that fits more with what Mutt offers. I think most of you face
the same basic situation as I do:

- Receive personal mail and mailing list mail.

- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).

- Want to archive a large portion of mail.

- Want to have an overview of messages that still need action of some
type.

- Don't want the archive to interfere (too much) with this overview.

Right? So what do you do?

tia,
Kai
Kyle Wheeler
2007-07-11 15:21:17 UTC
Permalink
Post by Kai Grossjohann
What I'm looking for is some suggestions on how else I might organize
my mail, that fits more with what Mutt offers. I think most of you
- Receive personal mail and mailing list mail.
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
- Want to archive a large portion of mail.
- Want to have an overview of messages that still need action of some
type.
- Don't want the archive to interfere (too much) with this overview.
Right? So what do you do?
I have my mail delivered via procmail, which puts mailing list mail
into a folder for each list. Personal mail (i.e. everything else) goes
to the inbox. Of course, spam is filtered out first.

In mutt I have defined several groups of addresses (using the group
command or the -group flag to the alias command), including a 'family'
group, a 'friends' group, a 'work' group, and so forth. Each group
also has its own folder, and also each has an fcc-save-hook to specify
that mail to and from that group should go into the group-specific
folder. I view all folders except the INBOX in threaded view, so all
the messages and their responses are connected. The INBOX is viewed in
order by date received. I also have an fcc-hook set so that mail I
send to mailing lists is not saved (instead, I receive copies from the
lists, so that I know it was successfully posted).

I have my inbox and my favorite mailing lists added to my list of
watched mailboxes (using the 'mailboxes' command), so that new mail to
them gets noticed by mutt.

My archiving is handled by cron, and only on specific folders. Because
I store my mail all in maildir format, this is really easy to do with
a simple shell-script. Messages older than a specific age (usually 3
months) is moved into a large archive folder. About once a year or so,
I move messages from that archive folder into a year-specific archive
folder (but I could do that with cron too).

Essentially, messages in my INBOX I consider as "to do" messages, and
once things get filed (which is easy because of all my save-hooks and
fcc-save-hooks), they're "out of sight, out of mind".

Is that more what you had in mind?

~Kyle
- --
I hold it that a little rebellion, now and then, is a good thing, and
as necessary in the political world as storms are in the physical.
-- Thomas Jefferson
Angel Olivera
2007-07-11 18:05:10 UTC
Permalink
On Wed 11.Jul.07 09:21, Kyle Wheeler wrote:
[snip]
I also have an fcc-hook set so that mail I send to mailing lists is not
saved (instead, I receive copies from the lists, so that I know it was
successfully posted).
Our setup is almost identical, with this exception. I am currently
saving my outgoing messages in my "Sent" folder, which is huge and I
have to archive into a bzipped mbox in order for it not to become a
problem. Why I do this is because if my message gets sent out but for
some reason never reaches the mailing list, then I have to retype it
instead of resending it. I would love to only save in my Sent maildir
those messages addressed to non-mailing lists, though.

So the question is: how do you cope with these situation so that
disappearing MLmessages don't have to be written all over again?

(Yes, this is very unfrequent. But when it happens it is a major drag.)
--
redondos
Kyle Wheeler
2007-07-11 18:11:48 UTC
Permalink
Post by Angel Olivera
So the question is: how do you cope with these situation so that
disappearing MLmessages don't have to be written all over again?
(Yes, this is very unfrequent. But when it happens it is a major drag.)
I don't have a particularly slick way of dealing with it. I've
discovered that messages are often left in my $TMP directory (or /tmp)
and not deleted for some reason, and that sometimes saves me the
trouble of retyping it, but for the most part, I value the sanity of
not having to store that many duplicate messages over the convenience
of not having to retype things on the rare occasion that they are
lost.

It occurs to me, though, that you may be able to have procmail feed
your mailing list messages (whose return address match your posting
address) to a script that will extract the message-ID (e.g. with
formail) and delete the message with that message-ID from your sent
mailbox (this is easy if Sent is stored as a Maildir, probably harder
if it's an mbox), and then deliver the message to the mailing list
folder.

~Kyle
- --
We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us really happy is something to be
enthusiastic about.
-- Charles Kingsley
Gary Johnson
2007-07-11 18:50:09 UTC
Permalink
Post by Angel Olivera
[snip]
I also have an fcc-hook set so that mail I send to mailing lists is not
saved (instead, I receive copies from the lists, so that I know it was
successfully posted).
Our setup is almost identical, with this exception. I am currently saving
my outgoing messages in my "Sent" folder, which is huge and I have to
archive into a bzipped mbox in order for it not to become a problem. Why I
do this is because if my message gets sent out but for some reason never
reaches the mailing list, then I have to retype it instead of resending it.
I would love to only save in my Sent maildir those messages addressed to
non-mailing lists, though.
So the question is: how do you cope with these situation so that
disappearing MLmessages don't have to be written all over again?
(Yes, this is very unfrequent. But when it happens it is a major drag.)
By default, copies of all my outgoing messages are saved to one
"Sent" folder. However, I have fcc-save-hooks for all my common
recipients, so most of my outgoing messages are copied to individual
folders, one for each recipient, or group of recipients, or project.

For mailing lists, I have a ~/Mail/Incoming/ directory into which a
procmail-like MDA delivers all incoming mailing-list messages, one
mbox per mailing list. I also have a ~/Mail/Lists/ directory into
which I save copies of all outgoing messages to lists, again one
mbox per mailing list, using fcc-save-hooks. For this list, for
example:

fcc-save-hook '~t "mutt-users"' +Lists/mutt-users

For monitoring incoming mail, I usually run two instances of mutt:
one for my default mailbox and one for mailing lists. I use macros
to set 'mailboxes' appropriately for each instance.

HTH,
Gary
David J. Neu
2007-07-11 19:26:26 UTC
Permalink
Post by Angel Olivera
[snip]
I also have an fcc-hook set so that mail I send to mailing lists is not
saved (instead, I receive copies from the lists, so that I know it was
successfully posted).
Our setup is almost identical, with this exception. I am currently
saving my outgoing messages in my "Sent" folder, which is huge and I
have to archive into a bzipped mbox in order for it not to become a
problem.
Not sure if this helps, but I organize all my mail chronologically, like
this:

#the following sets the default folder to save
#mail to as in-2003-04 if the current month is 2003-04
save-hook .* +"in-`date '+%Y-%m'`"

#the following sets the default folder to save
#mail to as out-2003-04 if the current month is 2003-04
#i.e. it specifies a sent mail folder
set record="=out-`date '+%Y-%m'`"

The result, at least for me, is that the folder sizes stay in check.

Cheers,
David
Chris G
2007-07-11 17:39:35 UTC
Permalink
Post by Kai Grossjohann
Post by Kai Grossjohann
I used to use Gnus which is a newsreader at heart. Therefore the method
to organize mail in folders ("groups" in Gnus-speak) was different from
what I think I need with Mutt.
I'd like to get some ideas from you how you organize your mail.
Thank you for all your suggestions how I might achieve the old behavior
with Mutt that I had with Gnus. They are very useful. But it's not
what I was looking for, that would be continuing war^H^H^HGnus with
other means.
What I'm looking for is some suggestions on how else I might organize my
mail, that fits more with what Mutt offers. I think most of you face
- Receive personal mail and mailing list mail.
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
- Want to archive a large portion of mail.
- Want to have an overview of messages that still need action of some
type.
- Don't want the archive to interfere (too much) with this overview.
Right? So what do you do?
My approach is basically as follows:-

Incoming mail is sorted into mailboxes corresponding to mailing
lists, personal mail and one or two other places.

I use the mailboxes command in my muttrc to get mutt to flag
incoming mail, with the more important mailboxes earlier in the
list.

I have to admit that I delete most incoming mail. Messages that I
want to keep I save in a separate hierarchy from the incoming mail
which can be archived etc. as required.
--
Chris Green
Michelle Konzack
2007-07-19 17:26:31 UTC
Permalink
######################################################################
ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION
I am currently NOT in Strasbourg because I have the last
17 days of my military service and can not reply in short delays.
######################################################################
Post by Kai Grossjohann
Thank you for all your suggestions how I might achieve the old behavior
with Mutt that I had with Gnus. They are very useful. But it's not
what I was looking for, that would be continuing war^H^H^HGnus with
other means.
What I'm looking for is some suggestions on how else I might organize my
mail, that fits more with what Mutt offers. I think most of you face
- Receive personal mail and mailing list mail.
"fetchmail" or "getmail"
Post by Kai Grossjohann
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
"procmail" or "maildrop"
Post by Kai Grossjohann
- Want to archive a large portion of mail.
"archivemail"
Post by Kai Grossjohann
- Want to have an overview of messages that still need action of some
type.
???
Post by Kai Grossjohann
- Don't want the archive to interfere (too much) with this overview.
???
Post by Kai Grossjohann
Right? So what do you do?
...its up to you. :-)

Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSN LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Kai Grossjohann
2007-07-20 13:33:37 UTC
Permalink
Michelle,

I think there is a misunderstanding. I wanted to understand how other
people process their email. You are giving me pointers to programs but
don't describe how you use them.

Here is a potential strategy for handling mail:

- All incoming mail goes to inbox.
- I process all mails from inbox.
- Some messages I read, then delete right away.
- Other messages I read, then archive by project.
By project means that there is a folder for each project.
- Some messages I read, then respond to and archive (by project).
- Some messages I read, decide that I can't handle them right
away, so I put them in the todo folder. Every morning I go
through my todo folder.
- Some messages (often those sent by me) are waiting for responses
from others. I file those in the "pending" folder. Every
morning I go through my "pending" folder to see whether a response
has arrived.

Some of the above steps could be automated. The strategy does not
handle mailing lists well. But I hope it shows one possible response
and makes it clear in what way your response differs from what I was
expecting.

(I do not follow the above strategy, if that matters. Maybe I should.
Or maybe you have a better strategy?)
Post by Michelle Konzack
Post by Kai Grossjohann
What I'm looking for is some suggestions on how else I might organize my
mail, that fits more with what Mutt offers. I think most of you face
- Receive personal mail and mailing list mail.
"fetchmail" or "getmail"
Those do not know the difference between personal mail and mailing list
mail, I think.
Post by Michelle Konzack
Post by Kai Grossjohann
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
"procmail" or "maildrop"
Those do not check whether new mail is available that needs to be
processed.
Post by Michelle Konzack
Post by Kai Grossjohann
- Want to archive a large portion of mail.
"archivemail"
This is a good hint. Thanks a lot!
Post by Michelle Konzack
Post by Kai Grossjohann
- Want to have an overview of messages that still need action of some
type.
???
I get a message. It could be something I read and then delete. Or it
could be something that I read and then archive. Or I respond right
away and then delete or archive.

These cases are easy.

Then there are messages that mean I need to do something, but I need
longer to do them. Or I need to get feedback from somewhere. Or
whatever. My memory is quite bad, so I like to have the computer store
a list of these open ends so I don't have to remember them.
Post by Michelle Konzack
Post by Kai Grossjohann
- Don't want the archive to interfere (too much) with this overview.
???
Suppose I have a folder for the foo project. Then which of the messages
in that folder are open ends that still need action, and which of them
are archived messages?
Post by Michelle Konzack
Post by Kai Grossjohann
Right? So what do you do?
...its up to you. :-)
I hope that what _you_ do is not up to _me_.

Kai
Chris G
2007-07-20 14:19:42 UTC
Permalink
Post by Kai Grossjohann
Michelle,
I think there is a misunderstanding. I wanted to understand how other
people process their email. You are giving me pointers to programs but
don't describe how you use them.
- All incoming mail goes to inbox.
- I process all mails from inbox.
- Some messages I read, then delete right away.
- Other messages I read, then archive by project.
By project means that there is a folder for each project.
- Some messages I read, then respond to and archive (by project).
- Some messages I read, decide that I can't handle them right
away, so I put them in the todo folder. Every morning I go
through my todo folder.
- Some messages (often those sent by me) are waiting for responses
from others. I file those in the "pending" folder. Every
morning I go through my "pending" folder to see whether a response
has arrived.
Some of the above steps could be automated. The strategy does not
handle mailing lists well. But I hope it shows one possible response
and makes it clear in what way your response differs from what I was
expecting.
The above strategy is a pretty good description of what I actually do.

The only difference in my case is that I use a procmail lookalike
(it's a perl sript) to sort incoming mail, basically into a mailbox
per mailing list and my main inbox.

Which parts of the above would you automate? I can't really see what
can be automated except, possibly, the "archive by project". My
archive folders don't really correspond to anything that could be
gleaned from the E-Mails (except, in some cases, the sender) so the
ones I save I just save manually.
--
Chris Green
Kai Grossjohann
2007-07-20 15:05:23 UTC
Permalink
Post by Chris G
The above strategy is a pretty good description of what I actually do.
I wish I was that organized. It's difficult for me to muster the
self-discipline to actually do this.
Post by Chris G
The only difference in my case is that I use a procmail lookalike
(it's a perl sript) to sort incoming mail, basically into a mailbox
per mailing list and my main inbox.
Yes, that seems like a good extension. And easy enough to do.
Post by Chris G
Which parts of the above would you automate?
Michelle pointed out archivemail. This way, I could have an "active"
folder per project, then automatically move messages to a corresponding
"archive" folder.

I guess the mbox feature (automatically move read messages from spool
file/folder to mbox on exit of spool folder) could be used to put them
into the todo folder. Not sure whether that would be workable.

Does anyone have experiences?
Post by Chris G
I can't really see what can be automated except, possibly, the
"archive by project". My archive folders don't really correspond to
anything that could be gleaned from the E-Mails (except, in some
cases, the sender) so the ones I save I just save manually.
Suppose that I only have a global inbox and a global todo folder (aside
from the mailing lists). Then I could tell Mutt to always remember
message ids of refoldered messages together with their target folder.

Then "archive by project" could look in the References header whether
one of the message ids there is known, then automatically file to the
correct folder.

Kai
Chris G
2007-07-20 15:28:49 UTC
Permalink
Post by Kai Grossjohann
Post by Chris G
The above strategy is a pretty good description of what I actually do.
I wish I was that organized. It's difficult for me to muster the
self-discipline to actually do this.
The major discipline in my experience is just that of creating a
usable and easy to navigate hierarchy for the saved messages. It's
taken me a few years to tune this to my satisfaction. Once created it
makes saving messages relatively easy.
Post by Kai Grossjohann
Post by Chris G
The only difference in my case is that I use a procmail lookalike
(it's a perl sript) to sort incoming mail, basically into a mailbox
per mailing list and my main inbox.
Yes, that seems like a good extension. And easy enough to do.
Post by Chris G
Which parts of the above would you automate?
Michelle pointed out archivemail. This way, I could have an "active"
folder per project, then automatically move messages to a corresponding
"archive" folder.
I do something akin to this I suppose. My mail lives on a remote
system (at Gradwell.Net) where there is limited disk space, though
much less limited now in fact. I do a daily backup from there to my
home system using rsync. I use maildir so each message is a separate
file and thus old mail messages on my home system will never get
deleted when doing the rsync copy, this means that I can 'thin out'
the stored mail on the remote system at Gradwell and still have the
old messages on my home system.
Post by Kai Grossjohann
Post by Chris G
I can't really see what can be automated except, possibly, the
"archive by project". My archive folders don't really correspond to
anything that could be gleaned from the E-Mails (except, in some
cases, the sender) so the ones I save I just save manually.
Suppose that I only have a global inbox and a global todo folder (aside
from the mailing lists). Then I could tell Mutt to always remember
message ids of refoldered messages together with their target folder.
Then "archive by project" could look in the References header whether
one of the message ids there is known, then automatically file to the
correct folder.
Yes, I suppose so, however my todo/pending messages rarely get moved
to storage/archive.
--
Chris Green
Gary Johnson
2007-07-20 17:17:14 UTC
Permalink
Post by Kai Grossjohann
Post by Kai Grossjohann
- Want to have an overview of messages that still need action of some
type.
???
I get a message. It could be something I read and then delete. Or it
could be something that I read and then archive. Or I respond right
away and then delete or archive.
These cases are easy.
Then there are messages that mean I need to do something, but I need
longer to do them. Or I need to get feedback from somewhere. Or
whatever. My memory is quite bad, so I like to have the computer store
a list of these open ends so I don't have to remember them.
I use mutt's 'important' flag (toggled with the 'F' key) for that.
Flagged messages are indicated by a '!' in the index menu and just
those messages can be displayed using the limit function:

l~F

I also use the "Expires:" header to tag messages whose lifetime is
limited. This doesn't help me remember things that need to be done,
but allows me to identify and delete or move messages that are no
longer important, such as meeting reminders. See

http://www.spocom.com/users/gjohnson/mutt/#expires

for more about this.

HTH,
Gary
Mark E. Mallett
2007-07-20 21:44:12 UTC
Permalink
This post might be inappropriate. Click to display it.
Stefano Sabatini
2007-07-21 11:15:28 UTC
Permalink
Post by Kai Grossjohann
Michelle,
I think there is a misunderstanding. I wanted to understand how other
people process their email. You are giving me pointers to programs but
don't describe how you use them.
- All incoming mail goes to inbox.
- I process all mails from inbox.
- Some messages I read, then delete right away.
- Other messages I read, then archive by project.
By project means that there is a folder for each project.
- Some messages I read, then respond to and archive (by project).
- Some messages I read, decide that I can't handle them right
away, so I put them in the todo folder. Every morning I go
through my todo folder.
- Some messages (often those sent by me) are waiting for responses
from others. I file those in the "pending" folder. Every
morning I go through my "pending" folder to see whether a response
has arrived.
Some of the above steps could be automated. The strategy does not
handle mailing lists well. But I hope it shows one possible response
and makes it clear in what way your response differs from what I was
expecting.
My strategy:

* all mailboxes, both archives and inboxes ones are in maildir format.

* messages are fetched by fetchmail then processed by procmail. Every
mailing list has a corresponding maildir in inbox/, for example I
have inbox/mutt-users, inbox/gnome-list etc, and there is a generic
mailbox (inbox/generic) for all the other mails. I could easily
modify this to have different inboxes where to manage mails incoming
not from ML (e.g. inbox/generic, inbox/work, etc.). I also have an
inbox/almost-certainly-spam and inbox/maybe-spam, where all the
mails marked as spam by spamassassin go.

* for each inbox I have a corresponding mutt snippet in a distinct file.
Every snippet is contained in ~/.mutt/profiles, and is named something like:
10-todo
50-mutt-users
99-spam

I source all these profiles at mutt startup with:
source ~/.mutt/cat-profiles|

in ~/.mutt/mutrc.

cat-profiles contains this:

#! /bin/bash

# cat all the profiles files in a single one file (that is the output of
# this script
# this output is meant to be source by mutt in the muttrc file
find ~/.mutt/profiles/ -perm -700 -type f | sort | xargs cat

This is problematic since an error in some profile results
difficult to detect. The perfect solution would be to have the
source command supports something lke this:

source `find ~/.mutt/profiles/ -perm -700 -type f | sort | xargs cat`

but unfortunately this can't work (source only supports one
filename, though I think it would be simple to change with some
knowledge of the mutt code).

* I have an emacs function which automatically writes the mutt snippet
(profile) for a mailing list. Here it is the elisp code:

(defun muttrc-insert-list-rc (&optional list-address list-nickname attribution signature)
"Insert a configuration snippet based on the arguments, using the
muttrc-insert-list-rc-skeleton function."
(interactive)
(let* ((list-address (if (null list-address)
(read-string "list address of the mailing list: ")))
(list-nickname (if (null list-nickname)
(read-string "list nickname of the mailing list: "
;; default value
(progn
(string-match "\\([-_[:alnum:]]+\\)@" list-address)
(match-string 1 list-address)))))
(attribution (if (null attribution)
(read-string "attribution string: "
"On date %d, %n wrote:")))
(signature (if (null signature)
(read-string "signature: " "~/.signatures/en/linux"))))
(skeleton-insert
'(nil
"# write this line in your muttrc file:" \n
`(concat "# source \"~/.mutt/profiles/" list-nickname "\"") \n
\n
`(concat "mailboxes " "\"~/Mail/inbox/" list-nickname "\"") \n
`(concat "subscribe " list-address) \n
\n
"# hook to activate when moving to the corresponding dir" \n
`(concat "folder-hook +inbox/" list-nickname "\\") \n
Post by Kai Grossjohann
"'"
`(concat "save-hook . +archive/recent/" list-nickname)
"'" \n
\n
"# what to do with the messages sent to this profile" \n
`(concat "send-hook '~t " list-address "' \\") \n
Post by Kai Grossjohann
"'"
`(concat "set attribution=\"" attribution "\"") ";\\" \n
Post by Kai Grossjohann
`(concat "set locale=\"en_US\"") ";\\" \n
`(concat "set signature=\"" signature "\"")
"'" \n
\n
"# where has to be saved the copy of the message sent to this profile" \n
Post by Kai Grossjohann
`(concat "fcc-hook '~t " list-address "' +inbox/" list-nickname) \n
))))

The resulting snippet, with some editing, looks like this:

mailboxes "~/Mail/inbox/mutt-users"

subscribe mutt-***@mutt.org

# hook to activate when changing to the corresponding dir
folder-hook +inbox/mutt-users \
'save-hook . +archive/recent/mutt-users'

# what to do with the messages sent to this profile
send-hook '~t mutt-***@mutt.org' \
'set attribution="On date %d, %n muttered:";\
set locale=en_US;\
set signature="fortune ~/share/fortune/en/mutt-tips|"'

fcc-hook '~t mutt-***@mutt.org' +inbox/mutt-users

* From the profiles snippets, result that every message is
automatically saved in a corresponding archive dir (e.g.
inbox/mutt-users -> archive/recent/mutt-users).

* Every week I have a cron script that runs a perl script which scans
every archive/recent/folder and put the messages older than six
months in a corresponding archive/old/folder-year.

* Messages for which I want to reply are kept in inbox/folder.

* I like to store received and sent messages in the same folder, so my
inbox/generic and archive/{recent,old}/generic contains both
received and sent mails (which seems to me the most meaningful
thing).

HTH.

Cheers
--
mutt random tip #2
Starting from mutt 1.5.12 you can reference variables in commands with the
shell-like syntax: $variable. For example you can do:
source $alias_file
Chris G
2007-07-21 11:33:26 UTC
Permalink
Post by Stefano Sabatini
Post by Kai Grossjohann
Michelle,
I think there is a misunderstanding. I wanted to understand how other
people process their email. You are giving me pointers to programs but
don't describe how you use them.
- All incoming mail goes to inbox.
- I process all mails from inbox.
- Some messages I read, then delete right away.
- Other messages I read, then archive by project.
By project means that there is a folder for each project.
- Some messages I read, then respond to and archive (by project).
- Some messages I read, decide that I can't handle them right
away, so I put them in the todo folder. Every morning I go
through my todo folder.
- Some messages (often those sent by me) are waiting for responses
from others. I file those in the "pending" folder. Every
morning I go through my "pending" folder to see whether a response
has arrived.
Some of the above steps could be automated. The strategy does not
handle mailing lists well. But I hope it shows one possible response
and makes it clear in what way your response differs from what I was
expecting.
* all mailboxes, both archives and inboxes ones are in maildir format.
* messages are fetched by fetchmail then processed by procmail. Every
mailing list has a corresponding maildir in inbox/, for example I
have inbox/mutt-users, inbox/gnome-list etc, and there is a generic
mailbox (inbox/generic) for all the other mails. I could easily
modify this to have different inboxes where to manage mails incoming
not from ML (e.g. inbox/generic, inbox/work, etc.). I also have an
inbox/almost-certainly-spam and inbox/maybe-spam, where all the
mails marked as spam by spamassassin go.
Apart from the names this is almost exactly what I do (using a perl
script rather than procmail, but that's a detail).


However the subsequent (seems very complex) stuff is far more than I
want to have to maintain! :-)

[big snip]

What I do to manage mailing list subscriptions and the corresponding
'subscribe' and 'lists' and 'mailboxes' commands is to have a file
called 'lists' which is used by both my muttrc file and the perl
script that does procmail's job.

My muttrc file just has the following:-

lists `awk '!/^#/ {printf("%s ", $2)}' <~/.mutt/lists`
subscribe `awk '!/^#/ {printf("%s ", $2)}' <~/.mutt/lists`

and the perl script uses the same entries to direct mailing list mail
to the appropriate mailbox.

When I subscribe to a new list I just add a line the the 'lists' file,
for example the mutt line is:-

mutt mutt-***@mutt.org

I also have a line in my muttrc:-

source ~/bin/getAliases.awk|

Which generates mutt aliases from the 'lists' file. Some entries in
the 'lists' file have a third field which is text to be *removed* from
the Subject: (many mailing lists insist on putting the mailing list
name in the Subject:).
--
Chris Green
Ken Moffat
2007-07-21 22:05:50 UTC
Permalink
Post by Kai Grossjohann
Michelle,
I think there is a misunderstanding. I wanted to understand how other
people process their email. You are giving me pointers to programs but
don't describe how you use them.
Here's how I do it - probably a long way from what you want, but it
works well enough for me.

Basic features/requirements:

1. All my mail is on my local server. I have accessed it remotely
by ssh and ip address in the past, but mostly I'm at home and I use
mutt either in the console, or more usually in an xterm with ssh.

2. I'm on enough lists that I can't keep up at certain times, like
now (I read lkml, and traffic during the merge window is very
heavy).

3. This isn't for business, I don't have to respond and I don't
have to keep copies of everything (although I do keep most things
for some time).

4. I like to be able to search back through mail I've seen.
Usually, what happened more than a month or so ago is out of sight
and out of mind, but sometimes I want to refer back.

5. I don't send many mails each month, so it is convenient for me
to just have a single mailbox or directory for them. And in this
case, I very rarely want to search back through past months to see
what I said. If I do, grep and view are my friends.

6. Knowing what needs a response is a separate issue. I like
paper, but then most of my important correspondence doesn't use
email.

My disks all run ext3 filesystems - historically, ext2/3 were not
good with large directories. I haven't tested them with my current
volume of data, so I just stick to mbox format (which probably also
saves disk space for me).

The first part of my setup uses .procmailrc to put mail into
a reasonable number of different mboxes. Preceded by SpamAssassin
(and yes, everything it catches is kept for occasional review -
don't want to lose messages just because they were miscategorised).
If the mail doesn't trigger any rules, it falls through to my main
mailbox.

The second part of the setup uses a series of month directories
under ~/mailboxes, with a cron job to run at the start of each month
(my server is up 247) to stop fetchmail, backup the mailboxes from
the new month and then delete them, change the symlink from ~/mail,
and restart fetchmail. I wrote my own series of scripts (one for
root, which then calls the user script(s)). Not easily maintainable
for new users, but works for me. I've seen a reference to at least
one package for 'rotating' mailboxes in this sort of fashion on this
list, but I can't find a suitable keyword to grep through the past
mail - so in this instance, my method didn't help.

In practice, my main mailbox is a symlink to ~/mailboxes/mymail -
from time to time I will prune 'mymail', but I've got more than 2
years of my non-list correspondence. At the start of each month, I
go through and create symlinks to mailboxes from the previous month
that I want to catch up with or want to refer back to - I name these
starting with a z so that they drop off the bottom of the screen when
the number of mailboxes grows. The script also creates empty
mailboxes for spam that got through (I run sa-learn twice a day), and
for the occasional non-spam that was misidentified.

Sometimes, I create additional symlinks (y... then x...) to
specific mailboxes from earlier months that where I need to
follow-up.

Also, my lkml mailbox overflows somewhere around the 48MB mark - not
sure why, but procmail stops writing to it - so I repeat the rule to
write to 'lkml2' and potentially 'lkml3'.

This is somewhat messy, but it works well enough except when I
accidentally fill up ~/home.

Summary - main mailbox is for things I'm keeping long-term, a few
mailboxes for different things (less than 20 each month - my screen
is 40 rows in an xterm), enough space to never have to delete things
by hand, and some simple scripts to manage it. When I started using
email, I used to mostly delete after reading, or after responding.
In those days, I used netscape, and then pine, and it was all on one
box but even then it was a pain to go through deleting mail on a
high-volume list, and I often deleted things I didn't intend to, or
later wished I hadn't.

Probably, very different from what you were thinking of doing. If
you want to say 'too complex' or 'too byzantine' or 'too much space'
that's fine by me.

Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
Michelle Konzack
2007-07-24 12:51:30 UTC
Permalink
Post by Kai Grossjohann
(I do not follow the above strategy, if that matters. Maybe I should.
Or maybe you have a better strategy?)
Post by Michelle Konzack
Post by Kai Grossjohann
- Receive personal mail and mailing list mail.
"fetchmail" or "getmail"
Those do not know the difference between personal mail and mailing list
mail, I think.
It fetch the Mail form your ISP mailserver ans pass it to an MDA
Post by Kai Grossjohann
Post by Michelle Konzack
Post by Kai Grossjohann
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
"procmail" or "maildrop"
Those do not check whether new mail is available that needs to be
processed.
Hre you can set Recipes which do the stuff or invoke external
programs which check it from a database or such...
Post by Kai Grossjohann
Post by Michelle Konzack
Post by Kai Grossjohann
- Want to archive a large portion of mail.
"archivemail"
This is a good hint. Thanks a lot!
OK
Post by Kai Grossjohann
Post by Michelle Konzack
Post by Kai Grossjohann
- Want to have an overview of messages that still need action of some
type.
???
I get a message. It could be something I read and then delete. Or it
could be something that I read and then archive. Or I respond right
away and then delete or archive.
These cases are easy.
Then there are messages that mean I need to do something, but I need
longer to do them. Or I need to get feedback from somewhere. Or
whatever. My memory is quite bad, so I like to have the computer store
a list of these open ends so I don't have to remember them.
I would do this from a script and a ***@mutt
which let you set flags and such...

I do this too since I have some realy comples situation with some customers
but coded the whole stuff to my needs... And yes, I was coding/testing over
3 weeks but since 4 years it save me the day...
Post by Kai Grossjohann
Post by Michelle Konzack
Post by Kai Grossjohann
- Don't want the archive to interfere (too much) with this overview.
???
Suppose I have a folder for the foo project. Then which of the messages
in that folder are open ends that still need action, and which of them
are archived messages?
You can FLAG messages in "mutt" OR, if you can code stuff, make a script
with a dialog where aou can set FLAGS and notes and then let a cronjob
do the rest.

Please note, if you want to do individual message threating you need
definitivly Maildir folders. (my system must handel per day over 8000
messages automaticaly and I realy do not want to handel this by hand,
once for a new unhanled stuff is enough and then it must go magicaly...)
Post by Kai Grossjohann
Post by Michelle Konzack
Post by Kai Grossjohann
Right? So what do you do?
...its up to you. :-)
I hope that what _you_ do is not up to _me_.
:-)

Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSN LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
John
2007-07-21 17:04:07 UTC
Permalink
Just my 2 eurocents:

I have used Mutt for years but wanted to have a graphical MUA as well.
Also, I get a *lot* of mail so I needed automated archiving.
Furthermore, I never wanted to mark read/delete an email twice on
different locations. This is my setup now which works very well:

All my mail (many different domains and addresses) goes to one mailbox
on the Internet.
My own server pop that mail using getmail every few minutes.
Then procmail takes over and filters mail into local Maildir folders
(for identities,
I use Mutt to read these mails locally.
There is also have an IMAP server running on the same Maildir folders.
Then I have Portable Thunderbird on the various PCs where I work (on a
memory stick or in a TrueCrypt container) - this is mainly on Windows
(or Mac OSX). These connect with OpenVPN to my own server and IMAP over
that connection.
Every month, archivemail archives maildirs according to a per-maildir
configuration (e.g. older than 1 months, or older than 2 or 3 months)
into mbox format. So I get mboxes for all maildirs (~12) for every month
automatically. I can open these with mutt (not with Thunderbird of course).

This works well for me. I search old mail with grep. The main advantages
are:

- IMAP access remains quick because mailboxes do not contain 'older'
mails (configurable) so do not grow too big
- Both Mutt (locally direct to Maildir) and graphical access (via IMAP)
- Mail statuses are kept between clients (including Sent and Drafts)
- Quite secure (ssh or openvpn access are the only ways in).

HTH,

John
Post by Michelle Konzack
######################################################################
ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION
I am currently NOT in Strasbourg because I have the last
17 days of my military service and can not reply in short delays.
######################################################################
Post by Kai Grossjohann
Thank you for all your suggestions how I might achieve the old behavior
with Mutt that I had with Gnus. They are very useful. But it's not
what I was looking for, that would be continuing war^H^H^HGnus with
other means.
What I'm looking for is some suggestions on how else I might organize my
mail, that fits more with what Mutt offers. I think most of you face
- Receive personal mail and mailing list mail.
"fetchmail" or "getmail"
Post by Kai Grossjohann
- Have different strategies for handling mail depending on the address
they were sent to (some mailing lists are less important than most
personal mail, so we don't check for new mail there as often).
"procmail" or "maildrop"
Post by Kai Grossjohann
- Want to archive a large portion of mail.
"archivemail"
Post by Kai Grossjohann
- Want to have an overview of messages that still need action of some
type.
???
Post by Kai Grossjohann
- Don't want the archive to interfere (too much) with this overview.
???
Post by Kai Grossjohann
Right? So what do you do?
...its up to you. :-)
Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
Ajeet
2007-08-10 16:25:06 UTC
Permalink
Post by John
There is also have an IMAP server running on the same Maildir folders.
Then I have Portable Thunderbird on the various PCs where I work (on a
memory stick or in a TrueCrypt container) - this is mainly on Windows
(or Mac OSX). These connect with OpenVPN to my own server and IMAP over
that connection.
Why not ssh to your box directly and use mutt ? :-)
--
Regards,
Ajeet
Derek Martin
2007-08-10 17:48:49 UTC
Permalink
Post by Ajeet
Post by John
There is also have an IMAP server running on the same Maildir folders.
Then I have Portable Thunderbird on the various PCs where I work (on a
memory stick or in a TrueCrypt container) - this is mainly on Windows
(or Mac OSX). These connect with OpenVPN to my own server and IMAP over
that connection.
Why not ssh to your box directly and use mutt ? :-)
Or, mutt can be configured to do local IMAP over SSH... which has its
uses (i.e. ssh to the machine and run the imapd directly).
--
Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address. Replying to it will result in
undeliverable mail due to spam prevention. Sorry for the inconvenience.
Derek Martin
2007-08-10 17:51:31 UTC
Permalink
Post by Derek Martin
Post by Ajeet
Post by John
There is also have an IMAP server running on the same Maildir folders.
Then I have Portable Thunderbird on the various PCs where I work (on a
memory stick or in a TrueCrypt container) - this is mainly on Windows
(or Mac OSX). These connect with OpenVPN to my own server and IMAP over
that connection.
Why not ssh to your box directly and use mutt ? :-)
Or, mutt can be configured to do local IMAP over SSH... which has its
uses (i.e. ssh to the machine and run the imapd directly).
Actually... can it? I may be confusing mutt with pine. I haven't
done this in a very, very long time...
--
Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address. Replying to it will result in
undeliverable mail due to spam prevention. Sorry for the inconvenience.
Kyle Wheeler
2007-08-10 18:00:01 UTC
Permalink
Post by Derek Martin
Post by Derek Martin
Or, mutt can be configured to do local IMAP over SSH... which has
its uses (i.e. ssh to the machine and run the imapd directly).
Actually... can it? I may be confusing mutt with pine. I haven't
done this in a very, very long time...
Of course it can.

set tunnel='ssh ***@host /usr/bin/imapd'

~Kyle
- --
History will be kind to me, for I intend to write it.
-- Winston Churchill
Gary Funck
2007-08-10 18:15:30 UTC
Permalink
Post by Derek Martin
Or, mutt can be configured to do local IMAP over SSH... which has
its uses (i.e. ssh to the machine and run the imapd directly).
Alternatively, you might consider setting up IMAP Proxy,
http://www.imapproxy.org/#aaa
We've used it before to cross a firewall and it
worked well. Because it caches the IMAP cannection,
it can improve performance in some situations as well.

Here's what the FAQ says:

Why was imapproxy written in the first place?

Imapproxy was written to compensate for webmail clients that are
unable to maintain persistent connections to an IMAP server. Most
webmail clients need to log in to an IMAP server for nearly every single
transaction. This behaviour can cause tragic performance problems on the
IMAP server. imapproxy tries to deal with this problem by leaving server
connections open for a short time after a webmail client logs out. When
the webmail client connects again, imapproxy will determine if there's
a cached connection available and reuse it if possible.
Brendan Cully
2007-08-10 18:18:54 UTC
Permalink
Post by Gary Funck
Post by Derek Martin
Or, mutt can be configured to do local IMAP over SSH... which has
its uses (i.e. ssh to the machine and run the imapd directly).
Alternatively, you might consider setting up IMAP Proxy,
http://www.imapproxy.org/#aaa
We've used it before to cross a firewall and it
worked well. Because it caches the IMAP cannection,
it can improve performance in some situations as well.
it sounds a bit rube goldbergian to introduce a proxy that talks IMAP
on one end and IMAP on the other.
Gary Funck
2007-08-10 18:26:38 UTC
Permalink
Post by Brendan Cully
it sounds a bit rube goldbergian to introduce a proxy that talks IMAP
on one end and IMAP on the other.
Perhaps so. Then again, some e-mail clients don't implement
IMAP support well, and Imapproxy caches the connection-related
data. We used it to allow external access to an internal
IMAP server (with proper authentication) and it did a good job.
A regular proxy would likely have worked, but we found the
performance benefit helpful to the slower line speeds of
road warriors.
--
Gary Funck
Brendan Cully
2007-08-10 18:51:49 UTC
Permalink
Post by Gary Funck
Post by Brendan Cully
it sounds a bit rube goldbergian to introduce a proxy that talks IMAP
on one end and IMAP on the other.
Perhaps so. Then again, some e-mail clients don't implement
IMAP support well, and Imapproxy caches the connection-related
data. We used it to allow external access to an internal
IMAP server (with proper authentication) and it did a good job.
I hope this doesn't apply to mutt. Recent versions especially have
been pretty aggressive about minimizing round trips and useless
information requests, especially with header and body caching
enabled.
Kyle Wheeler
2007-08-10 18:42:49 UTC
Permalink
Post by Gary Funck
Post by Derek Martin
Or, mutt can be configured to do local IMAP over SSH... which has
its uses (i.e. ssh to the machine and run the imapd directly).
Alternatively, you might consider setting up IMAP Proxy,
http://www.imapproxy.org/#aaa
We've used it before to cross a firewall and it
worked well. Because it caches the IMAP cannection,
it can improve performance in some situations as well.
Yeah, I used to use that for a while. It helped quite a bit with our
squirrelmail/bincimap setup. After moving to Dovecot, which does it's
own authentication caching, imapproxy proved to be more of a
performance hindrance (due to extra context-swapping and memory
copying) than it was a benefit. Our setup is noticeably snappier than
it was before, even when imapproxy was involved (dovecot caches more
things than imapproxy can, and uses index files to reduce disk I/O).

BUT, you're absolutely right that imapproxy can improve performance
significantly in some situations.

~Kyle
- --
Many who claim to have been transformed by Christ's love are deeply,
even murderously, intolerant of criticism.
-- Sam Harris
Cameron Simpson
2007-07-23 04:53:09 UTC
Permalink
On 11Jul2007 17:03, Kai Grossjohann <***@emptydomain.de> wrote:
| - Receive personal mail and mailing list mail.

Tick. Personal email and various announcements land in my "+me" mailbox.

| - Have different strategies for handling mail depending on the address
| they were sent to (some mailing lists are less important than most
| personal mail, so we don't check for new mail there as often).

I have several folders for mailing lists, and several receive multiple
lists. Eg my +unix folder gets a bunch of UNIXy lists. I use the X-Label
header field to show which list a message came from, inserted by the
procmail rule that filed the message.

| - Want to archive a large portion of mail.

Nightly I roll off anything older than 6 months from folder +foo
into +ARCHIVE/foo, for most folders.

| - Want to have an overview of messages that still need action of some
| type.

I flag these ("F"). Limiting the view to flagged messages ("l~F<enter>")
shows just these in the current folder.

| - Don't want the archive to interfere (too much) with this overview.

The nightly roll-off mentioned above - the archive is separate folder.
--
Cameron Simpson <***@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Me, I'm looking for obituaries. Lately a gratifyingly large number of my
most odious near-contemporaries are achieving their long-deserved quietus.
Not enough, and not always the right ones, but their time will come.
Peeve: I may not live to see them dead.
- Lee Rudolph, ***@cis.umassd.edu
Louis-David Mitterrand
2007-07-31 10:25:04 UTC
Permalink
Post by Kai Grossjohann
I used to use Gnus which is a newsreader at heart. Therefore the method
to organize mail in folders ("groups" in Gnus-speak) was different from
what I think I need with Mutt.
I'd like to get some ideas from you how you organize your mail.
Here is a mail strategy I refined over 10 years and that serves me well:

- strong spam filter at the postfix level (running my own domain and
mail server), no client-side spam filtering,

- mailing lists are pre-sorted in ~/Maildir/.* folders by procmail, I
check them from time to time with mutt,

- mail from daemons and mailers is procmail'd in a ~/Maildir/junk-admin
folder, infrequently checked,

- mail CC'd to me is procmail'd in a ~/Maildir/.CC folder

- mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are
replies to my mailing list posts

That way my INBOX only contains messages addressed to me by live
persons. When checking that folder from a low-bandwidth/expensive
connection I can be reasonably sure that it contains only
important/urgent/relevant messages.

My mail clients usually only monitor INBOX, CC and BCC

- once INBOX messages are read they are moved by mutt to a ~/Maildir/.In
folder

- if some message is read but not yet processed I mark it as "important"
(F key) and it stays put until unmarked,

- sent messages are all copied to a ~/Maildir/.Sent folder

.In and .Sent folders are not post-sorted and no longer archived thanks
to the power of mutt's header-cache and limit features.

(procmail recipes available on request)
M. Fioretti
2007-08-15 08:39:09 UTC
Permalink
On Tue, Jul 31, 2007 12:25:04 PM +0200, Louis-David Mitterrand
...
Post by Louis-David Mitterrand
- mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are
replies to my mailing list posts
...
Post by Louis-David Mitterrand
(procmail recipes available on request)
Louis,

yes, I'm really interested in your all procmail recipes, especially
the one above (I'm trying to do the same thing myself). Configuration
files for mutt and server side anti-spam are also welcome, if you can
share them.

Thank you in advance,
Marco
--
The one book on software and digital technology that no parent
can ignore: http://digifreedom.net/
Kai Grossjohann
2007-08-15 10:58:12 UTC
Permalink
Post by M. Fioretti
yes, I'm really interested in your all procmail recipes, especially
the one [that catches Bcc'd messages] (I'm trying to do the same thing
myself).
Approach it from the opposite end:

Messages with you in the To header go in folder x, messages with you in
Cc go in y, messages from mailing lists go in z.

Then all other messages must be bcc'd to you.

Kai
Louis-David Mitterrand
2007-08-15 11:18:09 UTC
Permalink
Post by M. Fioretti
On Tue, Jul 31, 2007 12:25:04 PM +0200, Louis-David Mitterrand
Post by Louis-David Mitterrand
- mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are
replies to my mailing list posts
...
Post by Louis-David Mitterrand
(procmail recipes available on request)
Louis,
yes, I'm really interested in your all procmail recipes, especially
the one above (I'm trying to do the same thing myself). Configuration
files for mutt and server side anti-spam are also welcome, if you can
share them.
Hi,

Here are a few sections of my ~/.procmailrc:


## LDM's procmail file
MAILDIR=$HOME/Maildir
VERBOSE=on
LOGABSTRACT=yes
## pseudo variable $1 can't be used on condition line: copy the value to ARG
EXTENSION=$1

ALTERNATES=(all\.my\***@addresses|***@by\.pipes)

## all mailing list mail comes in as vindex+lists-<listname>@apartia.org
## EXTENSION thus contains the list name
:0
* EXTENSION ?? ^lists-\/.*
{
FOLDER=$MATCH

:0
*$! ^From:.*$ALTERNATES
*$! ^TO_$ALTERNATES
* ! ^References:.*\<(some|of|my|domains)\>
* ! ^From:.*@(other|patterns|to|watch|for)\
* ! HB ?? (Louis-David|Mitt?err?and) ## skip if message has my name
{
# eliminate duplicate list messages
:0 Wh: $HOMEMAIL/.msgid.lock
| formail -D 32768 $HOMEMAIL/.msgid.cache

:0
.$FOLDER/
}
:0E ## else file in .BCC
* ! ^From: mailman-owner@
.BCC/
:0E ## if from mailman-owner
.junk-admin/
}

## file in .CC
:0
*$! ()\/^To:.*$ALTERNATES
*$ ()\/^Cc:.*$ALTERNATES
.CC/

## not in To: header, low-priority stuff
:0
*$ ()\/^To:.*$ALTERNATES ## not to me
*$! ()\/^From:.*$ALTERNATES ## from me
*$ ()\/^X-Original-To:.*$ALTERNATES ## bounced to me
{ }
:0E ## trick to OR inverted above conditions
.BCC/

## beep, it goes into INBOX
BEEP=`/usr/bin/beep -f 2000`
M. Fioretti
2007-08-15 11:36:12 UTC
Permalink
On Wed, Aug 15, 2007 13:18:09 PM +0200, Louis-David Mitterrand
Louis,
thanks a lot for the prompt answer!

I'll study your recipes and come back if I'll have any question, even if they
look quite clear at a first glance.

To Kai:

I also see the point of your comment, but what Louis explained fits
more with the way I had already started to approach the same problem,
that's why I'm really interested in looking at an already tested
solution.

Thanks again, everybody,

Marco
--
The one book on software and digital technologies no parent
could ignore: http://digifreedom.net
Continue reading on narkive:
Loading...