1DOVEADM-FETCH(1)                    Dovecot                   DOVEADM-FETCH(1)
2
3
4

NAME

6       doveadm-fetch - Fetch partial/full messages or message information
7

SYNOPSIS

9       doveadm [-Dv] [-f formatter] fetch [-S socket_path] fields search_query
10       doveadm   [-Dv]   [-f  formatter]  fetch  [-S  socket_path]  -A  fields
11       search_query
12       doveadm [-Dv] [-f formatter] fetch  [-S  socket_path]  -u  user  fields
13       search_query
14

DESCRIPTION

16       doveadm  fetch  can  be  used to fetch messages' contents and metadata.
17       This can be useful for scripts and for debugging. If you want to  fetch
18       messages one at a time, see doveadm-search(1).
19
20       Important:
21              Please respect your users' privacy.
22

OPTIONS

24       Global doveadm(1) options:
25
26       -D     Enables verbosity and debug messages.
27
28       -f formatter
29              Specifies  the  formatter  for formatting the output.  Supported
30              formatters are:
31
32              flow   prints each line with key=value pairs.
33
34              pager  prints each key: value pair on its own line and separates
35                     records with form feed character (^L).
36
37              tab    prints  a  table  header  followed by tab separated value
38                     lines.
39
40              table  prints a table header followed by adjusted value lines.
41
42       -v     Enables verbosity, including progress counter.
43
44       This command uses by default the output formatter pager.
45
46       Command specific options:
47
48       -A     If the -A option is present, the command will be  performed  for
49              all  users.   Using this option in combination with system users
50              from userdb { driver = passwd } is not recommended,  because  it
51              contains  also  users  with  a lower UID than the one configured
52              with the first_valid_uid setting.
53
54              When the SQL userdb module is used  make  sure  that  the  iter‐
55              ate_query  setting  in /etc/dovecot/dovecot-sql.conf.ext matches
56              your database layout.  When using the LDAP userdb  module,  make
57              sure  that  the  iterate_attrs  and  iterate_filter  settings in
58              /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema.  Oth‐
59              erwise doveadm(1) will be unable to iterate over all users.
60
61       -S socket_path
62              The option's argument is either an absolute path to a local UNIX
63              domain socket, or a hostname and port (hostname:port), in  order
64              to connect a remote host via a TCP socket.
65
66              This allows an administrator to execute doveadm(1) mail commands
67              through the given socket.
68
69       -u user/mask
70              Run the command only for the given user.  It's also possible  to
71              use '*' and '?' wildcards (e.g. -u *@example.org).
72              When  neither  the -A option nor -u user was specified, the com‐
73              mand will be executed with  the  environment  of  the  currently
74              logged in user.
75

ARGUMENTS

77       fields One  or  more result field names to display, if the search_query
78              matches any messages.  In  order  to  specify  multiple  fields,
79              enclose them in single or double quotes.
80              Supported fields are:
81
82              body   The body of a message.
83
84              date.received
85                     Date  and  time  of  final delivery, when the message was
86                     delivered to a user's mailbox for the first time.
87                     The internal date and time of the  source  message,  when
88                     the message was copied by the IMAP COPY command.
89                     The  date-time attribute when present, otherwise the cur‐
90                     rent time, when the message was saved by the IMAP  APPEND
91                     command.
92
93              date.saved
94                     Date and time when the message was saved to mailbox.
95
96              date.sent
97                     Date and time of the message's Date: header.
98
99              flags  A message's IMAP flags, e.g. \Seen
100
101              guid   A message's globally unique identifier.
102
103              hdr    The header of the message.
104
105              imap.body
106                     IMAP BODY output of the message (see RFC 3501).
107
108              imap.bodystructure
109                     IMAP BODYSTRUCTURE output of the message (see RFC 3501).
110
111              imap.envelope
112                     IMAP ENVELOPE output of the message (see RFC 3501).
113
114              mailbox
115                     Name  of the mailbox, in which the message is stored. The
116                     name is in UTF-8.
117
118              mailbox-guid
119                     The globally unique identifier of the mailbox,  in  which
120                     the message is located.
121
122              seq    A message's sequence number in a mailbox.
123
124              size.physical
125                     A message's physical size.
126
127              size.virtual
128                     A  message's virtual size, computed with CRLF line termi‐
129                     nators.
130
131              text   The entire message (header and body).
132
133              uid    A message's unique (IMAP) identifier in a mailbox.
134
135              user   A message owner's login name.
136
137       search_query
138              Fetch   messages    matching    this    search    query.     See
139              doveadm-search-query(7) for details.
140

EXAMPLE

142       This example based on the first example from doveadm-search(1).  We are
143       fetching the fields mailbox and date.sent from user bob's mailbox  with
144       the  guid  "3a94c928d66ebe4bda04000015811c6a" for the messages with the
145       UIDs 8, 25 and 45.
146
147       doveadm fetch -u bob "mailbox date.sent" \
148       mailbox-guid 3a94c928d66ebe4bda04000015811c6a uid 8,25,45
149       mailbox: dovecot/pigeonhole/2.0
150       date.sent: 2010-01-19 01:17:41 (+0100)
151       ^L
152       mailbox: dovecot/pigeonhole/2.0
153       date.sent: 2010-01-28 09:38:49 (+0100)
154       ^L
155       mailbox: dovecot/pigeonhole/2.0
156       date.sent: 2010-03-28 18:41:14 (+0200)
157       ^L
158

REPORTING BUGS

160       Report bugs, including doveconf -n output, to the Dovecot Mailing  List
161       <dovecot@dovecot.org>.   Information  about reporting bugs is available
162       at: http://dovecot.org/bugreport.html
163

SEE ALSO

165       doveadm(1), doveadm-search(1), doveadm-search-query(7)
166
167
168
169Dovecot v2.0                      2010-11-25                  DOVEADM-FETCH(1)
Impressum