发新话题
打印

centos4+extmail+extman+FCGI+postfix+ldap+courier-imap+maildrop+SA+amavis+SASL+TLS+clamav

please check your email at test@xxx.cn
文章 - Ethan
Redhat Certifed Technician , Paypal Certified Developer

TOP

/etc/sysconfig/saslauthd

# Mechanism to use when checking passwords.  Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled to use.
MECH=ldap

# Additional flags to pass to saslauthd on the command line.  See saslauthd(8)
# for the list of accepted flags.
FLAGS=


vi /etc/authlib/authldaprc
LDAP_URI                  ldap://localhost
LDAP_PORT                389
LDAP_BASEDN             o=extmailAccount,dc=xxx,dc=cn
LDAP_BINDDN             mail=root@xxx.cn,o=extmailManager,dc=xxx,dc=cn
LDAP_BINDPW            extmail
LDAP_TIMEOUT            5
LDAP_AUTHBIND          1
LDAP_MAIL                mail
LDAP_DOMAIN            xxx.cn
LDAP_FILTER              (active=1)
LDAP_GLOB_UID          vmail
LDAP_GLOB_GID          vmail
LDAP_HOMEDIR            homeDirectory
LDAP_MAILROOT           /home/vmail/domains
LDAP_MAILDIRQUOTA      mailQuota
LDAP_FULLNAME           cn
LDAP_CRYPTPW            userPassword
LDAP_DEREF               never
LDAP_TLS                  0

在没有安装到SASL 前曾改root@xxx.cn 的passwd ,但安装SASL 时,将root@密码修改为初试的extmail,另增加了一个adminstartor @用户,备用。

在安装sasl 时 没有出现异常(未用outloook测试),安装TLS 时,在对话过程中,输入参照/usr/share/sslopensslcnf 内容;未开始SPAM+CLAMAV  ;测试outlook 出现以上,

TOP

slapd -d 256
@(#) $OpenLDAP: slapd 2.2.13 (Oct 18 2005 10:08:34) $
      buildcentos@x8664-build:/home/buildcentos/rpmbuild/BUILD/openldap-2.2.13/openldap-2.2.13/build-servers/servers/slapd
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
bdb_db_init: Initializing BDB database
slapd starting
conn=0 fd=10 ACCEPT from IP=127.0.0.1:32830 (IP=0.0.0.0:389)
conn=0 op=0 SRCH base="o=extmailAlias,dc=xxx,dc=cn" scope=2 deref=0 filter="(&(&(objectClass=extmailAlias)(mailLocalAddress=xxx.cn))(active=1))"
conn=0 op=0 SRCH attr=mail
conn=0 op=0 SEARCH RESULT tag=101 err=0 nentries=0 text=
conn=0 op=1 SRCH base="o=extmailAccount,dc=xxx,dc=cn" scope=2 deref=0 filter="(&(objectClass=extmailDomain)(virtualDomain=xxx,cn))"
conn=0 op=1 SRCH attr=virtualDomain
<= bdb_equality_candidates: (virtualDomain) index_param failed (18)
conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
conn=0 op=2 SRCH base="o=extmailAlias,dc=xxx,dc=cn" scope=2 deref=0 filter="(&(&(objectClass=extmailAlias)(mailLocalAddress=163.com))(active=1))"
conn=0 op=2 SRCH attr=mail
conn=0 op=2 SEARCH RESULT tag=101 err=0 nentries=0 text=
conn=0 op=3 SRCH base="o=extmailAccount,dc=xxx,dc=cn" scope=2 deref=0 filter="(&(objectClass=extmailDomain)(virtualDomain=163.com))"
conn=0 op=3 SRCH attr=virtualDomain
<= bdb_equality_candidates: (virtualDomain) index_param failed (18)
conn=0 op=3 SEARCH RESULT tag=101 err=0 nentries=0 text=
关闭 ldap 后salpd内容。

TOP

对不起,之前email 你的有不对的地方,可以放上/etc/saslauthd.conf 吗? 将root@密码修改为初试的extmail 后,也要修改/etc/saslauthd.conf
文章 - Ethan
Redhat Certifed Technician , Paypal Certified Developer

TOP

[root@mail ~]# vi /etc/saslauthd.conf
ldap_servers:        ldap://127.0.0.1/
ldap_auth_method:     bind
ldap_bind_dn:        mail=root@xxx.cn,o=extmailManager,dc=xxx,dc=cn
ldap_bind_pw:        extmail
ldap_filter:        (|(&(mail=%U@%d)(active=1))(mail=%u@))
ldap_base:          dc=xxx,dc=cn
ldap_search_base:     o=extmailAccount,dc=xxx,dc=cn
楼主 请看!

TOP

看来全都对啊...你可以用thunderbird 试试吗?

假如还不可以,那 可以email 我你server 的 ip和username and password吗?让我上去看看
文章 - Ethan
Redhat Certifed Technician , Paypal Certified Developer

TOP

mozilla thunderbird 测试过 日志如下:
Jul 28 13:34:25 mail postfix/smtpd[3240]: setting up TLS connection from unknown[192.168.99.25]
Jul 28 13:34:25 mail postfix/smtpd[3240]: SSL_accept:before/accept initialization
Jul 28 13:34:25 mail postfix/smtpd[3240]: read from 09219F88 [09223678] (11 bytes => -1 (0xFFFFFFFF))
Jul 28 13:34:25 mail postfix/smtpd[3240]: SSL_accept:error in SSLv2/v3 read client hello A
Jul 28 13:39:25 mail postfix/smtpd[3240]: SSL_accept error from unknown[192.168.99.25]: -1
Jul 28 13:39:25 mail postfix/smtpd[3240]: disconnect from unknown[192.168.99.25]

同时用test@xxx.cn 帐户outlook 发往 t001@xxx.cnexping@163.com,日志如下:

Jul 28 13:44:25 mail postfix/smtpd[3242]: starting TLS engine
Jul 28 13:44:25 mail postfix/smtpd[3242]: connect from unknown[192.168.99.25]
Jul 28 13:44:30 mail postfix/smtpd[3242]: NOQUEUE: reject: RCPT from unknown[192.168.99.25]: 554 <exping@163.com>: Relay access denied; from=<test@xxx.cn> to=<exping@163.com> proto=ESMTP helo=<sr4212>
Jul 28 13:44:30 mail postfix/smtpd[3242]: 58CF1125234: client=unknown[192.168.99.25]
Jul 28 13:44:35 mail postfix/cleanup[3244]: 58CF1125234: message-id=<001b01c59337$428c4320$1963a8c0@sr4212>
Jul 28 13:44:35 mail postfix/qmgr[2545]: 58CF1125234: from=<test@xxx.cn>, size=1339, nrcpt=1 (queue active)
Jul 28 13:44:35 mail postfix/smtpd[3242]: disconnect from unknown[192.168.99.25]
Jul 28 13:44:35 mail authdaemond: received userid lookup request: t001@xxx.cn
Jul 28 13:44:35 mail authdaemond: authldap: trying this module
Jul 28 13:44:35 mail authdaemond: binding to LDAP server as DN &#39;mail=root@xxx.cn,o=extmailManager,dc=xxx,dc=cn&#39;, password &#39;extmail&#39;
Jul 28 13:44:35 mail authdaemond: using search filter: (&(active=1)(mail=t001@xxx.cn))
Jul 28 13:44:35 mail authdaemond: one entry returned, DN: mail=t001@xxx.cn,virtualDomain=xxx.cn,o=extmailAccount,dc=xxx,dc=cn
Jul 28 13:44:35 mail authdaemond: raw ldap entry returned:
Jul 28 13:44:35 mail authdaemond: | mail: t001@xxx.cn
Jul 28 13:44:35 mail authdaemond: | homeDirectory: xxx.cn/t001
Jul 28 13:44:35 mail authdaemond: | cn: test
Jul 28 13:44:35 mail authdaemond: | mailQuota: 20971520S
Jul 28 13:44:35 mail authdaemond: | userPassword: {CRYPT}J7dEwvb1JyFqE
Jul 28 13:44:35 mail authdaemond: authldaplib: sysusername=<null>, sysuserid=500, sysgroupid=500, homedir=/home/vmail/domains/xxx.cn/t001, address=t001@xxx.cn, fullname=test, maildir=<null>, quota=20971520S, options=<null>
Jul 28 13:44:35 mail authdaemond: authldaplib: clearpasswd=<null>, passwd={CRYPT}J7dEwvb1JyFqE
Jul 28 13:44:35 mail authdaemond: Authenticated: sysusername=<null>, sysuserid=500, sysgroupid=500, homedir=/home/vmail/domains/xxx.cn/t001, address=t001@xxx.cn, fullname=test, maildir=<null>, quota=20971520S, options=<null>
Jul 28 13:44:35 mail authdaemond: Authenticated: clearpasswd=<null>, passwd={CRYPT}J7dEwvb1JyFqE
Jul 28 13:44:35 mail postfix/pipe[3245]: 58CF1125234: to=<t001@xxx.cn>, relay=maildrop, delay=5, status=sent (xxx.cn)
Jul 28 13:44:35 mail postfix/qmgr[2545]: 58CF1125234: removed

web 方式可看到t001@已经收到该邮件,outlook , 同thunderbird 样无法接收此邮件

TOP

我比较了其他邮件服务器:
telnet localhost 25 时
ehlo xxx.cn
我这里缺少以下项 :

250-AUTH=LOGIN PLAIN
250-AUTH LOGIN PLAIN

telnet localhost 110
list
+OK POP3 clients that break here, they violate STD53.
1 4194
2 2564
3 5337
4 2069
5 2069
6 2069
7 1933
8 1925
9 2042442
10 4194
11 2894
12 14319
13 603

top 1
-ERR Invalid command
是否正常?

TOP

check /usr/lib/sasl2/smtpd.conf file, if do not have mech_list: PLAIN LOGIN, then do this
引用:
echo "mech_list: PLAIN LOGIN" >> /usr/lib/sasl2/smtpd.conf
then restart saslauthd
文章 - Ethan
Redhat Certifed Technician , Paypal Certified Developer

TOP

It&#39;s great, Ethan reply our question very well.

TOP

支持
以前是基于qmail+igenus+igenus admin的邮件系统,请问转移到postfix困难么?

TOP

Why many people want mysql?
What&#39;s different between mysql and ldap in profix?
Thx so much!

TOP

yum -y install spamassassin clamd clamav  perl-CPANPLUS时
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: perl-CPANPLUS
Nothing to do


[SHELL] > cp -ir /root/.spamassassin /var/amavis
root 目录下没有.spamassassin ;
service spamassassin status
spamd (pid 320 319 316) is running...
如何继续??

TOP

引用:
No Match for argument: perl-CPANPLUS
No need this package already.
引用:
root 目录下没有.spamassassin ;
run this command first
引用:
spamassassin --lint –D
文章 - Ethan
Redhat Certifed Technician , Paypal Certified Developer

TOP

发新话题