ServersMan@VPS Postfix/Dovecotのインストール

スポンサーリンク

Dovecotの設定変更

1. dovecot.confのバックアップを取ります。

[root@mail ~]# cp -p /etc/dovecot.conf  /etc/dovecot.conf.ORG

2. dovecot.confを編集します。変更点は2点です。

[root@mail ~]# vi /etc/dovecot.conf
~省略~
##
## Login processes
##

# <doc/wiki/LoginProcess.txt>

# Directory where authentication process places authentication UNIX sockets
# which login needs to be able to connect to. The sockets are created when
# running as root, so you don't have to worry about permissions. Note that
# everything in this directory is deleted when Dovecot is started.
#login_dir = /var/run/dovecot/login

# chroot login process to the login_dir. Only reason not to do this is if you
# wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
#login_chroot = yes

# User to use for the login process. Create a completely new user for this,
# and don't use it anywhere else. The user must also belong to a group where
# only it has access, it's used to control access for authentication process.
# Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
#login_user = dovecot

# Set max. process size in megabytes. If you don't use
# login_process_per_connection you might need to grow this.
#login_process_size = 64

# Should each login be processed in it's own process (yes), or should one
# login process be allowed to process multiple connections (no)? Yes is more
# secure, espcially with SSL/TLS enabled. No is faster since there's no need
# to create processes all the time.
#login_process_per_connection = yes
login_process_per_connection = no ←追加

# Number of login processes to keep for listening new connections.
#login_processes_count = 3

# Maximum number of login processes to create. The listening process count
# usually stays at login_processes_count, but when multiple users start logging
# in at the same time more extra processes are created. To prevent fork-bombing
# we check only once in a second if new processes should be created - if all
# of them are used at the time, we double their amount until the limit set by
# this setting is reached.
#login_max_processes_count = 128

# Maximum number of connections allowed per each login process. This setting
# is used only if login_process_per_connection=no. Once the limit is reached,
# the process notifies master so that it can create a new login process.
# You should make sure that the process has at least
# 16 + login_max_connections * 2 available file descriptors.
#login_max_connections = 256

# Greeting message for clients.
#login_greeting = Dovecot ready.

# Space-separated 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.
#login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c

# Login log format. %$ contains login_log_format_elements string, %s contains
# the data we want to log.
#login_log_format = %$: %s

##
## Mailbox locations and namespaces
##

# Location for users' mailboxes. This is the same as the old default_mail_env
# setting. The default is empty, which means that Dovecot tries to find the
# mailboxes automatically. This won't work if the user doesn't have any mail
# yet, so you should explicitly tell Dovecot the full location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /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 mail_location setting.
#
# There are a few special variables you can use, eg.:
#
#   %u - username
#   %n - user part in user@domain, same as %u if there's no domain
#   %d - domain part in user@domain, empty if there's no domain
#   %h - home directory
#
# See doc/wiki/Variables.txt for full list. Some examples:
#
#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
# <doc/wiki/MailLocation.txt>
#
#mail_location =
mail_location = maildir:~/Maildir ←追加

# If you need to set multiple mailbox locations or want to change default
# namespace settings, you can do it by defining namespace sections.
# NOTE: Namespaces currently work ONLY with IMAP! POP3 and LDA currently ignore
# namespaces completely, they use only the mail_location setting.
~省略~

3. 「diff」コマンドを用いてバックアップとの差分を確認します。

[root@mail ~]# diff -c /etc/dovecot.conf /etc/dovecot.conf.ORG
*** /etc/dovecot.conf   2011-05-13 13:44:11.000000000 +0900
--- /etc/dovecot.conf.ORG       2009-01-21 17:22:57.000000000 +0900
***************
*** 148,154 ****
# secure, espcially with SSL/TLS enabled. No is faster since there's no need
# to create processes all the time.
#login_process_per_connection = yes
- login_process_per_connection = no
  この設定は、Dovecotへの認証アタックによる認証プロセス数の増加+サービス不安定
  をもたらす可能性がある認証プロセス数を、固定とする設定
# Number of login processes to keep for listening new connections.
#login_processes_count = 3
--- 148,153 ----
***************
*** 210,216 ****
# <doc/wiki/MailLocation.txt>
#
#mail_location =
- mail_location = maildir:~/Maildir
 メールは「~/Maildir」に保存されていますよという宣言。「~」はユーザのホームディレクトリ
# If you need to set multiple mailbox locations or want to change default
# namespace settings, you can do it by defining namespace sections.
--- 209,214 ----
[root@mail ~]#

以上でDovecotの設定は完了です。

次のページ「Dovecotの起動・起動設定」

コメント

タイトルとURLをコピーしました