Dovecot のインストール

2005.08.29

受信メールサーバーとして、Dovecotを使用する。

  1. 確認
  2. [root@siva postfix]# rpm -qa dovecot
    dovecot-0.99.11-1.FC3.4
    

  3. 設定
  4. [root@siva postfix]# vi /etc/dovecot.conf
    
    # Protocols we want to be serving:
    #  imap imaps pop3 pop3s
    #protocols = imap imaps
    protocols = pop3 pop3s
    
    # Default MAIL environment to use when it's not set. By leaving this empty
    # dovecot tries to do some automatic detection as described in
    # doc/mail-storages.txt. There's a few special variables you can use:
    #
    #   %u - username
    #   %n - user part in user@domain, same as %u if there's no domain
    #   %d - domain part in user@domain, empty if user there's no domain
    #   %h - home directory
    #
    # You can also limit a width of string by giving the number of max. characters
    # after the '%' character. For example %1u gives the first character of
    # username. Some examples:
    #
    #   default_mail_env = maildir:/var/mail/%1u/%u/Maildir
    #   default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u
    #   default_mail_env = mbox:/var/mail/%d/%n/:INDEX=/var/indexes/%d/%n
    #
    #default_mail_env =
    default_mail_env = mbox:~/Mailbox
    
    # ':' separated list of directories under which chrooting is allowed for mail
    # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
    # This setting doesn't affect login_chroot or auth_chroot variables.
    # 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. See doc/configuration.txt for more information.
    #valid_chroot_dirs =
    valid_chroot_dirs = /home
    
    # Valid GID range for users, defaults to non-root/wheel. 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.
    #first_valid_gid = 1
    #last_valid_gid = 0
    fist_valid_gid = 1
    

  5. 起動
  6. [root@siva postfix]# /sbin/service dovecot start
    Dovecot Imap を起動中:                                     [  OK  ]
    

  7. 起動設定
  8. [root@siva postfix]# /sbin/chkconfig dovecot on
    

  9. エイリアスの設定
  10. [root@siva postfix]# pwd
    /etc/postfix
    [root@siva postfix]# vi aliases
    # Person who should get root's mail.  This alias
    # must exist.
    # CHANGE THIS LINE to an account of a HUMAN
    root:           piroto
    
    [root@siva postfix]# newaliases
    

  11. ログの出力先
  12. /var/log/maillog