MU-MOVE(1)

πŸ¦‹ MU-MOVE(1) β€” the manual page, but make it cute

okay bestie, welcome to mu-move, straight out of the General Commands Manual section πŸ’… this is the one that moves your messages around and messes with their flags, and yes it's as good as it sounds.

✨ NAME ✨

mu-move β€” move a message file or change its flags 🫢

πŸ“œ SYNOPSIS πŸ“œ

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

πŸ’– DESCRIPTION πŸ’–

mu move is the command for moving messages in a Maildir and for changing their flags. two jobs, one icon, we love a multitasker ✨

For any change, both the message file in the file system and its representation in the database get updated accordingly. like, both. always. no cap.

The source message file and the target-maildir must both live under the root-maildir for mu's database β€” check mu info store if you're not sure where that is πŸ‘‘


🚚 MOVE OPTIONS 🚚

  • --flags flags β€” set the brand new message flags. the full deets live down in FLAGS πŸ’«
  • --change-name β€” changes the basename of the message file while moving. lowkey a lifesaver when you're using external tools like mbsync(1) that would otherwise get all confused πŸ™ˆ
  • --update-dups β€” also updates the flags of duplicate messages. "duplicate messages" here means all messages that share the same message-id. heads up though: the Draft/Flagged/Trashed flags are deliberately not changed if you change those on the source message. not a bug, it's on purpose πŸ’…
  • -n, --dry-run β€” prints the target filename(s) but doesn't actually change anything. pure vibes, zero consequences 🌸
⚠️ note that with --change-name the target name is not constant, so you cannot use a dry-run to predict the exact name you'd get from a 'real' run. the dry-run is giving estimation, not prophecy 😭

🌈 COMMON OPTIONS 🌈

  • -d, --debug β€” makes mu spit out extra debug information, which is exactly what you want when you're debugging the program itself. the debug info goes to the standard logging location; peep mu(1) for that πŸ’€
  • -q, --quiet β€” mu stops sending informational messages and progress info to standard output, and only writes them to the log file instead. error messages still go to standard error, because errors are main characters and refuse to be silenced. also note that mu index is much faster with --quiet, so if you're running mu from scripts etc., this is the move, fr fr ⭐
  • --log-stderr β€” causes mu to not output log messages to standard error, on top of sending them to the standard logging location πŸŒ™
  • --nocolor β€” no ANSI colors. if you're anti-vibes, you can also just set the environment variable NO_COLOR instead of passing this flag πŸŽ€
  • -V, --version β€” prints the mu version and all the copyright info πŸ‘‘
  • -h, --help β€” lists the various command line options. your little cheat sheet bestie 🫢

🏷️ FLAGS 🏷️

πŸ’‘ quick note: if you are not familiar with Maildirs, please go read the maildir(5) man-page, or check out http://cr.yp.to/proto/maildir.html β€” it's giving required reading πŸ“š

The message flags specify the Maildir-metadata for a message, and they show up as uppercase letters at the end of the message file name, for all non-new messages β€” i.e. messages living in the cur/ sub-directory of a Maildir ✨

  • 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 (the ones chilling in the new/ sub-directory) do not have flags encoded in their file-name β€” but mu uses N in the --flags to represent exactly that:

  • N β€” New

So changing flags basically means changing the letters at the end of the message file-name… except when you're setting or removing that N (new) flag. Setting or un-setting the New flag makes the message get moved from cur/ to new/ or vice-versa, respectively πŸ¦‹ and when you mark a message as New, it loses the other flags. that's just how it is, periodt.

🌸 ABSOLUTE AND RELATIVE FLAGS 🌸

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

Absolute flags just spell out the new flags by their letters. e.g. to specify a Trashed, Seen, Replied message, you'd use --flags STR πŸ’…

Relative flags are relative to the current flags of some message, and each flag gets 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, you'd do --flags +S-D πŸ”₯

⚠️ You cannot combine absolute and relative flags. pick a lane bestie 😭

🎬 EXAMPLES 🎬

✨ change some flags ✨

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

✨ move to a different maildir ✨

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

πŸ› REPORTING BUGS πŸ›

found a bug? please report it at https://github.com/djcb/mu/issues β€” the devs genuinely want to know, no gatekeeping πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

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

This manpage is part of mu 1.14.2.

Copyright © 2008-2026 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 🫢

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie πŸŽ€ stay slaying with your Maildirs β€” mu-move from mu 1.14.2, Β© 2008-2026 Dirk-Jan C. Binnema, and this page belongs to the General Commands Manual section ✨ mwah πŸ’…

πŸ“¦ where this page comes from