#### 3.20.18 mailutils maildir_fixup ¶

This command fixes attributes and UID assignments in ‘`maildir`’ mailboxes created by mailutils versions prior to 3.10.90.

Attribute flags used in ‘`maildir`’ mailboxes by these versions of mailutils were a bit different from those described in the original description of the ‘`maildir`’ format12 and those used by another implementations. The discrepancy has been reported in the Mailutils bug tracker13 and was fixed in version 3.10.90. Along with this fix, measures has been taken to ensure persistence of UID assignments between different sessions. Starting from version 3.10.90, whenever `mailutils` library opens a maildir mailbox, it determines the version that created it. If the mailbox is writable and the library determines that the mailbox is affected by the two problems described above, it fixes the mailbox on the fly. This process is completely transparent to the user.

If you operate a site with a large number of mailboxes in ‘`maildir`’ formats, you may choose to fix up all of them at once. That’s what the `maildir_fixup` command is for. It takes one or more directory names as its arguments and recursively scans these directories in search for ‘`maildir`’ mailboxes. Each mailbox found is analyzed and a fix-up is performed, if necessary. If a mailbox is already in the new format, it remains untouched.

The following options modify the program’s behavior:

`-v`
`--verbose`

  List each maildir name before processing it.

`-n`
`--dry-run`

  Don’t touch maildirs, just print their names,

The `maildir_fixup` tool reads main mailutils configuration file by default. It looks for program-specific settings in the section ‘`program maildir_fixup`’. If the `include` statement is present that has a directory name as its argument, the file `maildir_fixup` is looked up in that directory and parsed, if present.

The program uses the following configuration statements:

Statement | Reference
--- | ---
debug | See The `debug` Statement.
locking | See The `locking` Statement.
mandatory-locking | See mandatory-locking statement.

#### Footnotes

##### (12)

http://cr.yp.to/proto/maildir.html

##### (13)

http://savannah.gnu.org/bugs/?56428