1DOVEADM-DEDUPLICATE(1) Dovecot DOVEADM-DEDUPLICATE(1)
2
3
4
6 doveadm-deduplicate - expunge duplicate messages
7
9 doveadm [-Dv] deduplicate [-u user|-A|-F file] [-S socket_path] [-m]
10 search_query
11
13 This command is used to expunge duplicated messages in mailboxes.
14 doveadm deduplicate is mainly useful to revert some (more or less)
15 accidental duplication of messages, e.g. after doveadm copy or doveadm
16 import. doveadm(1) will delete the newest duplicated messages from the
17 mailbox and keep the oldest.
18 Deduplication across multiple mailboxes is not supported.
19
21 Global doveadm(1) options:
22
23 -D Enables verbosity and debug messages.
24
25 -o setting=value
26 Overrides the configuration setting from /etc/dovecot/dove‐
27 cot.conf and from the userdb with the given value. In order to
28 override multiple settings, the -o option may be specified mul‐
29 tiple times.
30
31 -v Enables verbosity, including progress counter.
32
33 Command specific options:
34
35 -A If the -A option is present, the command will be performed for
36 all users. Using this option in combination with system users
37 from userdb { driver = passwd } is not recommended, because it
38 contains also users with a lower UID than the one configured
39 with the first_valid_uid setting.
40
41 When the SQL userdb module is used make sure that the iter‐
42 ate_query setting in /etc/dovecot/dovecot-sql.conf.ext matches
43 your database layout. When using the LDAP userdb module, make
44 sure that the iterate_attrs and iterate_filter settings in
45 /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema. Oth‐
46 erwise doveadm(1) will be unable to iterate over all users.
47
48 -F file
49 Execute the command for all the users in the file. This is sim‐
50 ilar to the -A option, but instead of getting the list of users
51 from the userdb, they are read from the given file. The file
52 contains one username per line.
53
54 -S socket_path
55 The option's argument is either an absolute path to a local UNIX
56 domain socket, or a hostname and port (hostname:port), in order
57 to connect a remote host via a TCP socket.
58
59 This allows an administrator to execute doveadm(1) mail commands
60 through the given socket.
61
62 -m if the -m option is given, doveadm(1) will deduplicate by Mes‐
63 sage-Id header. By default deduplication will be done by mes‐
64 sage GUIDs.
65
66 -u user/mask
67 Run the command only for the given user. It's also possible to
68 use '*' and '?' wildcards (e.g. -u *@example.org).
69 When neither the -A option, nor the -F file option, nor the
70 -u user was specified, the command will be executed with the
71 environment of the currently logged in user.
72
74 search_query
75 expunge duplicates found from messages matching the given search
76 query. Typically a search query like 'mailbox mailbox_name OR
77 mailbox other_box' will be sufficient. See
78 doveadm-search-query(7) for details.
79
81 This example shows how to list and expunge duplicate messages from a
82 mailbox.
83
84 doveadm -f table fetch -u jane 'guid uid' mailbox a_Box | sort
85 guid uid
86 8aad0f0a30169f4bea620000ca356bad 18751
87 8aad0f0a30169f4bea620000ca356bad 18756
88 923e301ab9219b4b4f440000ca356bad 18748
89 923e301ab9219b4b4f440000ca356bad 18753
90 ...
91 doveadm deduplicate -u jane mailbox a_Box
92 doveadm -f table fetch -u jane 'guid uid' mailbox a_Box | sort
93 guid uid
94 8aad0f0a30169f4bea620000ca356bad 18751
95 923e301ab9219b4b4f440000ca356bad 18748
96 a7999e1530739c4bd26d0000ca356bad 18749
97 ...
98
100 Report bugs, including doveconf -n output, to the Dovecot Mailing List
101 <dovecot@dovecot.org>. Information about reporting bugs is available
102 at: http://dovecot.org/bugreport.html
103
105 doveadm(1), doveadm-copy(1), doveadm-fetch(1), doveadm-import(1),
106 doveadm-search-query(7)
107
108
109
110Dovecot v2.3 2015-05-09 DOVEADM-DEDUPLICATE(1)