Skip to content
Snippets Groups Projects
guix.texi 457 KiB
Newer Older
  • Learn to ignore specific revisions
  • Andy Wingo's avatar
    Andy Wingo committed
    9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481
    change the @samp{@@} into @samp{-AT-}.  This translation is done after
    @samp{auth-username-translation} changes.
    Defaults to @samp{"%Lu"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string auth-master-user-separator
    If you want to allow master users to log in by specifying the master
    username within the normal username string (i.e. not using SASL
    mechanism's support for it), you can specify the separator character
    here.  The format is then <username><separator><master username>.
    UW-IMAP uses @samp{*} as the separator, so that could be a good
    choice.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string auth-anonymous-username
    Username to use for users logging in with ANONYMOUS SASL
    mechanism.
    Defaults to @samp{"anonymous"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer auth-worker-max-count
    Maximum number of dovecot-auth worker processes.  They're used to
    execute blocking passdb and userdb queries (e.g. MySQL and PAM).
    They're automatically created and destroyed as needed.
    Defaults to @samp{30}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string auth-gssapi-hostname
    Host name to use in GSSAPI principal names.  The default is to use
    the name returned by gethostname().  Use @samp{$ALL} (with quotes) to
    allow all keytab entries.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string auth-krb5-keytab
    Kerberos keytab to use for the GSSAPI mechanism.  Will use the
    system default (usually /etc/krb5.keytab) if not specified.  You may
    need to change the auth service to run as root to be able to read this
    file.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-use-winbind?
    Do NTLM and GSS-SPNEGO authentication using Samba's winbind daemon
    and @samp{ntlm-auth} helper.
    <doc/wiki/Authentication/Mechanisms/Winbind.txt>.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} file-name auth-winbind-helper-path
    Path for Samba's @samp{ntlm-auth} helper binary.
    Defaults to @samp{"/usr/bin/ntlm_auth"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string auth-failure-delay
    Time to delay before replying to failed authentications.
    Defaults to @samp{"2 secs"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-ssl-require-client-cert?
    Require a valid SSL client certificate or the authentication
    fails.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-ssl-username-from-cert?
    Take the username from client's SSL certificate, using
    @code{X509_NAME_get_text_by_NID()} which returns the subject's DN's
    CommonName.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list auth-mechanisms
    List of wanted authentication mechanisms.  Supported mechanisms are:
    @samp{plain}, @samp{login}, @samp{digest-md5}, @samp{cram-md5},
    @samp{ntlm}, @samp{rpa}, @samp{apop}, @samp{anonymous}, @samp{gssapi},
    @samp{otp}, @samp{skey}, and @samp{gss-spnego}.  NOTE: See also
    @samp{disable-plaintext-auth} setting.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list director-servers
    List of IPs or hostnames to all director servers, including ourself.
    Ports can be specified as ip:port.  The default port is the same as what
    director service's @samp{inet-listener} is using.
    Defaults to @samp{()}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list director-mail-servers
    List of IPs or hostnames to all backend mail servers.  Ranges are
    allowed too, like 10.0.0.10-10.0.0.30.
    Defaults to @samp{()}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string director-user-expire
    How long to redirect users to a specific server after it no longer
    has any connections.
    Defaults to @samp{"15 min"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer director-doveadm-port
    TCP/IP port that accepts doveadm connections (instead of director
    connections) If you enable this, you'll also need to add
    @samp{inet-listener} for the port.
    Defaults to @samp{0}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string director-username-hash
    How the username is translated before being hashed.  Useful values
    include %Ln if user can log in with or without @@domain, %Ld if mailboxes
    are shared within domain.
    Defaults to @samp{"%Lu"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string log-path
    Log file to use for error messages.  @samp{syslog} logs to syslog,
    @samp{/dev/stderr} logs to stderr.
    Defaults to @samp{"syslog"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string info-log-path
    Log file to use for informational messages.  Defaults to
    @samp{log-path}.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string debug-log-path
    Log file to use for debug messages.  Defaults to
    @samp{info-log-path}.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string syslog-facility
    Syslog facility to use if you're logging to syslog.  Usually if you
    don't want to use @samp{mail}, you'll use local0..local7.  Also other
    standard facilities are supported.
    Defaults to @samp{"mail"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-verbose?
    Log unsuccessful authentication attempts and the reasons why they
    failed.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-verbose-passwords?
    In case of password mismatches, log the attempted password.  Valid
    values are no, plain and sha1.  sha1 can be useful for detecting brute
    force password attempts vs.  user simply trying the same password over
    and over again.  You can also truncate the value to n chars by appending
    ":n" (e.g. sha1:6).
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-debug?
    Even more verbose logging for debugging purposes.  Shows for example
    SQL queries.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean auth-debug-passwords?
    In case of password mismatches, log the passwords and used scheme so
    the problem can be debugged.  Enabling this also enables
    @samp{auth-debug}.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mail-debug?
    Enable mail process debugging.  This can help you figure out why
    Dovecot isn't finding your mails.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean verbose-ssl?
    Show protocol level SSL errors.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string log-timestamp
    Prefix for each line written to log file.  % codes are in
    strftime(3) format.
    Defaults to @samp{"\"%b %d %H:%M:%S \""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list login-log-format-elements
    List of elements we want to log.  The elements which have a
    non-empty variable value are joined together to form a comma-separated
    string.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string login-log-format
    Login log format.  %s contains @samp{login-log-format-elements}
    string, %$ contains the data we want to log.
    Defaults to @samp{"%$: %s"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-log-prefix
    Log prefix for mail processes.  See doc/wiki/Variables.txt for list
    of possible variables you can use.
    Defaults to @samp{"\"%s(%u): \""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string deliver-log-format
    Format to use for logging mail deliveries.  You can use variables:
    @table @code
    @item %$
    Delivery status message (e.g. @samp{saved to INBOX})
    @item %m
    Message-ID
    @item %s
    Subject
    @item %f
    From address
    @item %p
    Physical size
    @item %w
    Virtual size.
    @end table
    Defaults to @samp{"msgid=%m: %$"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-location
    Location for users' mailboxes.  The default is empty, which means
    that Dovecot tries to find the mailboxes automatically.  This won't work
    if the user doesn't yet have any mail, so you should explicitly tell
    Dovecot the full location.
    
    If you're using mbox, giving a path to the INBOX
    file (e.g. /var/mail/%u) isn't enough.  You'll also need to tell Dovecot
    where the other mailboxes are kept.  This is called the "root mail
    directory", and it must be the first path given in the
    @samp{mail-location} setting.
    
    There are a few special variables you can use, eg.:
    
    @table @samp
    @item %u
    username
    @item %n
    user part in user@@domain, same as %u if there's no domain
    @item %d
    domain part in user@@domain, empty if there's no domain
    @item %h
    home director
    @end table
    
    See doc/wiki/Variables.txt for full list.  Some examples:
    @table @samp
    @item maildir:~/Maildir
    @item mbox:~/mail:INBOX=/var/mail/%u
    @item mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%
    @end table
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-uid
    System user and group used to access mails.  If you use multiple,
    userdb can override these by returning uid or gid fields.  You can use
    either numbers or names.  <doc/wiki/UserIds.txt>.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-gid
    
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-privileged-group
    Group to enable temporarily for privileged operations.  Currently
    this is used only with INBOX when either its initial creation or
    dotlocking fails.  Typically this is set to "mail" to give access to
    /var/mail.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-access-groups
    Grant access to these supplementary groups for mail processes.
    Typically these are used to set up access to shared mailboxes.  Note
    that it may be dangerous to set these if users can create
    symlinks (e.g. if "mail" group is set here, ln -s /var/mail ~/mail/var
    could allow a user to delete others' mailboxes, or ln -s
    /secret/shared/box ~/mail/mybox would allow reading it).
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access?
    Allow full filesystem access to clients.  There's no access checks
    other than what the operating system does for the active UID/GID.  It
    works with both maildir and mboxes, allowing you to prefix mailboxes
    names with e.g. /path/ or ~user/.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mmap-disable?
    Don't use mmap() at all.  This is required if you store indexes to
    shared filesystems (NFS or clustered filesystem).
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean dotlock-use-excl?
    Rely on @samp{O_EXCL} to work when creating dotlock files.  NFS
    supports @samp{O_EXCL} since version 3, so this should be safe to use
    nowadays by default.
    Defaults to @samp{#t}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-fsync
    When to use fsync() or fdatasync() calls:
    @table @code
    @item optimized
    Whenever necessary to avoid losing important data
    @item always
    Useful with e.g. NFS when write()s are delayed
    @item never
    Never use it (best performance, but crashes can lose data).
    @end table
    Defaults to @samp{"optimized"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mail-nfs-storage?
    Mail storage exists in NFS.  Set this to yes to make Dovecot flush
    NFS caches whenever needed.  If you're using only a single mail server
    this isn't needed.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mail-nfs-index?
    Mail index files also exist in NFS.  Setting this to yes requires
    @samp{mmap-disable? #t} and @samp{fsync-disable? #f}.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string lock-method
    Locking method for index files.  Alternatives are fcntl, flock and
    dotlock.  Dotlocking uses some tricks which may create more disk I/O
    than other locking methods.  NFS users: flock doesn't work, remember to
    change @samp{mmap-disable}.
    Defaults to @samp{"fcntl"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} file-name mail-temp-dir
    Directory in which LDA/LMTP temporarily stores incoming mails >128
    kB.
    Defaults to @samp{"/tmp"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer first-valid-uid
    Valid UID range for users.  This is mostly to make sure that users can't
    log in as daemons or other system users.  Note that denying root logins is
    hardcoded to dovecot binary and can't be done even if @samp{first-valid-uid}
    is set to 0.
    Defaults to @samp{500}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer last-valid-uid
    
    Defaults to @samp{0}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer first-valid-gid
    Valid GID range for users.  Users having non-valid GID as primary group ID
    aren't allowed to log in.  If user belongs to supplementary groups with
    non-valid GIDs, those groups are not set.
    Defaults to @samp{1}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer last-valid-gid
    
    Defaults to @samp{0}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-max-keyword-length
    Maximum allowed length for mail keyword name.  It's only forced when
    trying to create new keywords.
    Defaults to @samp{50}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} colon-separated-file-name-list valid-chroot-dirs
    List of directories under which chrooting is allowed for mail
    processes (i.e. /var/mail will allow chrooting to /var/mail/foo/bar
    too).  This setting doesn't affect @samp{login-chroot}
    @samp{mail-chroot} or auth chroot settings.  If this setting is empty,
    "/./" in home dirs are ignored.  WARNING: Never add directories here
    which local users can modify, that may lead to root exploit.  Usually
    this should be done only if you don't allow shell access for users.
    <doc/wiki/Chrooting.txt>.
    Defaults to @samp{()}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-chroot
    Default chroot directory for mail processes.  This can be overridden
    for specific users in user database by giving /./ in user's home
    directory (e.g. /home/./user chroots into /home).  Note that usually
    there is no real need to do chrooting, Dovecot doesn't allow users to
    access files outside their mail directory anyway.  If your home
    directories are prefixed with the chroot directory, append "/." to
    @samp{mail-chroot}.  <doc/wiki/Chrooting.txt>.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} file-name auth-socket-path
    UNIX socket path to master authentication server to find users.
    This is used by imap (for shared users) and lda.
    Defaults to @samp{"/var/run/dovecot/auth-userdb"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} file-name mail-plugin-dir
    Directory where to look up mail plugins.
    Defaults to @samp{"/usr/lib/dovecot"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mail-plugins
    List of plugins to load for all services.  Plugins specific to IMAP,
    LDA, etc. are added to this list in their own .conf files.
    Defaults to @samp{()}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-cache-min-mail-count
    The minimum number of mails in a mailbox before updates are done to
    cache file.  This allows optimizing Dovecot's behavior to do less disk
    writes at the cost of more disk reads.
    Defaults to @samp{0}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mailbox-idle-check-interval
    When IDLE command is running, mailbox is checked once in a while to
    see if there are any new mails or other changes.  This setting defines
    the minimum time to wait between those checks.  Dovecot can also use
    dnotify, inotify and kqueue to find out immediately when changes
    occur.
    Defaults to @samp{"30 secs"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mail-save-crlf?
    Save mails with CR+LF instead of plain LF.  This makes sending those
    mails take less CPU, especially with sendfile() syscall with Linux and
    FreeBSD.  But it also creates a bit more disk I/O which may just make it
    slower.  Also note that if other software reads the mboxes/maildirs,
    they may handle the extra CRs wrong and cause problems.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-stat-dirs?
    By default LIST command returns all entries in maildir beginning
    with a dot.  Enabling this option makes Dovecot return only entries
    which are directories.  This is done by stat()ing each entry, so it
    causes more disk I/O.
     (For systems setting struct @samp{dirent->d_type} this check is free
    and it's done always regardless of this setting).
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-copy-with-hardlinks?
    When copying a message, do it with hard links whenever possible.
    This makes the performance much better, and it's unlikely to have any
    side effects.
    Defaults to @samp{#t}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean maildir-very-dirty-syncs?
    Assume Dovecot is the only MUA accessing Maildir: Scan cur/
    directory only when its mtime changes unexpectedly or when we can't find
    the mail otherwise.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mbox-read-locks
    Which locking methods to use for locking mbox.  There are four
    available:
    
    @table @code
    @item dotlock
    Create <mailbox>.lock file.  This is the oldest and most NFS-safe
    solution.  If you want to use /var/mail/ like directory, the users will
    need write access to that directory.
    @item dotlock-try
    Same as dotlock, but if it fails because of permissions or because there
    isn't enough disk space, just skip it.
    @item fcntl
    Use this if possible.  Works with NFS too if lockd is used.
    @item flock
    
    May not exist in all systems.  Doesn't work with NFS.
    
    Andy Wingo's avatar
    Andy Wingo committed
    9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865
    @item lockf
    May not exist in all systems.  Doesn't work with NFS.
    @end table
    
    You can use multiple locking methods; if you do the order they're declared
    in is important to avoid deadlocks if other MTAs/MUAs are using multiple
    locking methods as well.  Some operating systems don't allow using some of
    them simultaneously.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mbox-write-locks
    
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mbox-lock-timeout
    Maximum time to wait for lock (all of them) before aborting.
    Defaults to @samp{"5 mins"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mbox-dotlock-change-timeout
    If dotlock exists but the mailbox isn't modified in any way,
    override the lock file after this much time.
    Defaults to @samp{"2 mins"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-dirty-syncs?
    When mbox changes unexpectedly we have to fully read it to find out
    what changed.  If the mbox is large this can take a long time.  Since
    the change is usually just a newly appended mail, it'd be faster to
    simply read the new mails.  If this setting is enabled, Dovecot does
    this but still safely fallbacks to re-reading the whole mbox file
    whenever something in mbox isn't how it's expected to be.  The only real
    downside to this setting is that if some other MUA changes message
    flags, Dovecot doesn't notice it immediately.  Note that a full sync is
    done with SELECT, EXAMINE, EXPUNGE and CHECK commands.
    Defaults to @samp{#t}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-very-dirty-syncs?
    Like @samp{mbox-dirty-syncs}, but don't do full syncs even with SELECT,
    EXAMINE, EXPUNGE or CHECK commands.  If this is set,
    @samp{mbox-dirty-syncs} is ignored.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mbox-lazy-writes?
    Delay writing mbox headers until doing a full write sync (EXPUNGE
    and CHECK commands and when closing the mailbox).  This is especially
    useful for POP3 where clients often delete all mails.  The downside is
    that our changes aren't immediately visible to other MUAs.
    Defaults to @samp{#t}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mbox-min-index-size
    If mbox size is smaller than this (e.g. 100k), don't write index
    files.  If an index file already exists it's still read, just not
    updated.
    Defaults to @samp{0}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mdbox-rotate-size
    Maximum dbox file size until it's rotated.
    Defaults to @samp{2000000}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mdbox-rotate-interval
    Maximum dbox file age until it's rotated.  Typically in days.  Day
    begins from midnight, so 1d = today, 2d = yesterday, etc.  0 = check
    disabled.
    Defaults to @samp{"1d"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean mdbox-preallocate-space?
    When creating new mdbox files, immediately preallocate their size to
    @samp{mdbox-rotate-size}.  This setting currently works only in Linux
    with some filesystems (ext4, xfs).
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-dir
    sdbox and mdbox support saving mail attachments to external files,
    which also allows single instance storage for them.  Other backends
    don't support this for now.
    
    WARNING: This feature hasn't been tested much yet.  Use at your own risk.
    
    Directory root where to store mail attachments.  Disabled, if empty.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer mail-attachment-min-size
    Attachments smaller than this aren't saved externally.  It's also
    possible to write a plugin to disable saving specific attachments
    externally.
    Defaults to @samp{128000}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-fs
    Filesystem backend to use for saving attachments:
    @table @code
    @item posix
    No SiS done by Dovecot (but this might help FS's own deduplication)
    @item sis posix
    SiS with immediate byte-by-byte comparison during saving
    @item sis-queue posix
    SiS with delayed comparison and deduplication.
    @end table
    Defaults to @samp{"sis posix"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string mail-attachment-hash
    Hash format to use in attachment filenames.  You can add any text and
    variables: @code{%@{md4@}}, @code{%@{md5@}}, @code{%@{sha1@}},
    @code{%@{sha256@}}, @code{%@{sha512@}}, @code{%@{size@}}.  Variables can be
    truncated, e.g. @code{%@{sha256:80@}} returns only first 80 bits.
    Defaults to @samp{"%@{sha1@}"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-process-limit
    
    Defaults to @samp{100}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-client-limit
    
    Defaults to @samp{1000}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer default-vsz-limit
    Default VSZ (virtual memory size) limit for service processes.
    This is mainly intended to catch and kill processes that leak memory
    before they eat up everything.
    Defaults to @samp{256000000}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string default-login-user
    Login user is internally used by login processes.  This is the most
    untrusted user in Dovecot system.  It shouldn't have access to anything
    at all.
    Defaults to @samp{"dovenull"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string default-internal-user
    Internal user is used by unprivileged processes.  It should be
    separate from login user, so that login processes can't disturb other
    processes.
    Defaults to @samp{"dovecot"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl?
    SSL/TLS support: yes, no, required.  <doc/wiki/SSL.txt>.
    Defaults to @samp{"required"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-cert
    PEM encoded X.509 SSL/TLS certificate (public key).
    Defaults to @samp{"</etc/dovecot/default.pem"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-key
    PEM encoded SSL/TLS private key.  The key is opened before
    dropping root privileges, so keep the key file unreadable by anyone but
    root.
    Defaults to @samp{"</etc/dovecot/private/default.pem"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-key-password
    If key file is password protected, give the password here.
    Alternatively give it when starting dovecot with -p parameter.  Since
    this file is often world-readable, you may want to place this setting
    instead to a different.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-ca
    PEM encoded trusted certificate authority.  Set this only if you
    intend to use @samp{ssl-verify-client-cert? #t}.  The file should
    contain the CA certificate(s) followed by the matching
    CRL(s).  (e.g. @samp{ssl-ca </etc/ssl/certs/ca.pem}).
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean ssl-require-crl?
    Require that CRL check succeeds for client certificates.
    Defaults to @samp{#t}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean ssl-verify-client-cert?
    Request client to send a certificate.  If you also want to require
    it, set @samp{auth-ssl-require-client-cert? #t} in auth section.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-cert-username-field
    Which field from certificate to use for username.  commonName and
    x500UniqueIdentifier are the usual choices.  You'll also need to set
    @samp{auth-ssl-username-from-cert? #t}.
    Defaults to @samp{"commonName"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} hours ssl-parameters-regenerate
    How often to regenerate the SSL parameters file.  Generation is
    quite CPU intensive operation.  The value is in hours, 0 disables
    regeneration entirely.
    Defaults to @samp{168}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-protocols
    SSL protocols to use.
    Defaults to @samp{"!SSLv2"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-cipher-list
    SSL ciphers to use.
    Defaults to @samp{"ALL:!LOW:!SSLv2:!EXP:!aNULL"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string ssl-crypto-device
    SSL crypto device to use, for valid values run "openssl engine".
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string postmaster-address
    Address to use when sending rejection mails.
    Default is postmaster@@<your domain>.  %d expands to recipient domain.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string hostname
    Hostname to use in various parts of sent mails (e.g. in Message-Id)
    and in LMTP replies.  Default is the system's real hostname@@domain.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean quota-full-tempfail?
    If user is over quota, return with temporary failure instead of
    bouncing the mail.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} file-name sendmail-path
    Binary to use for sending mails.
    Defaults to @samp{"/usr/sbin/sendmail"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string submission-host
    If non-empty, send mails via this SMTP host[:port] instead of
    sendmail.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string rejection-subject
    Subject: header to use for rejection mails.  You can use the same
    variables as for @samp{rejection-reason} below.
    Defaults to @samp{"Rejected: %s"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string rejection-reason
    Human readable error message for rejection mails.  You can use
    variables:
    
    @table @code
    @item %n
    CRLF
    @item %r
    reason
    @item %s
    original subject
    @item %t
    recipient
    @end table
    Defaults to @samp{"Your message to <%t> was automatically rejected:%n%r"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string recipient-delimiter
    Delimiter character between local-part and detail in email
    address.
    Defaults to @samp{"+"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string lda-original-recipient-header
    Header where the original recipient address (SMTP's RCPT TO:
    address) is taken from if not available elsewhere.  With dovecot-lda -a
    parameter overrides this.  A commonly used header for this is
    X-Original-To.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean lda-mailbox-autocreate?
    Should saving a mail to a nonexistent mailbox automatically create
    it?.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} boolean lda-mailbox-autosubscribe?
    Should automatically created mailboxes be also automatically
    subscribed?.
    Defaults to @samp{#f}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} non-negative-integer imap-max-line-length
    Maximum IMAP command line length.  Some clients generate very long
    command lines with huge mailboxes, so you may need to raise this if you
    get "Too long argument" or "IMAP command line too large" errors
    often.
    Defaults to @samp{64000}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-logout-format
    IMAP logout format string:
    @table @code
    @item %i
    total number of bytes read from client
    @item %o
    total number of bytes sent to client.
    @end table
    Defaults to @samp{"in=%i out=%o"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-capability
    Override the IMAP CAPABILITY response.  If the value begins with '+',
    add the given capabilities on top of the defaults (e.g. +XFOO XBAR).
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-idle-notify-interval
    How long to wait between "OK Still here" notifications when client
    is IDLEing.
    Defaults to @samp{"2 mins"}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-id-send
    ID field names and values to send to clients.  Using * as the value
    makes Dovecot use the default value.  The following fields have default
    values currently: name, version, os, os-version, support-url,
    support-email.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-id-log
    ID fields sent by client to log.  * means everything.
    Defaults to @samp{""}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list imap-client-workarounds
    Workarounds for various client bugs:
    
    @table @code
    @item delay-newmail
    Send EXISTS/RECENT new mail notifications only when replying to NOOP and
    CHECK commands.  Some clients ignore them otherwise, for example OSX
    Mail (<v2.1).  Outlook Express breaks more badly though, without this it
    may show user "Message no longer in server" errors.  Note that OE6
    still breaks even with this workaround if synchronization is set to
    "Headers Only".
    
    @item tb-extra-mailbox-sep
    Thunderbird gets somehow confused with LAYOUT=fs (mbox and dbox) and
    adds extra @samp{/} suffixes to mailbox names.  This option causes Dovecot to
    ignore the extra @samp{/} instead of treating it as invalid mailbox name.
    
    @item tb-lsub-flags
    Show \Noselect flags for LSUB replies with LAYOUT=fs (e.g. mbox).
    This makes Thunderbird realize they aren't selectable and show them
    greyed out, instead of only later giving "not selectable" popup error.
    @end table
    Defaults to @samp{()}.
    @end deftypevr
    
    @deftypevr {@code{dovecot-configuration} parameter} string imap-urlauth-host
    Host allowed in URLAUTH URLs sent by client.  "*" allows all.
    Defaults to @samp{""}.
    @end deftypevr
    
    
    Whew!  Lots of configuration options.  The nice thing about it though is
    that GuixSD has a complete interface to Dovecot's configuration
    language.  This allows not only a nice way to declare configurations,
    but also offers reflective capabilities as well: users can write code to
    inspect and transform configurations from within Scheme.
    
    However, it could be that you just want to get a @code{dovecot.conf} up
    and running.  In that case, you can pass an
    
    Alex Kost's avatar
    Alex Kost committed
    @code{opaque-dovecot-configuration} as the @code{#:config} parameter to
    
    Andy Wingo's avatar
    Andy Wingo committed
    @code{dovecot-service}.  As its name indicates, an opaque configuration
    does not have easy reflective capabilities.
    
    Available @code{opaque-dovecot-configuration} fields are:
    
    @deftypevr {@code{opaque-dovecot-configuration} parameter} package dovecot
    The dovecot package.
    @end deftypevr
    
    @deftypevr {@code{opaque-dovecot-configuration} parameter} string string
    The contents of the @code{dovecot.conf}, as a string.
    @end deftypevr
    
    For example, if your @code{dovecot.conf} is just the empty string, you
    could instantiate a dovecot service like this:
    
    @example
    (dovecot-service #:config
                     (opaque-dovecot-configuration
                      (string "")))
    @end example
    
    
    @node Web Services
    @subsubsection Web Services
    
    The @code{(gnu services web)} module provides the following service:
    
    
    @deffn {Scheme Procedure} nginx-service [#:nginx nginx] @
    
           [#:log-directory ``/var/log/nginx''] @
           [#:run-directory ``/var/run/nginx''] @
           [#:config-file]
    
    Return a service that runs @var{nginx}, the nginx web server.
    
    The nginx daemon loads its runtime configuration from @var{config-file}.
    Log files are written to @var{log-directory} and temporary runtime data
    files are written to @var{run-directory}.  For proper operation, these
    arguments should match what is in @var{config-file} to ensure that the
    directories are created when the service is activated.
    
    @end deffn
    
    
    @node Various Services
    @subsubsection Various Services
    
    
    @cindex lirc
    @subsubheading Lirc Service
    
    
    The @code{(gnu services lirc)} module provides the following service.
    
    
    @deffn {Scheme Procedure} lirc-service [#:lirc lirc] @
    
           [#:device #f] [#:driver #f] [#:config-file #f] @
           [#:extra-options '()]
    Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that
    decodes infrared signals from remote controls.
    
    Optionally, @var{device}, @var{driver} and @var{config-file}
    (configuration file name) may be specified.  See @command{lircd} manual
    for details.
    
    Finally, @var{extra-options} is a list of additional command-line options
    passed to @command{lircd}.
    @end deffn
    
    
    @cindex spice
    @subsubheading Spice Service
    
    The @code{(gnu services spice)} module provides the following service.
    
    @deffn {Scheme Procedure} spice-vdagent-service [#:spice-vdagent]
    Returns a service that runs @url{http://www.spice-space.org,VDAGENT}, a daemon
    that enables sharing the clipboard with a vm and setting the guest display
    resolution when the graphical console window resizes.
    @end deffn
    
    
    @subsubsection Dictionary Services
    The @code{(gnu services dict)} module provides the following service:
    
    @deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)]
    Return a service that runs the @command{dicod} daemon, an implementation
    of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}).
    
    The optional @var{config} argument specifies the configuration for
    @command{dicod}, which should be a @code{<dicod-configuration>} object, by
    default it serves the GNU Collaborative International Dictonary of English.
    
    You can add @command{open localhost} to your @file{~/.dico} file to make
    @code{localhost} the default server for @command{dico} client
    (@pxref{Initialization File,,, dico, GNU Dico Manual}).
    @end deffn
    
    @deftp {Data Type} dicod-configuration
    Data type representing the configuration of dicod.
    
    @table @asis
    @item @code{dico} (default: @var{dico})
    Package object of the GNU Dico dictionary server.
    
    
    @item @code{interfaces} (default: @var{'("localhost")})
    This is the list of IP addresses and ports and possibly socket file
    names to listen to (@pxref{Server Settings, @code{listen} directive,,
    dico, GNU Dico Manual}).
    
    
    @item @code{databases} (default: @var{(list %dicod-database:gcide)})
    List of @code{<dicod-database>} objects denoting dictionaries to be served.
    @end table
    @end deftp
    
    @deftp {Data Type} dicod-database
    Data type representing a dictionary database.
    
    @table @asis
    @item @code{name}
    Name of the database, will be used in DICT commands.
    
    @item @code{module}
    Name of the dicod module used by this database
    (@pxref{Modules,,, dico, GNU Dico Manual}).
    
    @item @code{options}
    List of strings or gexps representing the arguments for the module handler
    (@pxref{Handlers,,, dico, GNU Dico Manual}).
    @end table
    @end deftp
    
    @defvr {Scheme Variable} %dicod-database:gcide
    A @code{<dicod-database>} object serving the GNU Collaborative International
    Dictonary of English using the @code{gcide} package.
    @end defvr
    
    @node Setuid Programs
    @subsection Setuid Programs
    
    @cindex setuid programs