Using Maildir format, changing mailbox
Cameron Simpson
cs at cskk.id.au
Fri Jun 5 22:16:12 UTC 2020
Just an aside...
On 05Jun2020 16:15, mutt-ml at mail.com <mutt-ml at mail.com> wrote:
>To explain: I have a number of different email accounts on a number of
>different servers, and I do that for a number of reasons, one being
>that my email is then effectively pre-filtered.
Separating work and personal email is well worth doning anyway, not just
for the filtering.
I've a remark about your procmail...
>Work email goes to,
>say, someone at example.com, non-work email to somebody at example.org, and
>so on. I want that to be the case with my local email experience as
>well, so I've set up procmail to deliver into different directories
>depending on where the email comes from/to:
>
># work
>:0:
>* ^(From|Cc|To).*someone at example.com
>Work/
>
># play
>:0:
>* ^(From|Cc|To).*somebody at example.org
>Play/
Maybe I'm misreading your setup, but I presume you're fetching from
different mailboxes here? Fetch from work, fetch from personal, etc? If
so, I'd use distinct procmailrcs altogether - no reliance on the
addresses in the headers (which are unreliable); instead process the
work messages with one set of rules and personal by another, done by
supplying a "work procmail" when fetching from work etc.
OTOH, if work and personal just forward to some common mail address then
you're in split up the premixed stream, and back into rules of the form
you're already using.
In my case, I pull from a work mailbox into a distinct spool, and
process that spool as "from work" using the "work rules". Entirely
distinct from the personal rules.
Now, as it happens, the work rules in my case go "take a copy to the
work folder for cross referencing, then file the message in the common
spool". Which then runs my common rules for a mixed stream just like
yours.
But the initial file deduces work vs personal from the fetch source, not
the header contents.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Mutt-users
mailing list