]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/lei-import.pod
ds: share long_step between NNTP and IMAP
[public-inbox.git] / Documentation / lei-import.pod
1 =head1 NAME
2
3 lei-import - one-time import of messages into local store
4
5 =head1 SYNOPSIS
6
7 lei import [OPTIONS] LOCATION [LOCATION...] [+L:LABEL]
8
9 lei import [OPTIONS] (--stdin|-)
10
11 =head1 DESCRIPTION
12
13 Import messages into the local storage of L<lei(1)>.  C<LOCATION> is a
14 source of messages: a directory (Maildir), a file, or a URL
15 (C<imap://>, C<imaps://>, C<nntp://>, or C<nntps://>).  URLs requiring
16 authentication use L<git-credential(1)> to
17 fill in the username and password.
18
19 For a regular file, the C<LOCATION> must have a C<E<lt>formatE<gt>:>
20 prefix specifying one of the following formats: C<mboxrd>,
21 C<mboxcl2>, C<mboxcl>, or C<mboxo>.
22
23 =head1 OPTIONS
24
25 =over
26
27 =item -F MAIL_FORMAT
28
29 =item --in-format=MAIL_FORMAT
30
31 Message input format.  Unless messages are given on stdin, using a
32 format prefix with C<LOCATION> is preferred.
33
34 =item --stdin
35
36 Read messages from stdin.
37
38 =item --lock
39
40 L<mbox(5)> locking method(s) to use: C<dotlock>, C<fcntl>, C<flock> or
41 C<none>.
42
43 Default: fcntl,dotlock
44
45 =item +L:LABEL
46
47 Add the given C<LABEL> to all messages imported, where C<LABEL>
48 is an arbitrary user-defined value consisting of lowercase and digits.
49 See L<lei-tag(1)> for more info on labels.
50
51 For example, specifying C<+L:inbox> applies the C<inbox> label
52 to all messages being imported.
53
54 May be specified multiple times to apply multiple labels.
55
56 Default: none
57
58 =item +kw:KEYWORD
59
60 Apply C<KEYWORD> to all messages being imported in addition
61 to any per-message keywords from the store (unless C<--no-kw>
62 is specified).  See L<lei-tag(1)> for more info on keywords.
63
64 May be specified multiple times to apply multiple keywords.
65
66 Default: none
67
68 =item --no-kw
69
70 Don't import message keywords (or "flags" in IMAP terminology).
71
72 =item --no-incremental
73
74 Import already seen IMAP and NNTP articles.
75
76 =item --torsocks=auto|no|yes
77
78 =item --no-torsocks
79
80 Whether to wrap L<git(1)> and L<curl(1)> commands with L<torsocks(1)>.
81
82 Default: C<auto>
83
84 =item --proxy=PROTO://HOST[:PORT]
85
86 Use the specified proxy (e.g., C<socks5h://0:9050>).
87
88 =back
89
90 =head1 CONTACT
91
92 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
93
94 The mail archives are hosted at L<https://public-inbox.org/meta/> and
95 L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
96
97 =head1 COPYRIGHT
98
99 Copyright all contributors L<mailto:meta@public-inbox.org>
100
101 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
102
103 =head1 SEE ALSO
104
105 L<lei-index(1)>