<<< Date Index >>>     <<< Thread Index >>>

Re: Maildir by date



On Mon, Aug 13, 2007 at 02:05:23AM +0100, mal content wrote:

> I'd like to clean up the mess that is my current email
> setup.
> 
> Ideally I'd like each days worth of mail to be stored in
> its own maildir, like this:
> 
> ~/mail/$ACCOUNT/$YEAR/$MONTH/$DAY
> 
> ...where $DAY is the maildir itself. Mail will be spooled,
> as usual, in ~/mail/spool until it is read by mutt and
> saved/archived into todays maildir.
> 
> Does anybody have any idea how to do this in mutt?
> Presumably I'm going to be hacking at save-hooks or
> even piping to an external program and separate accounts
> are going to have to be handled somehow. I'm at a bit
> of a loss as to the way to do this with as few layers
> of software as possible (I'm about to switch to using
> fdm to grab mail from various places).

Is there some reason you can't do this sorting in fdm itself?  I haven't
used it, but from a quick scan of the man page it looks as though you
can accomplish what you want by putting something like this in your
config file (e.g., ~/.fdm.conf):

  # Define accounts to fetch from
  account "foo" imap [...]
  account "bar" pop3 [...]

  # Sort everything by date
  action "inbox" maildir "~/mail/%a/%[mail_year]/%[mail_month]/%[mail_day]"

> thanks,
> MC

HTH,

Paul.

-- 
Paul Hoffman <nkuitse@xxxxxxxxxxx>