Chinaunix首页 | 论坛 | 博客
  • 博客访问: 579751
  • 博文数量: 142
  • 博客积分: 10016
  • 博客等级: 上将
  • 技术积分: 1835
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-10 14:30
个人简介

工作中~

文章分类

全部博文(142)

文章存档

2009年(25)

2008年(117)

我的朋友

分类:

2008-12-12 19:50:10

修改认证及MDA (均为dovecot

(原系统为debian etch 4.0r3  extmail + postfix + maildrop)

拟机安装



如需转载,请注明原文地址
作者:lxq007

原系统为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'



修改postfix配置文件

main.cf

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


master.cf

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



 

修改extmailextman中配置文件

 

SYS_CRYPT_TYPE = plain-md5

 

 

更改saslauthd

# nano /etc/default/saslauthd

更改如下几项

START=no   //设置开机不启动

/etc/init.d/saslauthd stop








阅读(1862) | 评论(0) | 转发(0) |
0

上一篇:MySQL 参数说明及查看

下一篇:Diffie-Hellman

给主人留下些什么吧!~~