Dovecot

Contents

Dovecotについて


公式ページ:https://www.dovecot.org/

用語


MRA(Mail Retrieval Agent)


受信したメールを読みだすためのサーバプログラムのこと。


機能


プロキシ


Directorサーバと呼び、DovecotによるMRAサーバへのプロキシを行うサーバを立てることができる。
このプロキシサーバでは複数のMRAへ接続を振り分けることが可能である。


サーバー構築


構築環境




OS設定


ネットワーク


固定IPアドレス割り当て


次のファイルを編集する
# ifcfg-loはループバックインタフェースであるため、触らない
vi /etc/sysconfig/network-scripts/ifcfg-<インタフェース名>

以下では例として192.168.0.51/24を割り当てた
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.51
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1

ネットワークを再起動する
systemctl restart network

ip addressコマンドにより、インタフェースが有効になっていることを確認する
これによりホストマシンなどからSSHでログイン可能となる


firewalld


IMAP4

IMAP4(TCP/143)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。
yum update firewalld -y

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=imap
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep imap
  3. ルールを適用する
    firewall-cmd --add-service=imap --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep imap
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

POP3

POP3(TCP/110)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。
yum update firewalld -y

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=pop3
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep pop3
  3. ルールを適用する
    firewall-cmd --add-service=pop3 --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep pop3
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

IMAP4S

IMAP4(TCP/993)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。
yum update firewalld -y

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=imaps
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep imaps
  3. ルールを適用する
    firewall-cmd --add-service=imaps --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep imaps
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

POP3S

POP3(TCP/995)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。
yum update firewalld -y

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=pop3s
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep pop3s
  3. ルールを適用する
    firewall-cmd --add-service=pop3s --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep pop3s
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

ホスト名


ホスト名としてmailを設定する
hostname mail.corp
# 再起動しても有効にする
echo mail.corp > /etc/hostname
再ログインすることで有効になる。

ユーザ作成


dovecot用のユーザを作成する

デーモン用ユーザ


useradd --user-group --no-create-home --shell /sbin/nologin dovecot

デフォルトアクセスユーザ


アクセスしたユーザが未承認状態の場合のデフォルトユーザを作成する
useradd --no-create-home --shell /sbin/nologin dovenull
usermod -G dovecot dovenull

Dovecotの構築



Dovecotのインストール


パッケージからインストール



ソースコードからインストール



  1. rootになる
    su -
  2. ソースコードを取得する
    1. ダウンロードサイト:https://www.dovecot.org/download.htmlからアーカイブのURLを取得する
      ※Stable releasesから取得する
    2. ダウンロードする
      curl -O -s https://www.dovecot.org/releases/2.2/dovecot-2.2.33.tar.gz
    3. アーカイブファイルを展開する
      tar xzfv dovecot-*.tar.gz
    4. ソースコードディレクトリへ移動する
      cd dovecot-*
  3. コンパイル、インストールを行う
    1. コンパイル最適化設定を行う
      export CFLAGS="-O3 -m64"
    2. Makefileを生成する
      ./configure --prefix=/usr/local/`pwd | sed "s/.*\///"` --sysconfdir=/usr/local/`pwd | sed "s/.*\///"`/conf 2>&1 | tee configure.log
      • オプション一覧

        [root@mail dovecot-2.2.33]# ./configure --help
        `configure' configures Dovecot 2.2.33 to adapt to many kinds of systems.
        
        Usage: ./configure [OPTION]... [VAR=VALUE]...
        
        To assign environment variables (e.g., CC, CFLAGS...), specify them as
        VAR=VALUE.  See below for descriptions of some of the useful variables.
        
        Defaults for the options are specified in brackets.
        
        Configuration:
          -h, --help              display this help and exit
              --help=short        display options specific to this package
              --help=recursive    display the short help of all the included packages
          -V, --version           display version information and exit
          -q, --quiet, --silent   do not print `checking ...' messages
              --cache-file=FILE   cache test results in FILE [disabled]
          -C, --config-cache      alias for `--cache-file=config.cache'
          -n, --no-create         do not create output files
              --srcdir=DIR        find the sources in DIR [configure dir or `..']
        
        Installation directories:
          --prefix=PREFIX         install architecture-independent files in PREFIX
                                  [/usr/local]
          --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                                  [PREFIX]
        
        By default, `make install' will install all the files in
        `/usr/local/bin', `/usr/local/lib' etc.  You can specify
        an installation prefix other than `/usr/local' using `--prefix',
        for instance `--prefix=$HOME'.
        
        For better control, use the options below.
        
        Fine tuning of the installation directories:
          --bindir=DIR            user executables [EPREFIX/bin]
          --sbindir=DIR           system admin executables [EPREFIX/sbin]
          --libexecdir=DIR        program executables [EPREFIX/libexec]
          --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
          --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
          --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
          --libdir=DIR            object code libraries [EPREFIX/lib]
          --includedir=DIR        C header files [PREFIX/include]
          --oldincludedir=DIR     C header files for non-gcc [/usr/include]
          --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
          --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
          --infodir=DIR           info documentation [DATAROOTDIR/info]
          --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
          --mandir=DIR            man documentation [DATAROOTDIR/man]
          --docdir=DIR            documentation root [DATAROOTDIR/doc/dovecot]
          --htmldir=DIR           html documentation [DOCDIR]
          --dvidir=DIR            dvi documentation [DOCDIR]
          --pdfdir=DIR            pdf documentation [DOCDIR]
          --psdir=DIR             ps documentation [DOCDIR]
        
        Program names:
          --program-prefix=PREFIX            prepend PREFIX to installed program names
          --program-suffix=SUFFIX            append SUFFIX to installed program names
          --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
        
        System types:
          --build=BUILD     configure for building on BUILD [guessed]
          --host=HOST       cross-compile to build programs to run on HOST [BUILD]
        
        Optional Features:
          --disable-option-checking  ignore unrecognized --enable/--with options
          --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
          --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
          --enable-maintainer-mode  enable make rules and dependencies not useful
                                  (and sometimes confusing) to the casual installer
          --enable-devel-checks   Enable some extra expensive checks for developers
          --enable-asserts        Enable asserts (default)
          --disable-dependency-tracking  speeds up one-time build
          --enable-dependency-tracking   do not reject slow dependency extractors
          --enable-shared[=PKGS]  build shared libraries [default=yes]
          --enable-static[=PKGS]  build static libraries [default=yes]
          --enable-fast-install[=PKGS]
                                  optimize for fast installation [default=yes]
          --disable-libtool-lock  avoid locking (might break parallel builds)
          --disable-rpath         do not hardcode runtime library paths
          --disable-largefile     omit support for large files
        
        Optional Packages:
          --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
          --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
          --with-shared-libs      Link binaries using shared Dovecot libraries
                                  (default)
          --with-mem-align=BYTES  Set the memory alignment (default: 8)
          --with-ioloop=IOLOOP    Specify the I/O loop method to use (epoll, kqueue,
                                  poll; best for the fastest available; default is
                                  best)
          --with-notify=NOTIFY    Specify the file system notification method to use
                                  (inotify, kqueue, dnotify, none; default is detected
                                  in the above order)
          --with-nss              Build with NSS module support (auto)
          --with-shadow           Build with shadow password support (auto)
          --with-pam              Build with PAM support (auto)
          --with-bsdauth          Build with BSD authentication support (auto)
          --with-gssapi=yes|plugin Build with GSSAPI authentication support
        
          --with-sia              Build with Tru64 SIA support
          --with-ldap=yes|plugin  Build with LDAP support
          --with-vpopmail         Build with vpopmail support (auto)
          --with-sql=yes|plugin   Build with generic SQL support
          --with-pgsql            Build with PostgreSQL driver support
          --with-mysql            Build with MySQL driver support
          --with-sqlite           Build with SQLite3 driver support
          --with-lucene           Build with CLucene full text search support
          --with-stemmer          Build with libstemmer support (for CLucene)
          --with-solr             Build with Solr full text search support
          --with-zlib             Build with zlib compression support
          --with-bzlib            Build with bzlib compression support
          --with-libcap           Build with libcap support (Dropping capabilities).
          --with-libwrap          Build with libwrap, ie. TCP-wrappers
          --with-ssl=gnutls|openssl
                                  Build with GNUTLS or OpenSSL (default)
          --with-ssldir=DIR       SSL base directory for certificates (/etc/ssl)
          --with-rundir=DIR       Runtime data directory (LOCALSTATEDIR/run/dovecot)
          --with-statedir=DIR     Permanent data directory (LOCALSTATEDIR/lib/dovecot)
          --with-systemdsystemunitdir=DIR
                                  Directory for systemd service files (auto=detect)
          --with-gc               Use Boehm garbage collector
          --with-storages         Build with specified mail storage formats (mdbox
                                  sdbox maildir mbox cydir imapc pop3c)
          --with-moduledir=DIR    Base directory for dynamically loadable modules
          --with-docs             Install documentation (default)
          --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                                  both]
          --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
          --with-sysroot=DIR Search for dependent libraries within DIR
                                (or the compiler's sysroot if not specified).
          --with-gnu-ld           assume the C compiler uses GNU ld default=no
          --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
          --without-libiconv-prefix     don't search for libiconv in includedir and libdir
        
        Some influential environment variables:
          PKG_CONFIG  path to pkg-config utility
          PKG_CONFIG_PATH
                      directories to add to pkg-config's search path
          PKG_CONFIG_LIBDIR
                      path overriding pkg-config's built-in search path
          CC          C compiler command
          CFLAGS      C compiler flags
          LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
                      nonstandard directory <lib dir>
          LIBS        libraries to pass to the linker, e.g. -l<library>
          CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
                      you have headers in a nonstandard directory <include dir>
          CPP         C preprocessor
          CXX         C++ compiler command
          CXXFLAGS    C++ compiler flags
          CXXCPP      C++ preprocessor
          SSL_CFLAGS  C compiler flags for SSL, overriding pkg-config
          SSL_LIBS    linker flags for SSL, overriding pkg-config
        
        Use these variables to override the choices made by `configure' or to help
        it to find libraries and programs with nonstandard names/locations.
        
        Report bugs to <dovecot@dovecot.org>.
      • オプション
        • –oldincludedir
          現在は意味をなさない
        • –sbindir
          dovecotのデーモンファイルのインストールパス
        • –sysconfdir
          設定ファイルのインストールパス
        • –without-docs
          ドキュメント、サンプル設定ファイル、自己署名証明書生成スクリプト、Apache Solr用のスキーマファイルなどをインストールしない。
          インストールした場合、下記ディレクトリに配置される。
          $DOVECOT_HOME/share/doc/
    3. コンパイルする
      make 2>&1 | tee make.log
    4. インストールを行う。
      make install 2>&1 | tee make_install.log
  4. リンク作成、環境変数設定などを行う
    1. インストールディレクトリへのシンボリックリンクを作成する。
      これによって、複数のバージョンを同居させ、リンクを切り替えることで、バージョン変更が可能となる。
      各バージョンの実行ファイルはデフォルトでは各バージョンの設定ファイルを読み込むこととなる。
      rm -f /usr/local/dovecot
      ln -s /usr/local/`pwd | sed "s/.*\///"` /usr/local/dovecot
    2. 簡単にアクセスできるように環境変数を設定する
      export DOVECOT_HOME=/usr/local/dovecot
    3. ツール類にパスを通す
      export PATH=$DOVECOT_HOME/bin:$PATH
    4. 環境変数を再起動後も有効にする
      echo "" >> /etc/bashrc
      echo "# DOVECOT ENVIRONMENT VARIABLE" >> /etc/bashrc
      echo "export DOVECOT_HOME=$DOVECOT_HOME" >> /etc/bashrc
      echo "export PATH=\$DOVECOT_HOME/bin:\$PATH" >> /etc/bashrc
  5. 不要なソースコードを削除する
    cd ../
    rm -rf dovecot*
  6. インストールしたディレクトリに移動する
    cd $DOVECOT_HOME
  7. 不要ファイルを削除する
    rm -f conf/dovecot/README
  8. systemdの設定する
    1. サービスファイルを作成する
      ※1024番以下のポートを使用する場合はパラメータ”User”を使用してroot以外を指定することをしてはならない。
      cat > /etc/systemd/system/dovecot.service << EOT
      [Unit]
      Description=Dovecot IMAP/POP3 email server
      After=local-fs.target network.target network-online.target
      
      [Service]
      Type=simple
      ExecStart=/usr/local/dovecot/sbin/dovecot -F
      ExecReload=/bin/kill -HUP $MAINPID
      PrivateTmp=true
      NonBlocking=yes
      
      [Install]
      WantedBy=multi-user.target
      EOT
    2. 必要であれば、ソケットファイルも作成する。
      ソケットファイルはスーパーデーモンを利用する際に使用する。
      メール受信を使用する頻度が低いなら設定しておくと良い。
      cat > /etc/systemd/system/dovecot.socket << EOT
      [Unit]
      Description=Dovecot IMAP/POP3 email server activation socket
      
      [Socket]
      #dovecot expects separate IPv4 and IPv6 sockets
      BindIPv6Only=ipv6-only
      ListenStream=0.0.0.0:143
      ListenStream=[::]:143
      ListenStream=0.0.0.0:993
      ListenStream=[::]:993
      KeepAlive=true
      
      [Install]
      WantedBy=sockets.target
      EOT
    3. サービスを有効化する
      systemctl enable dovecot
    4. サービスが有効化されていることを確認する
      systemctl list-unit-files --type service --no-pager | grep dovecot
  9. 設定ファイルを作成する
    • サンプルファイルを使用する場合、コピーする
      cp -R share/doc/dovecot/example-config/* conf/dovecot/
      ※元の内容は以下

      ## Dovecot configuration file
      
      # If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
      
      # "doveconf -n" command gives a clean output of the changed settings. Use it
      # instead of copy&pasting files when posting to the Dovecot mailing list.
      
      # '#' character and everything after it is treated as comments. Extra spaces
      # and tabs are ignored. If you want to use either of these explicitly, put the
      # value inside quotes, eg.: key = "# char and trailing whitespace  "
      
      # Default values are shown for each setting, it's not required to uncomment
      # those. These are exceptions to this though: No sections (e.g. namespace {})
      # or plugin settings are added by default, they're listed only as examples.
      # Paths are also just examples with the real defaults being based on configure
      # options. The paths listed here are for configure --prefix=/usr
      # --sysconfdir=/etc --localstatedir=/var
      
      # Protocols we want to be serving.
      #protocols = imap pop3 lmtp
      
      # A comma separated list of IPs or hosts where to listen in for connections.
      # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
      # If you want to specify non-default ports or anything more complex,
      # edit conf.d/master.conf.
      #listen = *, ::
      
      # Base directory where to store runtime data.
      #base_dir = /var/run/dovecot/
      
      # Name of this instance. In multi-instance setup doveadm and other commands
      # can use -i <instance_name> to select which instance is used (an alternative
      # to -c <config_path>). The instance name is also added to Dovecot processes
      # in ps output.
      #instance_name = dovecot
      
      # Greeting message for clients.
      #login_greeting = Dovecot ready.
      
      # Space separated list of trusted network ranges. Connections from these
      # IPs are allowed to override their IP addresses and ports (for logging and
      # for authentication checks). disable_plaintext_auth is also ignored for
      # these networks. Typically you'd specify your IMAP proxy servers here.
      #login_trusted_networks =
      
      # Sepace separated list of login access check sockets (e.g. tcpwrap)
      #login_access_sockets =
      
      # With proxy_maybe=yes if proxy destination matches any of these IPs, don't do
      # proxying. This isn't necessary normally, but may be useful if the destination
      # IP is e.g. a load balancer's IP.
      #auth_proxy_self =
      
      # Show more verbose process titles (in ps). Currently shows user name and
      # IP address. Useful for seeing who are actually using the IMAP processes
      # (eg. shared mailboxes or if same uid is used for multiple accounts).
      #verbose_proctitle = no
      
      # Should all processes be killed when Dovecot master process shuts down.
      # Setting this to "no" means that Dovecot can be upgraded without
      # forcing existing client connections to close (although that could also be
      # a problem if the upgrade is e.g. because of a security fix).
      #shutdown_clients = yes
      
      # If non-zero, run mail commands via this many connections to doveadm server,
      # instead of running them directly in the same process.
      #doveadm_worker_count = 0
      # UNIX socket or host:port used for connecting to doveadm server
      #doveadm_socket_path = doveadm-server
      
      # Space separated list of environment variables that are preserved on Dovecot
      # startup and passed down to all of its child processes. You can also give
      # key=value pairs to always set specific settings.
      #import_environment = TZ
      
      ##
      ## Dictionary server settings
      ##
      
      # Dictionary can be used to store key=value lists. This is used by several
      # plugins. The dictionary can be accessed either directly or though a
      # dictionary server. The following dict block maps dictionary names to URIs
      # when the server is used. These can then be referenced using URIs in format
      # "proxy::<name>".
      
      dict {
        #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
        #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
      }
      
      # Most of the actual configuration gets included below. The filenames are
      # first sorted by their ASCII value and parsed in that order. The 00-prefixes
      # in filenames are intended to make it easier to understand the ordering.
      !include conf.d/*.conf
      
      # A config file can also tried to be included without giving an error if
      # it's not found:
      !include_try local.conf
    • 自作する場合
      cat > $DOVECOT_HOME/conf/dovecot/dovecot.conf << EOT
      protocols = imap
      default_login_user = mda
      log_path = /usr/local/dovecot/log/log
      mail_location = maildir:/usr/local/data/mail/%u
      EOT
      ログをsyslogではなくファイルに直接出力する設定を行ったので、出力先のディレクトリを作成する。
      mkdir log
      1. 設定ファイルに誤りがないか確認する
        問題があれば、”Error”が出力される
        doveconf
  10. ファイル所有者を変更する
    chown -R dovecot:dovecot /usr/local/dovecot*
  11. Dovecotを起動する
    systemctl start dovecot
  12. 稼働確認
    doveadm process status

Dovecot設定



設定変更後、以下のコマンドで設定ファイルの妥当性確認を行うことができる。
doveconf
設定の反映は次のコマンドで行う
doveadm reload
or
$DOVECOT_HOME/sbin/dovecot reload
or
systemctl reload dovecot

設定ファイルパス


$DOVECOT_HOME/conf/dovecot/dovecot.conf

記法


設定値


以下のように記述する。
<設定項目> = <値>
=以降に更に=が含まれる場合があるが、これは全て<値>の文字列である。

設定値の欄において括弧の意味は以下。

セクション


特定の設定群では設定値が重複するため、その設定群をセクションとして切り出し、名前空間化することで設定を排他的にしている。

コメント


先頭に#を付けることでコメントアウト可能
# xxx = yyy

標準設定一覧


次のコマンドで確認可能
doveconf -d

# 2.2.33 (68b0a183e): /usr/local/dovecot-2.2.33/conf/dovecot/dovecot.conf
# OS: Linux 3.10.0-514.el7.x86_64 x86_64 CentOS Linux release 7.3.1611 (Core)
# NOTE: Send doveconf -n output instead when asking for help.
auth_anonymous_username = anonymous
auth_cache_negative_ttl = 1 hours
auth_cache_size = 0
auth_cache_ttl = 1 hours
auth_debug = no
auth_debug_passwords = no
auth_default_realm =
auth_failure_delay = 2 secs
auth_gssapi_hostname =
auth_krb5_keytab =
auth_master_user_separator =
auth_mechanisms = plain
auth_policy_hash_mech = sha256
auth_policy_hash_nonce =
auth_policy_hash_truncate = 12
auth_policy_reject_on_fail = no
auth_policy_request_attributes = login=%{orig_username} pwhash=%{hashed_password} remote=%{real_rip} device_id=%{client_id} protocol=%s
auth_policy_server_api_header =
auth_policy_server_timeout_msecs = 2000
auth_policy_server_url =
auth_proxy_self =
auth_realms =
auth_socket_path = auth-userdb
auth_ssl_require_client_cert = no
auth_ssl_username_from_cert = no
auth_stats = no
auth_use_winbind = no
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_username_format = %Lu
auth_username_translation =
auth_verbose = no
auth_verbose_passwords = no
auth_winbind_helper_path = /usr/bin/ntlm_auth
auth_worker_max_count = 30
base_dir = /usr/local/dovecot-2.2.33/var/run/dovecot
config_cache_size = 1 M
debug_log_path =
default_client_limit = 1000
default_idle_kill = 1 mins
default_internal_user = dovecot
default_login_user = dovenull
default_process_limit = 100
default_vsz_limit = 256 M
deliver_log_format = msgid=%m: %$
dict_db_config =
director_consistent_hashing = no
director_doveadm_port = 0
director_flush_socket =
director_mail_servers =
director_servers =
director_user_expire = 15 mins
director_user_kick_delay = 2 secs
director_username_hash = %Lu
disable_plaintext_auth = yes
dotlock_use_excl = yes
doveadm_allowed_commands =
doveadm_api_key =
doveadm_http_rawlog_dir =
doveadm_password =
doveadm_port = 0
doveadm_socket_path = doveadm-server
doveadm_username = doveadm
doveadm_worker_count = 0
dsync_alt_char = _
dsync_commit_msgs_interval = 100
dsync_features =
dsync_hashed_headers = Date Message-ID
dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u -U
first_valid_gid = 1
first_valid_uid = 500
haproxy_timeout = 3 secs
haproxy_trusted_networks =
hostname =
imap_capability =
imap_client_workarounds =
imap_fetch_failure = disconnect-immediately
imap_hibernate_timeout = 0
imap_id_log =
imap_id_retain = no
imap_id_send = name *
imap_idle_notify_interval = 2 mins
imap_logout_format = in=%i out=%o
imap_max_line_length = 64 k
imap_metadata = no
imap_urlauth_host =
imap_urlauth_logout_format = in=%i out=%o
imap_urlauth_port = 143
imapc_cmd_timeout = 5 mins
imapc_connection_retry_count = 1
imapc_connection_retry_interval = 1 secs
imapc_features =
imapc_host =
imapc_list_prefix =
imapc_master_user =
imapc_max_idle_time = 29 mins
imapc_max_line_length = 0
imapc_password =
imapc_port = 143
imapc_rawlog_dir =
imapc_sasl_mechanisms =
imapc_ssl = no
imapc_ssl_verify = yes
imapc_user =
import_environment = TZ CORE_OUTOFMEM CORE_ERROR
info_log_path =
instance_name = dovecot
last_valid_gid = 0
last_valid_uid = 0
lda_mailbox_autocreate = no
lda_mailbox_autosubscribe = no
lda_original_recipient_header =
libexec_dir = /usr/local/dovecot-2.2.33/libexec/dovecot
listen = *, ::
lmtp_address_translate =
lmtp_hdr_delivery_address = final
lmtp_proxy = no
lmtp_rcpt_check_quota = no
lmtp_save_to_detail_mailbox = no
lmtp_user_concurrency_limit = 0
lock_method = fcntl
log_path = syslog
log_timestamp = "%b %d %H:%M:%S "
login_access_sockets =
login_greeting = Dovecot ready.
login_log_format = %$: %s
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c session=<%{session}>
login_plugin_dir = /usr/local/dovecot-2.2.33/lib/dovecot/login
login_plugins =
login_proxy_max_disconnect_delay = 0
login_source_ips =
login_trusted_networks =
mail_access_groups =
mail_always_cache_fields =
mail_attachment_dir =
mail_attachment_fs = sis posix
mail_attachment_hash = %{sha1}
mail_attachment_min_size = 128 k
mail_attribute_dict =
mail_cache_fields = flags
mail_cache_min_mail_count = 0
mail_chroot =
mail_debug = no
mail_fsync = optimized
mail_full_filesystem_access = no
mail_gid =
mail_home =
mail_location =
mail_log_prefix = "%s(%u): "
mail_max_keyword_length = 50
mail_max_lock_timeout = 0
mail_max_userip_connections = 10
mail_never_cache_fields = imap.envelope
mail_nfs_index = no
mail_nfs_storage = no
mail_plugin_dir = /usr/local/dovecot-2.2.33/lib/dovecot
mail_plugins =
mail_prefetch_count = 0
mail_privileged_group =
mail_save_crlf = no
mail_server_admin =
mail_server_comment =
mail_shared_explicit_inbox = no
mail_sort_max_read_count = 0
mail_temp_dir = /tmp
mail_temp_scan_interval = 1 weeks
mail_uid =
mail_vsize_bg_after_count = 0
mailbox_idle_check_interval = 30 secs
mailbox_list_index = no
mailbox_list_index_include_inbox = no
mailbox_list_index_very_dirty_syncs = no
maildir_broken_filename_sizes = no
maildir_copy_with_hardlinks = yes
maildir_empty_new = no
maildir_stat_dirs = no
maildir_very_dirty_syncs = no
master_user_separator =
mbox_dirty_syncs = yes
mbox_dotlock_change_timeout = 2 mins
mbox_lazy_writes = yes
mbox_lock_timeout = 5 mins
mbox_md5 = apop3d
mbox_min_index_size = 0
mbox_read_locks = fcntl
mbox_very_dirty_syncs = no
mbox_write_locks = dotlock fcntl
mdbox_preallocate_space = no
mdbox_purge_preserve_alt = no
mdbox_rotate_interval = 0
mdbox_rotate_size = 2 M
mmap_disable = no
pop3_client_workarounds =
pop3_delete_type = default
pop3_deleted_flag =
pop3_enable_last = no
pop3_fast_size_lookups = no
pop3_lock_session = no
pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_no_flag_updates = no
pop3_reuse_xuidl = no
pop3_save_uidl = no
pop3_uidl_duplicates = allow
pop3_uidl_format = %08Xu%08Xv
pop3c_features =
pop3c_host =
pop3c_master_user =
pop3c_password =
pop3c_port = 110
pop3c_quick_received_date = no
pop3c_rawlog_dir =
pop3c_ssl = no
pop3c_ssl_verify = yes
pop3c_user = %u
postmaster_address = postmaster@%d
protocols = imap pop3 lmtp
quota_full_tempfail = no
rawlog_dir =
recipient_delimiter = +
rejection_reason = Your message to <%t> was automatically rejected:%n%r
rejection_subject = Rejected: %s
replication_dsync_parameters = -d -N -l 30 -U
replication_full_sync_interval = 1 days
replication_max_conns = 10
replicator_host = replicator
replicator_port = 0
sendmail_path = /usr/sbin/sendmail
service aggregator {
  chroot = .
  client_limit = 0
  drop_priv_before_exec = no
  executable = aggregator
  extra_groups =
  fifo_listener replication-notify-fifo {
    group =
    mode = 0600
    user =
  }
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener replication-notify {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service anvil {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = anvil
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 1
  protocol =
  service_count = 0
  type = anvil
  unix_listener anvil-auth-penalty {
    group =
    mode = 0600
    user =
  }
  unix_listener anvil {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service auth-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = auth -w
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 1
  type =
  unix_listener auth-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service auth {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = auth
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener auth-client {
    group =
    mode = 0600
    user = $default_internal_user
  }
  unix_listener auth-login {
    group =
    mode = 0600
    user = $default_internal_user
  }
  unix_listener auth-master {
    group =
    mode = 0600
    user =
  }
  unix_listener auth-userdb {
    group =
    mode = 0666
    user = $default_internal_user
  }
  unix_listener login/login {
    group =
    mode = 0666
    user =
  }
  unix_listener token-login/tokenlogin {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service config {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = config
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type = config
  unix_listener config {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service dict-async {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = dict
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dict-async {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service dict {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = dict
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dict {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service director {
  chroot = .
  client_limit = 0
  drop_priv_before_exec = no
  executable = director
  extra_groups =
  fifo_listener login/proxy-notify {
    group =
    mode = 00
    user =
  }
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener director-admin {
    group =
    mode = 0600
    user =
  }
  unix_listener login/director {
    group =
    mode = 00
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service dns_client {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = dns-client
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dns-client {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service doveadm {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = doveadm-server
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 1
  type =
  unix_listener doveadm-server {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service imap-hibernate {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-hibernate
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 0
  type =
  unix_listener imap-hibernate {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service imap-login {
  chroot = login
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-login
  extra_groups =
  group =
  idle_kill = 0
  inet_listener imap {
    address =
    haproxy = no
    port = 143
    reuse_port = no
    ssl = no
  }
  inet_listener imaps {
    address =
    haproxy = no
    port = 993
    reuse_port = no
    ssl = yes
  }
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type = login
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}
service imap-urlauth-login {
  chroot = token-login
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-urlauth-login
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type = login
  unix_listener imap-urlauth {
    group =
    mode = 0666
    user =
  }
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}
service imap-urlauth-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap-urlauth-worker
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener imap-urlauth-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service imap-urlauth {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap-urlauth
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener token-login/imap-urlauth {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service imap {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener imap-master {
    group =
    mode = 0600
    user =
  }
  unix_listener login/imap {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service indexer-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = indexer-worker
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 10
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener indexer-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service indexer {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = indexer
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener indexer {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service ipc {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = ipc
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener ipc {
    group =
    mode = 0600
    user =
  }
  unix_listener login/ipc-proxy {
    group =
    mode = 0600
    user = $default_login_user
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
service lmtp {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = lmtp
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = lmtp
  service_count = 0
  type =
  unix_listener lmtp {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service log {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = log
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type = log
  unix_listener log-errors {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service pop3-login {
  chroot = login
  client_limit = 0
  drop_priv_before_exec = no
  executable = pop3-login
  extra_groups =
  group =
  idle_kill = 0
  inet_listener pop3 {
    address =
    haproxy = no
    port = 110
    reuse_port = no
    ssl = no
  }
  inet_listener pop3s {
    address =
    haproxy = no
    port = 995
    reuse_port = no
    ssl = yes
  }
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = pop3
  service_count = 1
  type = login
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}
service pop3 {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = pop3
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = pop3
  service_count = 1
  type =
  unix_listener login/pop3 {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service replicator {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = replicator
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener replicator-doveadm {
    group =
    mode = 00
    user = $default_internal_user
  }
  unix_listener replicator {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service ssl-params {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = ssl-params
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type = startup
  unix_listener login/ssl-params {
    group =
    mode = 0666
    user =
  }
  unix_listener ssl-params {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}
service stats {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = stats
  extra_groups =
  fifo_listener stats-mail {
    group =
    mode = 0600
    user =
  }
  fifo_listener stats-user {
    group =
    mode = 0600
    user =
  }
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener stats {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}
shutdown_clients = yes
ssl = yes
ssl_alt_cert =
ssl_alt_key =
ssl_ca =
ssl_cert =
ssl_cert_username_field = commonName
ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL
ssl_client_ca_dir =
ssl_client_ca_file =
ssl_client_cert =
ssl_client_key =
ssl_crypto_device =
ssl_dh_parameters_length = 1024
ssl_key =
ssl_key_password =
ssl_options =
ssl_parameters_regenerate = 0
ssl_prefer_server_ciphers = no
ssl_protocols = !SSLv3
ssl_require_crl = yes
ssl_verify_client_cert = no
state_dir = /usr/local/dovecot-2.2.33/var/lib/dovecot
stats_carbon_interval = 30 secs
stats_carbon_name =
stats_carbon_server =
stats_command_min_time = 1 mins
stats_domain_min_time = 12 hours
stats_ip_min_time = 12 hours
stats_memory_limit = 16 M
stats_session_min_time = 15 mins
stats_user_min_time = 1 hours
submission_host =
syslog_facility = mail
valid_chroot_dirs =
verbose_proctitle = no
verbose_ssl = no
version_ignore = no


パラメータ


基本設定


パス


base_dir

実行時データの格納場所



libexec_dir

内部で使用される実行可能ファイル群のパス



valid_chroot_dirs

chroot可能なパスのリスト



ネットワーク


listen

受け入れ可能なインタフェースのIPアドレス



protocols

サーバで受付可能なプロトコル



disable_plaintext_auth

平文で認証情報をやり取りすることを禁止するかどうか。
SSL/TLSを使用するか、ローカル通信のみしか行わないのでない限り許可すべきではない。



ユーザ


first_valid_gid

Dovecotで使用可能なユーザのグループIDの有効範囲の最小値を指定する。



first_valid_uid

Dovecotで使用可能なユーザIDの有効範囲の最小値を指定する。



last_valid_gid

Dovecotで使用可能なユーザのグループIDの有効範囲の最大値を指定する。



last_valid_uid

Dovecotで使用可能なユーザIDの有効範囲の最大値を指定する。



ログ


Dovecotは次の4レベルのログを出力する。


log_path

ログの出力先ファイルのパスを指定する。
指定するのはディレクトリでなく、ファイルのパスであることに注意する。



info_log_path

INFOレベルのみ、ログの出力先を指定する。
指定しない場合、他のログと同じパスに出力される。




debug_log_path

DEBUGレベルのログの出力先を指定する。



log_timestamp







deliver_log_format






rawlog_dir

Dovecotが行った通信のパケットキャプチャを取得して保存するパス。



syslog_facility

syslogのファシリティを指定する。



その他


shutdown_clients

Dovecotのマスタープロセスを終了させた際に通信中の子プロセスも強制的に終了させるかどうか。



verbose_proctitle

psコマンドでプロセスを表示する際に詳細表示を行うかどうか。
詳細表示を行う場合、ユーザ名とIPアドレスを表示する。



import_environment

Dovecotに渡される環境変数のリスト。



instance_name

インスタンス名を指定する。
マルチインスタンスで使用する場合にインスタンス名を使用する。



version_ignore

Dovecotのメインプログラムとその他のサププログラムのバージョンが不一致の際に無視してエラーとしないかどうか。



!include

指定したパスに設定ファイルを読み込む。
存在しない場合はエラーになる。



!include_try

指定したパスに設定ファイルが存在すれば読み込む。
存在しなくてもエラーにならない。




認証


auth_anonymous_username






auth_cache_negative_ttl






auth_cache_size






auth_cache_ttl






auth_debug


認証時のログを出力するかどうかを指定する。



auth_debug_passwords


ログに認証時に指定されたパスワードを書き出すかどうかを指定する。



auth_default_realm


ドメイン名が空の認証要求の際に使用するデフォルトのドメイン名



auth_failure_delay






auth_gssapi_hostname






auth_krb5_keytab






auth_master_user_separator


masterユーザとしてログイン可能にしたい場合、通常のユーザ名とmasterユーザ名を結合して記載できる。
その際の分割点となる文字を指定する。
この場合、<username><separator><master username>の並びとなる。
設定する場合、アスタリスク”*”が推奨されている。



auth_mechanisms


認証方式。



auth_policy_hash_mech






auth_policy_hash_nonce






auth_policy_hash_truncate






auth_policy_reject_on_fail






auth_policy_request_attributes






auth_policy_server_api_header






auth_policy_server_timeout_msecs






auth_policy_server_url






auth_proxy_self






auth_realms


パラメータ”auth_mechanisms”を”DIGEST-MD5″に設定して認証を行う場合に、許容するドメインのリスト。



auth_socket_path


DovecotでLDA(ローカルメール配信)を行う場合に使用する認証用のUNIXソケットのパス。
パラメータ”base_dir”からの相対パスで記述する。



auth_ssl_require_client_cert






auth_ssl_username_from_cert






auth_stats






auth_use_winbind






auth_username_chars






auth_username_format






auth_username_translation






auth_verbose






auth_verbose_passwords






auth_winbind_helper_path






auth_worker_max_count






passdbセクション




共通設定

driver

パスワードデータベースの方式。



args

Arguments for the passdb backend. The format of this value depends on the passdb driver. Each one uses different args.



default_fields

Passdb fields (and extra fields) that are used, unless overwritten by the passdb backend. They are in format key=value key2=value2 …. The values can contain %variables.



override_fields

Same as default_fields, but instead of providing the default values, these values override what the passdb backend returned.



auth_verbose

If this is explicitly set to yes or no, it overrides the global auth_verbose setting. (However, auth_debug=yes overrides the auth_verbose setting.) (v2.2.24+)





result_success

What to do if the authentication succeeded (default: return-ok)





result_failure

What to do if authentication failed (default: continue)




result_internalfail

What to do if the passdb lookup had an internal failure (default: continue). If any of the passdbs had an internal failure and the final passdb also returns “continue”, the authentication will fail with “internal error”. WARNING: If multiple passdbs are required (results are merged), it’s important to set result_internalfail=return-fail to them, otherwise the authentication could still succeed but not all the intended extra fields are set.





DB固有設定

設定したパラメータ”driver”で使用する場合のみ設定をすることができる。

deny

If “yes”, used to provide “denied users database”. If the user is found from the passdb, the authentication will fail.




master

If “yes”, used to provide master users database. The users listed in the master passdb can log in as other users.



pass: This is an alias for result_success = continue as described below. This was commonly used together with master passdb to specify that even after a successful master user authentication, the authentication should continue to the actual non-master passdb to lookup the user.

skip

Do we sometimes want to skip over this passdb?




never
authenticated: Skip if an earlier passdb already authenticated the user successfully.
unauthenticated: Skip if user hasn’t yet been successfully authenticated by the previous passdbs.

mechanisms

Skip, if non-empty and the current auth mechanism is not listed here. Space or comma-separated list of auth mechanisms (e.g. “PLAIN LOGIN”). Also “none” can be used to match for a non-authenticating passdb lookup. (v2.2.30+)




username_filter

Skip, if non-empty and the username doesn’t match the filter. This is mainly used to assign specific passdbs to specific domains. Space or comma-separated list of username filters that can have “*” or “?” wildcards. If any of the filters matches, the filter succeeds. However, there can also be negative matches preceded by “!”. If any of the negative filters matches, the filter won’t succeed. For example if the filter is “*@example.com *@example2.com !user@example.com”, “any@example.com” or “user@example2.com” matches but “user@example.com” won’t match. (v2.2.30+)



userdbセクション



共通設定


driver

ユーザデータベースの方式。










args

Arguments for the userdb backend. The format of this value depends on the userdb driver. Each one uses different args.

default_fields

Userdb fields (and extra fields) that are used, unless overwritten by the userdb backend. They are in format key=value key2=value2 …. The values can contain %variables.

override_fields

Same as default_fields, but instead of providing the default values, these values override what the userdb backend returned. For example useful with userdb passwd for overriding e.g. home directory or the uid/gid.
auth_verbose

If this is explicitly set to yes or no, it overrides the global auth_verbose setting. (However, auth_debug=yes overrides the auth_verbose setting.) (v2.2.24+)

Then we have the setting which specify when the userdb is used (v2.2.10+):

skip

既に別のuserdbセクションが設定されている場合、またはされていない場合に、このuserdbセクションを無効にするかどうかを設定する。


And finally we can control what happens when we’re finished with this userdb (v2.2.10+):

   result_success: What to do if the user was found from the userdb (default: return-ok)
   result_failure: What to do if the user wasn't found from the userdb (default: continue)

   result_internalfail: What to do if the userdb lookup had an internal failure (default: continue). If any of the userdbs had an internal failure and the final userdb also returns "continue", the lookup will fail with "internal error". WARNING: If multiple userdbs are required (results are merged), it's important to set result_internalfail=return-fail to them, otherwise the userdb lookup could still succeed but not all the intended extra fields are set. 

The result values that can be used:

   return-ok: Return success, don't continue to the next userdb.
   return-fail: Return "user doesn't exist", don't continue to the next userdb.
   return: Return earlier userdb's success or failure, don't continue to the next userdb. If this was the first userdb, return "user doesn't exist".
   continue-ok: Set the current user existence state to "found", and continue to the next userdb.
   continue-fail: Set the current user existence state to "not found", and continue to the next userdb.
   continue: Continue to the next userdb without changing the user existence state. The initial state is "not found". 





Director


DirectorとはIMAP、POP3、LMTPの各プロキシサーバで使用する機能で、IMAP、POP3等のMRAサーバが複数ある時、特定のユーザをいずれかのサーバに割り当てて接続転送ことができる。

director_consistent_hashing






director_doveadm_port






director_flush_socket






director_mail_servers






director_servers






director_user_expire






director_user_kick_delay






director_username_hash









doveadmサーバ


DoveadmサーバとはDovecotによるMRAサーバとDirectorサーバの両方を起動させるモードのことである。


doveadm_allowed_commands






doveadm_api_key






doveadm_http_rawlog_dir






doveadm_password






doveadm_port






doveadm_socket_path


doveadm serverのパス。UNIXソケットかホスト名(IPアドレス)を指定できる。





doveadm_username






doveadm_worker_count


doveadmサーバの1プロセス内でいくつの接続を扱うか(ワーカースレッド数)を指定する。
0を指定した場合、1プロセスで1アクセスを扱う。







dsync


dsync_alt_char






dsync_commit_msgs_interval






dsync_features






dsync_hashed_headers






dsync_remote_cmd








HAProxy


haproxy_timeout






haproxy_trusted_networks








IMAP


imap_capability






imap_client_workarounds






imap_fetch_failure






imap_hibernate_timeout






imap_id_log






imap_id_retain






imap_id_send






imap_idle_notify_interval






imap_logout_format






imap_max_line_length






imap_metadata






imap_urlauth_host






imap_urlauth_logout_format






imap_urlauth_port






imapc_cmd_timeout






imapc_connection_retry_count






imapc_connection_retry_interval






imapc_features






imapc_host






imapc_list_prefix






imapc_master_user






imapc_max_idle_time






imapc_max_line_length






imapc_password






imapc_port






imapc_rawlog_dir






imapc_sasl_mechanisms






imapc_ssl






imapc_ssl_verify






imapc_user









LDA(Local Delivery Agent)


lda_mailbox_autocreate






lda_mailbox_autosubscribe






lda_original_recipient_header








LMTP


lmtp_address_translate






lmtp_hdr_delivery_address






lmtp_proxy






lmtp_rcpt_check_quota






lmtp_save_to_detail_mailbox






lmtp_user_concurrency_limit









ログイン時動作


login_access_sockets


ログイン時にアクセスのチェックを行う転送先ソケットを指定する。
標準のソースコードではtcpwrapperが使用可能であるが、with-libwrapオプションを有効にしてインストールしないと使用できない。
login_access_sockets =





login_greeting


ログイン時に表示するグリーティングメッセージ





login_log_format






login_log_format_elements






login_plugin_dir






login_plugins






login_proxy_max_disconnect_delay






login_source_ips






login_trusted_networks


サーバに接続可能なクライアントのIPアドレスとポート番号を指定する。
空白で区切って複数列挙可能。




master_user_separator


masterユーザとしてログイン可能にしたい場合、通常のユーザ名とmasterユーザ名を結合して記載できる。
その際の分割点となる文字を指定する。
この場合、<username><separator><master username>の並びとなる。



ストレージ・ファイル



config_cache_size

設定ファイルをキャッシュする最大サイズ。



dict_db_config

Berkeley DBの設定ファイルのパス。
Berkeley DBはExpire plugin(古いメールを自動削除する)で使用される。



dotlock_use_excl


プログラム”dotlock”がディレクトリを作成するときに”O_EXCL”フラグを使用するかどうか。
使用しない場合は、ハードリンクファイルが作成される。
通常”O_EXCL”フラグを使用した方が動作が高速であるが、NFS上では動作しない。
dotlockとは他のメールソフトと共通で利用できる、ロック管理ソフトである。
メールをディスクに書き込む際に使用される。



lock_method


メール保存ストレージにおいて使用するロック方法。



mmap_disable


mmapの使用を無効にする。



mail_access_groups






mail_always_cache_fields






mail_attachment_dir






mail_attachment_fs






mail_attachment_hash






mail_attachment_min_size






mail_attribute_dict






mail_cache_fields






mail_cache_min_mail_count






mail_chroot






mail_debug






mail_fsync






mail_full_filesystem_access






mail_gid






mail_home


ユーザ毎の情報を保存するディレクトリのパスを指定する。
パラメータ”mail_location”と同じではいけない。




mail_location


メールファイルの保存場所を指定する。



mail_log_prefix






mail_max_keyword_length






mail_max_lock_timeout






mail_max_userip_connections






mail_never_cache_fields






mail_nfs_index






mail_nfs_storage






mail_plugin_dir






mail_plugins






mail_prefetch_count






mail_privileged_group






mail_save_crlf






mail_server_admin






mail_server_comment






mail_shared_explicit_inbox






mail_sort_max_read_count






mail_temp_dir






mail_temp_scan_interval






mail_uid






mail_vsize_bg_after_count






mailbox_idle_check_interval






mailbox_list_index






mailbox_list_index_include_inbox






mailbox_list_index_very_dirty_syncs






maildir_broken_filename_sizes






maildir_copy_with_hardlinks






maildir_empty_new






maildir_stat_dirs






maildir_very_dirty_syncs






mbox_dirty_syncs






mbox_dotlock_change_timeout






mbox_lazy_writes






mbox_lock_timeout






mbox_md5






mbox_min_index_size






mbox_read_locks






mbox_very_dirty_syncs






mbox_write_locks






mdbox_preallocate_space






mdbox_purge_preserve_alt






mdbox_rotate_interval






mdbox_rotate_size








POP3


pop3_client_workarounds






pop3_delete_type






pop3_deleted_flag






pop3_enable_last






pop3_fast_size_lookups






pop3_lock_session






pop3_logout_format






pop3_no_flag_updates






pop3_reuse_xuidl






pop3_save_uidl






pop3_uidl_duplicates






pop3_uidl_format






pop3c_features






pop3c_host






pop3c_master_user






pop3c_password






pop3c_port






pop3c_quick_received_date






pop3c_rawlog_dir






pop3c_ssl






pop3c_ssl_verify






pop3c_user









レプリケーション


replication_dsync_parameters






replication_full_sync_interval






replication_max_conns






replicator_host






replicator_port








serviceセクション


serviceとはDovecot内の実効モジュールで、libexec/dovecot/ディレクトリにそれぞれ1つの実行ファイルとして存在している。



デフォルトサービス



chroot





client_limit





drop_priv_before_exec





executable


このサービスの実行ファイルのパスを指定する。
相対パスの場合、Dovecotインストールパスのlibexec/dovecot/を基点とする。


extra_groups





group





idle_kill


動作していないプロセスを強制終了するまでの時間。


privileged_group





process_limit





process_min_avail


利用可能なプロセスの最低数。
この数に満たない場合、新しいプロセスが生成され、その際動作していないプロセスがあれば強制終了される。


protocol





service_count





type





unix_listener dict-asyncセクション



group




mode




user





user





vsz_limit







デフォルトパラメータ



default_internal_user

パラメータ”type”の値が”login”以外の場合のパラメータ”user”のデフォルト値。



default_login_user

パラメータ”type”の値が”login”の場合のパラメータ”user”のデフォルト値。



default_client_limit





default_idle_kill

動作していないプロセスを強制終了するまでのデフォルト時間。
各サービスセクションのパラメータ”idle_kill”の値で上書き可能。
各サービスセクションのパラメータ”process_min_avail”の値で規定したプロセス数に満たない場合、このパラメータで設定した時間に関係なく強制終了される。



default_process_limit





default_vsz_limit








各デフォルト値



service aggregatorセクション

service aggregator {
  chroot = .
  client_limit = 0
  drop_priv_before_exec = no
  executable = aggregator
  extra_groups =
  fifo_listener replication-notify-fifo {
    group =
    mode = 0600
    user =
  }
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener replication-notify {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}

service anvilセクション

service anvil {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = anvil
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 1
  protocol =
  service_count = 0
  type = anvil
  unix_listener anvil-auth-penalty {
    group =
    mode = 0600
    user =
  }
  unix_listener anvil {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}

service auth-workerセクション

service auth-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = auth -w
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 1
  type =
  unix_listener auth-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}

service authセクション

service auth {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = auth
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener auth-client {
    group =
    mode = 0600
    user = $default_internal_user
  }
  unix_listener auth-login {
    group =
    mode = 0600
    user = $default_internal_user
  }
  unix_listener auth-master {
    group =
    mode = 0600
    user =
  }
  unix_listener auth-userdb {
    group =
    mode = 0666
    user = $default_internal_user
  }
  unix_listener login/login {
    group =
    mode = 0666
    user =
  }
  unix_listener token-login/tokenlogin {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}

service configセクション

service config {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = config
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type = config
  unix_listener config {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service dict-asyncセクション

service dict-async {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = dict
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dict-async {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service dictセクション

service dict {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = dict
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dict {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service directorセクション

service director {
  chroot = .
  client_limit = 0
  drop_priv_before_exec = no
  executable = director
  extra_groups =
  fifo_listener login/proxy-notify {
    group =
    mode = 00
    user =
  }
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener director-admin {
    group =
    mode = 0600
    user =
  }
  unix_listener login/director {
    group =
    mode = 00
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service dns_clientセクション

service dns_client {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = dns-client
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener dns-client {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service doveadmセクション

service doveadm {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = doveadm-server
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 1
  type =
  unix_listener doveadm-server {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service imap-hibernateセクション

service imap-hibernate {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-hibernate
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 0
  type =
  unix_listener imap-hibernate {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service imap-loginセクション

service imap-login {
  chroot = login
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-login
  extra_groups =
  group =
  idle_kill = 0
  inet_listener imap {
    address =
    haproxy = no
    port = 143
    reuse_port = no
    ssl = no
  }
  inet_listener imaps {
    address =
    haproxy = no
    port = 993
    reuse_port = no
    ssl = yes
  }
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type = login
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}


service imap-urlauth-loginセクション

service imap-urlauth-login {
  chroot = token-login
  client_limit = 0
  drop_priv_before_exec = no
  executable = imap-urlauth-login
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type = login
  unix_listener imap-urlauth {
    group =
    mode = 0666
    user =
  }
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}


service imap-urlauth-workerセクション

service imap-urlauth-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap-urlauth-worker
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener imap-urlauth-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service imap-urlauthセクション

service imap-urlauth {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap-urlauth
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener token-login/imap-urlauth {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service imapセクション

service imap {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = imap
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = imap
  service_count = 1
  type =
  unix_listener imap-master {
    group =
    mode = 0600
    user =
  }
  unix_listener login/imap {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service indexer-workerセクション

service indexer-worker {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = indexer-worker
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 10
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener indexer-worker {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service indexerセクション

service indexer {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = indexer
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener indexer {
    group =
    mode = 0666
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service ipcセクション

service ipc {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = ipc
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener ipc {
    group =
    mode = 0600
    user =
  }
  unix_listener login/ipc-proxy {
    group =
    mode = 0600
    user = $default_login_user
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}


service lmtpセクション

service lmtp {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = lmtp
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = lmtp
  service_count = 0
  type =
  unix_listener lmtp {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service logセクション

service log {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = log
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type = log
  unix_listener log-errors {
    group =
    mode = 0600
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service pop3-loginセクション

service pop3-login {
  chroot = login
  client_limit = 0
  drop_priv_before_exec = no
  executable = pop3-login
  extra_groups =
  group =
  idle_kill = 0
  inet_listener pop3 {
    address =
    haproxy = no
    port = 110
    reuse_port = no
    ssl = no
  }
  inet_listener pop3s {
    address =
    haproxy = no
    port = 995
    reuse_port = no
    ssl = yes
  }
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol = pop3
  service_count = 1
  type = login
  user = $default_login_user
  vsz_limit = 18446744073709551615 B
}


service pop3セクション

service pop3 {
  chroot =
  client_limit = 1
  drop_priv_before_exec = no
  executable = pop3
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 1024
  process_min_avail = 0
  protocol = pop3
  service_count = 1
  type =
  unix_listener login/pop3 {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service replicatorセクション

service replicator {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = replicator
  extra_groups =
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener replicator-doveadm {
    group =
    mode = 00
    user = $default_internal_user
  }
  unix_listener replicator {
    group =
    mode = 0600
    user = $default_internal_user
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service ssl-paramsセクション

service ssl-params {
  chroot =
  client_limit = 0
  drop_priv_before_exec = no
  executable = ssl-params
  extra_groups =
  group =
  idle_kill = 0
  privileged_group =
  process_limit = 0
  process_min_avail = 0
  protocol =
  service_count = 0
  type = startup
  unix_listener login/ssl-params {
    group =
    mode = 0666
    user =
  }
  unix_listener ssl-params {
    group =
    mode = 0666
    user =
  }
  user =
  vsz_limit = 18446744073709551615 B
}


service statsセクション

service stats {
  chroot = empty
  client_limit = 0
  drop_priv_before_exec = no
  executable = stats
  extra_groups =
  fifo_listener stats-mail {
    group =
    mode = 0600
    user =
  }
  fifo_listener stats-user {
    group =
    mode = 0600
    user =
  }
  group =
  idle_kill = 4294967295 secs
  privileged_group =
  process_limit = 1
  process_min_avail = 0
  protocol =
  service_count = 0
  type =
  unix_listener stats {
    group =
    mode = 0600
    user =
  }
  user = $default_internal_user
  vsz_limit = 18446744073709551615 B
}







SSL


ssl






ファイル


ssl_key

鍵ファイルのパス。
値の前に”<“が必要なので注意。



ssl_key_password

SSL鍵ファイルにパスワードがかかっている場合、そのパスワードを指定する。



ssl_ca





ssl_cert

証明書ファイルのパス。
値の前に”<“が必要なので注意。



ssl_alt_cert

SSL証明書を複数使用する場合の代替証明書



ssl_alt_key





クライアント認証


ssl_client_ca_dir





ssl_client_ca_file





ssl_client_cert





ssl_client_key





その他


ssl_cert_username_field





ssl_cipher_list





ssl_crypto_device





ssl_dh_parameters_length





ssl_options





ssl_parameters_regenerate





ssl_prefer_server_ciphers





ssl_protocols

使用できるプロトコルを指定する。
もしくは使用できないプロトコルを指定する。



ssl_require_crl





ssl_verify_client_cert





verbose_ssl

ログにSSL関係の情報を詳細出力するかどうか。








統計情報



state_dir






stats_carbon_interval






stats_carbon_name






stats_carbon_server






stats_command_min_time






stats_domain_min_time






stats_ip_min_time






stats_memory_limit






stats_session_min_time






stats_user_min_time






MDA(LDA : Local Delivery Agent)





postmaster_address


メール管理者のアドレス。



quota_full_tempfail


quota設定によるストレージ使用量上限を超えた場合、バウンスメールを返すのではなく、一時的に失敗しているという通知を返す。



recipient_delimiter


拡張メールアドレスの区切り文字



rejection_reason


メールを受信拒否する際に返すエラーメッセージの内容。



rejection_subject


メールを受信拒否する際に返すエラーメールの題名。



sendmail_path


sendmailのパス




submission_host


メール送信の際、通常はsendmailコマンドにより通常のメール配送を行うが、この設定を行った場合指定したホストを経由してメール送信することができる。



dictセクション


プラグインで使用するためのパラメータをKey-Value形式で指定する。


ツール


doveadm



dsync


doveadmの別名

doveconf


オプション


全て表示


明示的に設定されている値とそうでないものはそのデフォルト値を表示する。
オプションを指定しない場合のデフォルトの動作でもある。
doveconf -a
or
doveconf

デフォルト値の表示


全設定値のデフォルト値を表示する。
doveconf -d

変更した値の表示


デフォルト値から変更されている値を表示する。
doveconf -n

設定した値の表示


デフォルト値から変更されているかどうかに関わらず、明示的に設定した値を表示する。
doveconf -N

セクションを展開して表示


セクションを展開して表示する。
doveconf -S { -a | -d | -n | 等 }

特定のモジュールの値のみ表示


指定したモジュールに関連する値のみ表示
doveconf -m <モジュール名>


dovecot


sbinディレクトリに配置され、普段は使用しない。
systemdからサービスとして呼び出される。

トラブルシューティング


認証関連


passwd-file


User is missing UID


passdbにpasswd-fileを指定したが、ログインできない。





Tips


バーチャルメール


バーチャルメールボックス


Postfixのバーチャルメールボックスを使用している場合を想定する。

パスワードデータベースの作成


バーチャルメールボックスのユーザ情報は存在しないので、作成する必要がある。
vi $DOVECOT_HOME/conf/dovecot/userdb
パスワードデータベースではユーザ名とパスワード情報のみ使用される。
その為、ユーザID、グループIDは不要だが、まとめて記載しておけば、ユーザデータベースと共用できる。
ユーザID、グループIDはメールスプールのメールファイルにアクセスする際に使用されるものである。全ユーザで共通で良い。
ここではmdaを使用する。uidとgidを確認する。
id mda
書式は以下。パスワードは平文で記載する場合である。
<ユーザ名>:{plain}<パスワード>:<ユーザID>:<グループID>::

ユーザデータベースの作成


バーチャルメールボックスのユーザ情報は存在しないので、作成する必要がある。
vi $DOVECOT_HOME/conf/dovecot/userdb
ユーザデータベースではユーザ名とユーザID・グループID情報のみ使用される。
ユーザID、グループIDはメールスプールのメールファイルにアクセスする際に使用されるものである。全ユーザで共通で良い。
ここではmdaを使用する。uidとgidを確認する。
id mda
書式は以下。パスワードは平文で記載する場合である。
<ユーザ名>:{plain}<パスワード>:<ユーザID>:<グループID>::

設定追加


以下はパスワードデータベースとユーザデータベースを共用にし、パスワードを平文で記載した場合である。
cat >> $DOVECOT_HOME/conf/dovecot/dovecot.conf << EOT
passdb {
	driver = passwd-file
	args = /usr/local/dovecot/conf/dovecot/userdb
	mechanisms = PLAIN
}
userdb {
	driver = passwd-file
	args = /usr/local/dovecot/conf/dovecot/userdb
}
EOT
設定完了後、設定を再読み込みする。
doveadm reload

認証確認


telnet localhost 143
OR
openssl s_client -connect localhost:993
# プロンプト表示後
a login <ユーザ名> <パスワード>
b list "" "*"
c select INBOX
d fetch 1 RFC822
e logout

SASL


Postfixにユーザ認証機能を提供する。

Dovecotの設定追加


UNIXソケットを作成し、それをPostfixが利用する。
TCP/IPを用いて別のサーバに提供することも可能。
UNIXソケットはPostfixのキューディレクトリ(queue_directory)配下に原則作成する。
基本的には次のパスに作成する。
$queue_directory/private/auth

service auth {
	unix_listener /usr/local/postfix/queue/private/auth {
		mode = 0666
		user = postfix
		group = postfix
	}
}

設定完了後、設定を再読み込みする。
doveadm reload

Postfixの設定追加


DovecotによるSASLに対応しているか確認する。
postconf -a
dovecotと表示されなかった場合はインストールしなおす必要がある。
次を”make makefiles”の実行前に実行しておくと、既存の環境に追加インストールできる。
make tidy
“make makefiles”の実行時には次のオプションを付与する。
CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
設定ファイルに以下を追加する。
cat >> $POSTFIX_HOME/conf/main.cf << EOT
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
EOT

設定完了後、設定を再読み込みする。

TLS



認証確認


平文でログインする場合でもBase64エンコードを行う必要がある。
まずユーザ名とパスワードをBase64エンコードする。
ユーザ名は二度記載する。
printf "%s\0%s\0%s" <ユーザ名> <ユーザ名> <パスワード> | openssl base64 -e | sed "s/\\n//g"
これを用いてtelnetでログインする。
telnet localhost 25
AUTH PLAIN <Base64ログイン情報>
MAIL FROM:<from address>
RCPT TO:<to address>
DATA
test mail
.
quit

Notice: Trying to get property 'queue' of non-object in /usr/local/wordpress/wp-includes/script-loader.php on line 2876

Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/script-loader.php on line 2876