logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mu-move - move a message file or change its flags

Absolute And Relative Flags

       You  can  specify  the  flags  with the --flags parameter, and do either with either absolute or relative
       flags.

       Absolute flags just specify the new flags by their letters; e.g. to  specify  a  Trashed,  Seen,  Replied
       message, you'd use --flagsSTR.  #+end_example

       Relative flags are relative to the current flags for some message, and each of the flags is prefixed with
       either + ("add this flag") or - ("remove this flag").

       So to add the Seen flag and remove the Draft flag from whatever the message already has, --flags+S-D.

       You cannot combine relative and relative flags.

Author

       Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

Common Options

-d,--debug
       Makes mu generate extra debug information, useful for debugging the  program  itself.  Debug  information
       goes to the standard logging location; see mu(1).

   -q,--quiet
       Causes  mu  not to output informational messages and progress information to standard output, but only to
       the log file. Error messages will still be sent to standard error. Note that muindex is much faster with
       --quiet, so it is recommended you use this option when using mu from scripts etc.

   --log-stderr
       Causes mu to not output log messages to standard error, in addition  to  sending  them  to  the  standard
       logging location.

   --nocolor
       Do not use ANSI colors. The environment variable NO_COLOR can be used as an alternative to --nocolor.

   -V,--version
       Prints mu version and copyright information.

   -h,--help
       Lists the various command line options.

Description

mumove is the command for moving messages in a Maildir or changing their flags.

       For  any  change,  both the message file in the file system as well as its representation in the database
       are updated accordingly.

       The source message file and target-maildir must reside under the root-maildir for mu's database  (see  muinfostore).

Examples

changesomeflags
              $ mu move /home/user/Maildir/inbox/cur/1695559560.a73985881f4611ac2.hostname!2,S --flags +F
              /home/user/Maildir/inbox/cur/1695559560.a73985881f4611ac2.hostname!2,FS

   movetoadifferentmaildir
              $ mu move /home/user/Maildir/project1/cur/1695559560.a73985881f4611ac2.hostname!2,S /project2
              /home/user/Maildir/project2/cur/1695559560.a73985881f4611ac2.hostname!2,S

Flags

       (Note:  if  you  are  not  familiar  with  Maildirs,  please  refer  to  the  maildir(5) man-page, or see
       http://cr.yp.to/proto/maildir.html)

       The message flags specify the Maildir-metadata for a message and are represented by uppercase letters  at
       the  end  of  the  message file name for all `non-new' messages, i.e. messages that live in the cur/ sub-
       directory of a Maildir.

                                    ┌───────────────────────────────────────────┐
                                    │ Flag   Meaning                            │
                                    ├───────────────────────────────────────────┤
                                    │ D      Draft message                      │
                                    │ F      Flagged message                    │
                                    │ P      Passed message (i.e., `forwarded') │
                                    │ R      Replied message                    │
                                    │ S      Seen message                       │
                                    │ T      Trashed; to be deleted later       │
                                    └───────────────────────────────────────────┘

       New messages (in the new/ sub-directory) do not have flags encoded in their file-name; but we mu uses `N'
       in the --flags to represent that:

                                                  ┌────────────────┐
                                                  │ Flag   Meaning │
                                                  ├────────────────┤
                                                  │ N      New     │
                                                  └────────────────┘

       Thus, changing flags means changing the letters at the end of the message file-name, except when  setting
       or removing the `N' (new) flag. Setting or un-setting the New flag causes the message is to be moved from
       cur/ to new/ or vice-versa, respectively. When marking a message as New, it looses the other flags.

Move Options

--flagsflags
       Specify the new message flags. See FLAGS for details.

   --change-name
       Change  the  basename  of the message file when moving; this can be useful when using some external tools
       such as mbsync(1) which otherwise get confused

   --update-dups
       Update the flags of duplicate messages too, where "duplicate messages" are defined as  all  message  that
       share  the same message-id. Note that the Draft/Flagged/Trashed flags are deliberately not changed if you
       change those on the source message.

   -n,--dry-run
       Print the target filename(s), but don't change anything.

       Note that with the --change-name, the target name is not constant, so you cannot use a dry-run to predict
       the exact name when doing a `real' run.

Name

       mu-move - move a message file or change its flags

Reporting Bugs

       Please report bugs at https://github.com/djcb/mu/issues.

See Also

maildir(5)

                                                                                                      MUMOVE(1)

Synopsis

mu [COMMON-OPTIONS] move [OPTIONS] SRC [--flags=FLAGS] [TARGET]

See Also