[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do you manage debian mails on your mailbox?



Antoine Beaupré <anarcat@debian.org> writes:

> For example, to reply to your email, I didn't use GNUS, because then
> outgoing mail doesn't properly gets filed (haven't figured out *that*
> part just yet in GNUS I guess): instead it goes into a
> `nnfolder+archive:sent.2021-03` ... thing (group? folder?). Heck, I
> don't even know where that is actually stored. ;)

It's a file in your ~/Mail directory in regular mailbox format, IIRC.

You can configure where you want outgoing mail to go, and you can even
make it change depending on what group you're in when you send the mail,
but it's a little fiddly.  I personally like having all my sent mail
stored separately in dated folders, so I use this configuration, which
stores Usenet messages in a separate set of folders than email messages
(this also has a bunch of other settings, since other things are all
configured through the same gnus-posting-styles variable):

(setq gnus-posting-styles
      '(("."
         (address "eagle@eyrie.org")
         (name "Russ Allbery")
         (organization "The Eyrie")
         (signature-file "~/docs/sigs/eyrie")
         (eval
          (setq gnus-message-archive-group (rra-archive-group "mail"))))

        ((message-news-p)
         (eval
          (setq gnus-message-archive-group (rra-archive-group "news"))))

        ((or (string-match "^nnml:lists\\.debian\\." gnus-newsgroup-name)
             (string-match "^nnml:project\\.debian" gnus-newsgroup-name)
             (string-match "^nnml:lists\\.announce\\.debian"
                           gnus-newsgroup-name)
             (string-match "^nndoc\\+bug-ephemeral:" gnus-newsgroup-name))
         (address "rra@debian.org")
         (signature-file "~/docs/sigs/debian"))))

Each matching block is run in sequence, so later blocks override earlier
ones.  You can see where I could have put in a rule to put my sent Debian
messages elsewhere, and I could also have set the archive group to the
current group if I wanted.

rra-archive-group is this small function, which just handles setting up
the dated groups:

;; Used to generate the name of archive groups in the nnml hierarchy.
(defun rra-archive-group (base)
  "Given a base string, returns a dated archive group name."
  (concat "sent." base ".unfiled." (format-time-string "%Y-%m")))

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: