1DOVEADM-FLAGS(1) Dovecot DOVEADM-FLAGS(1)
2
3
4
6 doveadm-flags - add, remove or replace messages' flags
7
9 doveadm [-Dv] flags [-S socket_path] command flags search_query
10 doveadm [-Dv] flags [-S socket_path] command flags search_query -A
11 doveadm [-Dv] flags [-S socket_path] command flags search_query -F file
12 doveadm [-Dv] flags [-S socket_path] command flags search_query -u user
13
15 This command is used to manipulate flags of messages.
16
18 Global doveadm(1) options:
19
20 -D Enables verbosity and debug messages.
21
22 -o setting=value
23 Overrides the configuration setting from /etc/dovecot/dove‐
24 cot.conf and from the userdb with the given value. In order to
25 override multiple settings, the -o option may be specified mul‐
26 tiple times.
27
28 -v Enables verbosity, including progress counter.
29
30 Command specific options:
31
32 -A If the -A option is present, the command will be performed for
33 all users. Using this option in combination with system users
34 from userdb { driver = passwd } is not recommended, because it
35 contains also users with a lower UID than the one configured
36 with the first_valid_uid setting.
37
38 When the SQL userdb module is used make sure that the iter‐
39 ate_query setting in /etc/dovecot/dovecot-sql.conf.ext matches
40 your database layout. When using the LDAP userdb module, make
41 sure that the iterate_attrs and iterate_filter settings in
42 /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema. Oth‐
43 erwise doveadm(1) will be unable to iterate over all users.
44
45 -F file
46 Execute the command for all the users in the file. This is sim‐
47 ilar to the -A option, but instead of getting the list of users
48 from the userdb, they are read from the given file. The file
49 contains one username per line.
50
51 -S socket_path
52 The option's argument is either an absolute path to a local UNIX
53 domain socket, or a hostname and port (hostname:port), in order
54 to connect a remote host via a TCP socket.
55
56 This allows an administrator to execute doveadm(1) mail commands
57 through the given socket.
58
59 -u user/mask
60 Run the command only for the given user. It's also possible to
61 use '*' and '?' wildcards (e.g. -u *@example.org).
62 When neither the -A option, nor the -F file option, nor the
63 -u user was specified, the command will be executed with the
64 environment of the currently logged in user.
65
67 flags Message flags as described in RFC 3501, section 2.3.2 (Flags
68 Message Attribute): \Answered, \Deleted, \Draft, \Flagged,
69 \Recent and \Seen. And the IMAP keywords $Forwarded, $MDNSent,
70 $SubmitPending and $Submitted or user-defined keywords, e.g.
71 Junk, $NonSpam or $Label1.
72 One or multiple flags and/or keywords can be specified.
73
74 search_query
75 Manipulate the flags of messages matching the given search
76 query. See doveadm-search-query(7) for details.
77
79 flags add
80 doveadm flags add [-u user|-A|-F file] [-S socket_path] flags
81 search_query
82
83 This command is used to extend the current set of flags with the given
84 flags.
85
86 flags remove
87 doveadm flags remove [-u user|-A|-F file] [-S socket_path] flags
88 search_query
89
90 In order to remove the given flags from the current set of flags, use
91 this command.
92
93 flags replace
94 doveadm flags replace [-u user|-A|-F file] [-S socket_path] flags
95 search_query
96
97 This command is used to replace ALL current flags with the given flags.
98
100 List and manipulate the message flags of the message with uid 81563
101
102 doveadm fetch -u bob 'uid flags' mailbox dovecot uid 81563
103 uid: 81563
104 flags: \Answered \Seen NonJunk
105
106 doveadm flags remove -u bob NonJunk mailbox dovecot uid 81563
107 doveadm flags add -u bob '\Flagged $Forwarded' mailbox dovecot uid 81563
108
110 Report bugs, including doveconf -n output, to the Dovecot Mailing List
111 <dovecot@dovecot.org>. Information about reporting bugs is available
112 at: http://dovecot.org/bugreport.html
113
115 doveadm(1), doveadm-fetch(1), doveadm-search-query(7)
116
117
118
119Dovecot v2.3 2015-05-09 DOVEADM-FLAGS(1)