1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
.TH "DOVEADM-USER" "1" "March 2025" "78ffb79" "Dovecot"
.SH "NAME"
\fBdoveadm-user\fR - Perform a user lookup in Dovecot's userdbs
.SH "SYNOPSIS"
.P
\fBdoveadm\fR \[lB]\fIGLOBAL OPTIONS\fR\[rB] \fBuser\fR \[lB]\fB-a\fR \fIuserdb_socket_path\fR\[rB] \[lB]\fB-f\fR \fIfield\fR\[rB] \[lB]\fB-u\fR\[rB] \[lB]\fB-x\fR \fIauth_info\fR\[rB] \fIuser\fR...
.SH "DESCRIPTION"
.P
The \fBuser\fR command is used to perform a user lookup - to show what information Dovecot sees about the \fIuser\fR (s), or if it exists at all in the configured \fIuserdb\fR (s).
.P
The \fIauth_info\fR may be useful when the userdb is for example a SQL database and you are using %variables, like \fB%{protocol}\fR or \fB%{local_ip}\fR, in the \fIuserdb_sql_query\fR setting. Or when you have configured the userdb in a way like this:
.P
.RS 2
.nf
userdb passwd-file {
passwd_file_path = /etc/%{protocol}.passwd
}
.fi
.RE
.SH "GLOBAL OPTIONS"
.P
Global doveadm(1)
.P
\fB-D\fR
.RS 0
.RS 4
.P
Enables \fIverbosity\fR and debug messages.
.RE 0
.RE 0
.P
\fB-O\fR
.RS 0
.RS 4
.P
Do not read any config file, just use defaults. The \fBdovecot_storage_version\fR setting defaults to the latest version, but can be overridden with
.RE 0
.RE 0
.P
\fB-k\fR
.RS 0
.RS 4
.P
Preserve entire environment for doveadm, not just \fBimport_environment\fR setting.
.RE 0
.RE 0
.P
\fB-v\fR
.RS 0
.RS 4
.P
Enables verbosity, including progress counter.
.RE 0
.RE 0
.P
\fB-i\fR \fIinstance-name\fR
.RS 0
.RS 4
.P
If using multiple Dovecot instances, choose the config file based on this instance name.
.P
See \fBinstance_name\fR setting for more information.
.RE 0
.RE 0
.P
\fB-c\fR \fIconfig-file\fR
.RS 0
.RS 4
.P
Read configuration from the given \fIconfig-file\fR. By default it first reads config socket, and then falls back to \fI/etc/dovecot/dovecot.conf\fR. You can also point this to config socket of some instance running compatible version.
.RE 0
.RE 0
.P
\fB-o\fR \fIsetting\fR\fB=\fR\fIvalue\fR
.RS 0
.RS 4
.P
Overrides the configuration \fIsetting\fR from \fI/etc/dovecot/dovecot.conf\fR and from the userdb with the given \fIvalue\fR. In order to override multiple settings, the \fB-o\fR option may be specified multiple times.
.RE 0
.RE 0
.SH "OPTIONS"
.P
\fB-a\fR \fIuserdb_socket_path\fR
.RS 0
.RS 4
.P
This option is used to specify an absolute path to an alternative UNIX domain socket.
.P
By default doveadm(1) will use the socket
.RE 0
.RE 0
.P
\fB-f\fR \fIfield\fR
.RS 0
.RS 4
.P
When this option and the name of a userdb field is given, doveadm(1) will show only the value of the specified field.
.RE 0
.RE 0
.P
\fB-u\fR
.RS 0
.RS 4
.P
When this option is given, doveadm(1) will only show values from the
.RE 0
.RE 0
.P
\fB-x\fR \fIauth_info\fR
.RS 0
.RS 4
.P
\fIauth_info\fR specifies additional conditions for the \fBuser\fR command. The \fIauth_info\fR option string has to be given as \fIname\fR \fB=\fR \fIvalue\fR pair. For multiple conditions the \fB-x\fR option could be supplied multiple times.
.P
Possible names for the \fIauth_info\fR are:
.P
\fBservice\fR
.RS 4
.P
The service for which the userdb lookup should be tested. The value may be the name of a service, commonly used with Dovecot. For example: \fBimap\fR, \fBpop3\fR or \fBsmtp\fR.
.RE 0
.P
\fBsession\fR
.RS 4
.P
Session identifier.
.RE 0
.P
\fBlip\fR
.RS 4
.P
The local IP address (server) for the test.
.RE 0
.P
\fBrip\fR
.RS 4
.P
The remote IP address (client) for the test.
.RE 0
.P
\fBlport\fR
.RS 4
.P
The local port, e.g. 143
.RE 0
.P
\fBrport\fR
.RS 4
.P
The remote port, e.g. 24567
.RE 0
.P
\fBreal_lip\fR
.RS 4
.P
The local IP to which the client connected on this host.
.RE 0
.P
\fBreal_rip\fR
.RS 4
.P
The remote IP where client connected from to this host.
.RE 0
.P
\fBreal_lport\fR
.RS 4
.P
The local port to which client connected to to this host.
.RE 0
.P
\fBreal_rport\fR
.RS 4
.P
The remote port from where the client connected from to this host.
.RE 0
.P
\fBforward_<field>\fR
.RS 4
.P
Field to forward as %{forward:field} to auth process.
.RE 0
.RE 0
.RE 0
.SH "ARGUMENTS"
.P
\fIuser\fR
.RS 0
.RS 4
.P
Is a \fIuser\fR's login name. Depending on the configuration, a login name may be for example \fBjane\fR or \fBjohn@example.com\fR. It's also possible to use '\fB*\fR' and '\fB?\fR' wildcards (e.g. \fB-u
\[rs]*@example.org\fR).
.RE 0
.RE 0
.SH "EXAMPLE"
.P
Perform a user lookup for the users jane and john@example.com:
.P
.RS 2
.nf
doveadm user jane john@example.com
.fi
.RE
.P
.RS 2
.nf
userdb: jane
uid : 8001
gid : 8001
home : /home/jane
mail_path : ~/sdbox
plugins : sieve
quota_storage_size: 150M
userdb: john@example.com
home : /srv/mail/8/70312/79832
uid : 79832
gid : 70312
mail_path : ~/mdbox
.fi
.RE
.P
User lookup, using wildcards:
.P
.RS 2
.nf
doveadm user \[rs]*.?oe@example.net
.fi
.RE
.P
.RS 2
.nf
jane.doe@example.net
judy.roe@example.net
john.doe@example.net
.fi
.RE
.SH "REPORTING BUGS"
.P
Report bugs, including \fIdoveconf -n\fR output, to the Dovecot Mailing List \fI\(ladovecot@dovecot.org\(ra\fR. Information about reporting bugs is available at: https://dovecot.org/bugreport.html
.SH "SEE ALSO"
.P
doveadm(1)
|