---
name: "lei-export-kw"
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-export-kw"
---

# lei-export-kw(1)

export keywords (flags) to Maildir and IMAP folders

## NAME

lei-export-kw - export keywords (flags) to Maildir and IMAP folders

## SYNOPSIS

lei export-kw --all=\[\<remote\|local\>\]

lei export-kw MFOLDER \[MFOLDER...\]

## DESCRIPTION

`"lei export-kw"` propagates keywords (e.g. `"seen"`, `"answered"`, `"flagged"`, etc.) from lei/store to IMAP folders and/or Maildirs. It only works for messages lei knows about (e.g. was used as a `"lei q --output"`, or imported via [**lei-import**(1)](/lei-import/1.md), or indexed via [**lei-index**(1)](/lei-index/1.md)).

It does not delete, write, nor modify messages themselves; it only sets metadata on Maildirs and IMAP folders.

## OPTIONS

- \--all

  Export to all local Maildirs and remote IMAP folders

- \--all=local

  Export all local Maildirs

- \--all=remote

  Export 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-refresh-mail-sync**(1)](/lei-refresh-mail-sync/1.md), [**lei-tag**(1)](/lei-tag/1.md)
