On 18Sep2015 16:56, Ian Zimmerman <i...@buug.org> wrote:
Is it possible (and safe) to set the record variable, or the Fcc header, to the folder from where I send the mail?

I believe so. There's no reason you can't save a copy in the source folder - I do this myself, though in a more roundabout way. Keeps the whole thread there.

For example, what can be said
about this .muttrc setting:

set record="~/Mail/inbox"

I also do this (in a more roundabout way:-) I like a copy of my outbound email in my inbox for reference, especially since if I get a private or list+private reply that is where a copy will be filed by my filer.

I don't want to handle archiving my own messages with a Bcc, because
they typically don't have the earmark by which I grab incoming mail and
shove it into the folder where it belongs.

Another question would be if the normal folder shortcuts are available
in this context.  Could the above be written as follows?

set record="=inbox"

I think so, but I'm less sure.

For comparison, this is what I do instead of the above.

Firstly, I open my mail folders by a wrapper script which does the following:

- looks at the basename of the folder and computes my save/delete folder as =OLD/YYYY/basename (I map 'd' and 'ctrl-d' to move the message to this folder instead of a real delete)

- sets the header_cache to a per-folder path also; mutt doesn't seem to let me share the header cache between two open instances - this at least reduces the conflict to that specific folder - sets the environment variable $SENDMESG_FCC to its current value (default "spool-out") plus the current folder

- invokes mutt with the header_cache as above, and "fcc-hook . current-folder" and "save-hook . delete-folder" as above.

For ease of use, this script is aliased as "+", so I open folders like this:

 + mutt

The result of this is that:

 - all my "deleted" mail gets archived by year and folder name

 - less header_chache contention

 - fcc to the current folder, like you, and save to the archive

Regarding $SENDMESG_FCC: my muttrc sets $sendmail to my sendmesg-fcc script:

 https://bitbucket.org/cameron_simpson/css/src/tip/bin/sendmesg-fcc

which sends the message, and if successfully dispatches also copies the message to all the folders named in $SENDMESG_FCC. For added complication, the sending bit is done via my "sendmesg" script:

 https://bitbucket.org/cameron_simpson/css/src/tip/bin/sendmesg

which does some extra stuff:

 - adds a Message-ID if missing

- pulls out addresses of the form "foo@usenet" and if there are any posts the message to the newsgroups anmed as "foo"

- if there are other addresses, sends the message via the normal sendmail command

A word regarding the "spool-out" folder: my mail filer works by monitoring a set of maildirs, including "spool" and "spool-out". The ruleset associated with spool-out looks like this:

 < env
 out,me,spool-to-phone,spool-xref . .
 "| cs-aliases-add-email sent" . .

plus a rule to write a line to an activity log for work-related messages. This does my outbound message filing:

- copy to the folders "out" (outbound message copies), "me" (my "important" message inbox), "spool-to-phone" (also monitored, copies messages to the inbox my phone monitors), "spool-xref" (also monitored, files messages by an assortment of things)

- pipes the message to "cs-aliases-add-email sent", which adds the recipient addresses to the "sent" group in my mail address db - I consider such addresses "known" and accept them into my main inbox if I get a reply

Complex but flexible!

Cheers,
Cameron Simpson <c...@zip.com.au>

Draw little boxes with arrows.  It helps.       - Michael J. Eager

Reply via email to