Your company here — click to reach over 10,000 unique daily visitors

lei-import - Man Page

one-time import of messages into local store


lei import [Options] LOCATION [LOCATION...] [+L:LABEL]

lei import [Options] (--stdin|-)


Import messages into the local storage of lei(1) (aka lei/store).  LOCATION is a source of messages: a directory (Maildir), a file, or a URL (imap://, imaps://, nntp://, or nntps://).  URLs requiring authentication use git-credential(1) to fill in the username and password.

For a regular file, the LOCATION must have a <format>: prefix specifying one of the following formats: mboxrd, mboxcl2, mboxcl, or mboxo.



Message input format.  Unless messages are given on stdin, using a format prefix with LOCATION is preferred.


Read messages from stdin.


mbox(5) locking method(s) to use: dotlock, fcntl, flock or none.

Default: fcntl,dotlock


Add the given LABEL to all messages imported, where LABEL is an arbitrary user-defined value consisting of lowercase and digits. See lei-tag(1) for more info on labels.

For example, specifying +L:inbox applies the inbox label to all messages being imported.

May be specified multiple times to apply multiple labels.

Default: none


Apply KEYWORD to all messages being imported in addition to any per-message keywords from the store (unless --no-kw is specified).  See lei-tag(1) for more info on keywords.

May be specified multiple times to apply multiple keywords.

Default: none


Don't import message keywords (or "flags" in IMAP terminology).


Import already seen IMAP and NNTP articles.


Whether to wrap git(1) and curl(1) commands with torsocks(1).

Default: auto


Use the specified proxy (e.g., socks5h://0:9050).

Consider imap.proxy and nntp.proxy which can be persistently configured on a per-host basis in lei-config(1).

See lei-config(1) for various imap.* and nntp.* options.


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/>

See Also

lei-config(1), lei-index(1), lei-store-format(5)

Referenced By

lei(1), lei-add-external(1), lei-export-kw(1), lei-forget-mail-sync(1), lei-index(1), lei-ls-label(1), lei-ls-mail-source(1), lei-mail-formats(5), lei-mail-sync-overview(7), lei-overview(7), lei-reindex(1), public-inbox-glossary(7).

1993-10-02 public-inbox.git public-inbox user manual