воскресенье, 22 февраля 2009 г.

Mandriva Directory Server (MDS) + VMware Server 2 + Debian lenny Часть 8

Сейчас настроим дополднения к postfix - IMAP, POP3 сервер, а так же квоты. Для этого используем Devcot.

#echo "" > /etc/dovecot/dovecot.conf
#vim /etc/dovecot/dovecot.conf
protocols = imap imaps pop3 pop3s
listen = 0.0.0.0
login_greeting = lxf.su mailserver ready.
mail_location = maildir:~/Maildir
disable_plaintext_auth = no
ssl_cert_file = /etc/ssl/certs/mail.pem
ssl_key_file = /etc/ssl/private/mail.key
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
# IMAP configuration
protocol imap {
mail_plugins = quota imap_quota
}
# POP3 configuration
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}

# LDA configuration
protocol lda {
postmaster_address = postmaster
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = quota
}

# LDAP authentication

auth default {
mechanisms = plain login

passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}

userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}

socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = dovecot
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

#echo "" > /etc/dovecot/dovecot-ldap.conf
#vim /etc/dovecot/dovecot-ldap.conf
hosts = 127.0.0.1
auth_bind = yes
ldap_version = 3
base = dc=lxf,dc=su
scope = subtree
user_attrs = homeDirectory=home,uidNumber=uid,mailbox=mail,mailuserquota=quota=maildir:storage
user_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))
pass_attrs = mail=user,userPassword=password
pass_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))
default_pass_scheme = CRYPT
user_global_gid = mail


Задаем права для dovecot и рестартим его:
#dpkg-statoverride --update --add root dovecot 4755 /usr/lib/dovecot/deliver
#/etc/init.d/dovecot restart

1 комментарий:

  1. If you're using a single UID and GID for all the users, you can specify them globally instead of returning them from LDAP:
    * v1.0: user_global_uid and user_global_gid settings in dovecot-ldap.conf
    * v1.1+: mail_uid and mail_gid settings in dovecot.conf

    http://wiki.dovecot.org/AuthDatabase/LDAP/Userdb

    ОтветитьУдалить