工作中~
分类:
2008-12-12 19:50:10
修改认证及MDA (均为dovecot)
(原系统为debian etch 4.0r3 extmail + postfix + maildrop)
虚拟机安装
原系统为extmail+maildrop+postfix,具体请看:
http://blog.chinaunix.net/u2/73230/showart_1412112.html
安装dovecot
# apt-get install dovecot-pop3d
# apt-get install dovecot-imapd
修改dovecot配置文件
# vi /etc/dovecot/dovecot.conf
protocols = imap imaps pop3 pop3s listen = * disable_plaintext_auth = no ssl_disable = yes mail_location = maildir:/home/vmail/%d/%n/Maildir protocol lda { log_path = /home/vmail/dovecot-deliver.log auth_socket_path = /var/run/dovecot/auth-master postmaster_address = postmaster@example.com mail_plugins = cmusieve } auth default { # Space separated list of wanted authentication mechanisms: # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi mechanisms = plain login digest-md5 cram-md5 : } passdb sql { # Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example args = /etc/dovecot/dovecot-sql.conf } userdb sql { # Path for SQL configuration file, see /etc/dovecot/dovecot-sql.conf for example args = /etc/dovecot/dovecot-sql.conf } socket listen { master { path = /var/run/dovecot/auth-master mode = 0600 # Default user/group is the one who started dovecot-auth (root) user = vmail #group = } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } |
# vi /etc/dovecot/dovecot-sql.conf
driver = mysql connect = host=127.0.0.1 dbname=extmail user=extmail password=extmail default_pass_scheme = PLAIN-MD5 password_query = SELECT username AS user, password AS password FROM mailbox WHERE username='%u' AND active= '1' user_query = SELECT maildir as home, 5566 AS uid,5566 AS gid FROM mailbox WHERE username = '%u' and active='1' |
virtual_transport = dovecot smtpd_sasl_type=dovecot smtpd_sasl_auth_enable = yes smtpd_sasl_path= private/auth broken_sasl_auth_clients = yes #smtpd_sasl_auth_enable = yes #smtpd_sasl_local_domain = $myhostname #smtpd_sasl_security_options = noanonymous content_filter = smtp-amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings |
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d $(recipient) smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20 |
修改extmail及extman中配置文件
SYS_CRYPT_TYPE = plain-md5
更改saslauthd
# nano /etc/default/saslauthd
更改如下几项
START=no //设置开机不启动
/etc/init.d/saslauthd stop