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