LEI-IMPORT(1)

πŸ’Œ lei-import β€” bestie edition

okay so this is lei-import(1), straight out of the public-inbox user manual, and it's literally the "one-time import of messages into local store" page. iykyk πŸ’…


✨ NAME ✨

lei-import β€” one-time import of messages into your local store. yes, one-time. it's giving "grab the mail and go" πŸŽ€


🌸 SYNOPSIS 🌸

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

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: you're importing messages into the local storage of lei(1) (aka lei/store) β€” that's the whole vibe. πŸ’–

LOCATION is where your messages come from. It can be:

  • a directory (Maildir),
  • a file,
  • or a URL β€” and the URL can be imap://, imaps://, nntp://, or nntps://.

If a URL needs authentication, it uses git-credential(1) to fill in the username and password. no cap, it handles that for you πŸ”₯

For a regular file, the LOCATION must have a <format>: prefix telling it which format you mean. the allowed formats are mboxrd, mboxcl2, mboxcl, and mboxo. don't skip the prefix bestie, it's required 😭

πŸ’… OPTIONS πŸ’…

  • -F MAIL_FORMAT, --in-format=MAIL_FORMAT β€” message input format. unless the messages are coming in on stdin, using a format prefix with LOCATION is preferred (like, that's the cuter way to do it ✨).
  • --stdin β€” read messages from stdin. classic.
  • --lock β€” which mbox(5) locking method(s) to use: dotlock, fcntl, flock or none.

Default: fcntl,dotlock

  • +L:LABEL β€” adds the given LABEL to all messages imported. LABEL is an arbitrary user-defined value consisting of lowercase and digits. see lei-tag(1) for more info on labels 🏷️

like, for example, specifying +L:inbox applies the inbox label to all messages being imported. cute, right?

may be specified multiple times to apply multiple labels πŸ‘‘

Default: none

  • +kw:KEYWORD β€” apply KEYWORD to all messages being imported, on top of 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

  • --no-kw β€” don't import message keywords (or "flags" in IMAP terminology). we're leaving those at home πŸ™ˆ
  • --no-incremental β€” import already seen IMAP and NNTP articles. yep, even the ones it's already seen. main character energy.
  • --torsocks=auto|no|yes, --no-torsocks β€” whether to wrap git(1) and curl(1) commands with torsocks(1).

Default: auto

  • --proxy=PROTOCOL://HOST[:PORT] β€” 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). lowkey the better move 🫢

  • --noisy β€” warn on misformatted email headers. not particularly useful, but this was the default prior to public-inbox 2.0.0. new in public-inbox 2.0.0. πŸ’€

also: see lei-config(1) for various imap.* and nntp.* options. there's lore there.


πŸ“¬ 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 all contributors <mailto:meta@public-inbox.org>

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


πŸ‘€ SEE ALSO πŸ‘€

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


okay that's the whole page, go import something iconic πŸ’œβœ¨

β€” signed off from public-inbox.git, dated 1993-10-02, and yes it's giving vintage but it's still slaying πŸŽ€

πŸ“¦ where this page comes from