1DOVEADM-IMPORT(1) Dovecot DOVEADM-IMPORT(1)
2
3
4
6 doveadm-import - Import messages matching given search query
7
9 doveadm [-Dv] import [-S socket_path] source_location dest_parent
10 search_query
11 doveadm [-Dv] import [-S socket_path] -A source_location dest_parent
12 search_query
13 doveadm [-Dv] import [-S socket_path] -u user source_location dest_par‐
14 ent search_query
15
17 This command can be used to import mails from another mail storage
18 specified by source_location to one or more user's mailboxes. All the
19 mailboxes are imported under the given dest_parent mailbox, or to root
20 level if dest_parent is empty (""). The search_query can be used to
21 restrict which mailboxes or messages are imported.
22
23 In the first form, doveadm(1) will executed the import action with the
24 environment of the logged in system user.
25
26 In the second form, the mails will be imported for all users.
27
28 In the third form, the mails will be imported only for given user(s).
29
31 Global doveadm(1) options:
32
33 -D Enables verbosity and debug messages.
34
35 -v Enables verbosity, including progress counter.
36
37 Command specific options:
38
39 -A If the -A option is present, the command will be performed for
40 all users. Using this option in combination with system users
41 from userdb { driver = passwd } is not recommended, because it
42 contains also users with a lower UID than the one configured
43 with the first_valid_uid setting.
44
45 When the SQL userdb module is used make sure that the iter‐
46 ate_query setting in /etc/dovecot/dovecot-sql.conf.ext matches
47 your database layout. When using the LDAP userdb module, make
48 sure that the iterate_attrs and iterate_filter settings in
49 /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema. Oth‐
50 erwise doveadm(1) will be unable to iterate over all users.
51
52 -S socket_path
53 The option's argument is either an absolute path to a local UNIX
54 domain socket, or a hostname and port (hostname:port), in order
55 to connect a remote host via a TCP socket.
56
57 This allows an administrator to execute doveadm(1) mail commands
58 through the given socket.
59
60 -u user/mask
61 Run the command only for the given user. It's also possible to
62 use '*' and '?' wildcards (e.g. -u *@example.org).
63 When neither the -A option nor -u user was specified, the com‐
64 mand will be executed with the environment of the currently
65 logged in user.
66
68 dest_parent
69 The name of the destination mailbox, under which the mails
70 should be imported. doveadm(1) will create the dest_parent
71 mailbox if it doesn't exist.
72
73 search_query
74 Copy messages matching this search query. See
75 doveadm-search-query(7) for details.
76
77 source_location
78 This argument specifies the mailbox format and location of the
79 source location. The syntax is the same as for the mail_location
80 setting. For example: maildir:/backup/20101126/jane.doe/Maildir
81 or mdbox:/srv/mail/john.doe/mdbox:ALT=/nfsmount/john.doe/mdbox
82
84 This example imports all mails from a backup under a backup-20101026
85 mailbox:
86
87 doveadm import -u jane.doe@example.org \
88 mdbox:/backup/20101026/jane.doe/mdbox backup-20101026 all
89
90 Another example that imports only messages from foo@example.org in the
91 backup mdbox's INBOX to jane's INBOX:
92
93 doveadm import -u jane.doe@example.org \
94 mdbox:~/mdbox-backup "" mailbox INBOX from foo@example.org
95
97 Report bugs, including doveconf -n output, to the Dovecot Mailing List
98 <dovecot@dovecot.org>. Information about reporting bugs is available
99 at: http://dovecot.org/bugreport.html
100
102 doveadm(1), doveadm-fetch(1), doveadm-search(1),
103 doveadm-search-query(7)
104
105
106
107Dovecot v2.0 2010-11-26 DOVEADM-IMPORT(1)