---
name: "lei-refresh-mail-sync"
section: "1"
platform: "linux"
package: "lei"
version: "2.1.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/lei-refresh-mail-sync"
---

# lei-refresh-mail-sync(1)

refresh sync info with Maildir, IMAP

## NAME

lei-refresh-mail-sync - refresh sync info with Maildir, IMAP

## SYNOPSIS

lei refresh-mail-sync --all\[=\<remote\|local\>\]

lei refresh-mail-sync MFOLDER \[MFOLDER...\]

## DESCRIPTION

`"lei refresh-mail-sync"` is intended to keep old messages indexed with [**lei-index**(1)](/lei-index/1.md) retrievable if Maildir flags change a filename.  It will prune invalid entries for messages which no longer exist in a Maildir.

It is also useful for ensuring [**lei-export-kw**(1)](/lei-export-kw/1.md) can propagate keyword (flag) changes to Maildirs and IMAP folders.

It only needs read-only access to Maildirs and IMAP folders and will not attempt to write to them at all.

## OPTIONS

- \--all

  Refresh all local Maildirs and remote IMAP folders

- \--all=local

  Refresh all local Maildirs

- \--all=remote

  Refresh all remote IMAP folders

## CONTACT

Feedback welcome via plain-text mail to \<mailto:meta@public-inbox.org\>

The mail archives are hosted at \<https://public-inbox.org/meta/\> and \<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/\>

## COPYRIGHT

Copyright all contributors \<mailto:meta@public-inbox.org\>

License: AGPL-3.0+ \<https://www.gnu.org/licenses/agpl-3.0.txt\>

## SEE ALSO

[**lei-index**(1)](/lei-index/1.md), [**lei-export-kw**(1)](/lei-export-kw/1.md), [**lei-ls-mail-sync**(1)](/lei-ls-mail-sync/1.md)
