ExtMail服务器社区's Archiver

jieer 发表于 2003-1-29 23:43

建议你把log也贴上。

laosechong 发表于 2003-2-19 02:54

bash-2.03# maildrop -V 10 -d ccc@bj.cn
maildrop: Invalid user specified.

日志中无任何信息

jieer 贴贴你的配置及编译参数!!!

jieer 发表于 2003-2-20 02:26

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:bash-2.03# maildrop -V 10 -d ccc@bj.cn
:maildrop: Invalid user specified.

:日志中无任何信息
[/quote]

不好意思,我用的是mysql,我还没有用过ldap呢,建议你看maildrop的代码
我当时配置mysql的时候也是存日志才成功的。

祝你成功。

hzqbbc 发表于 2003-2-20 03:42

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:我编译maildrop 1.5.0 支持LDAP;;;

:《〈〈但还是有问题!给一个你的配置〉〉》

[/quote]

可以这样作:

停止ldap server。然后在命令行下执行:
slapd -d 1

然后开另外一个控制台,执行如下:
echo "sdkfakfjas" │ /path/to/maildrop -V 10 -d xxx@xxx.com

然后看slapd的输出结果,如果有查询,那么证明你的maildrop支持了ldap并且配置的ldap
那部分可以连上ldap server,然后看查询内容。将查询内容帖出来吧。

laosechong 发表于 2003-2-20 21:28

bash-2.03# echo "abcabcabcabcabcabc" │ /usr/local/bin/maildrop -V 20 -d liu@bj.
cn
maildrop: Changing to /export/home/domain/bj.cn/liu
Message start at 0 bytes, envelope sender=liu@bj.cn
maildrop: Attempting .mailfilter
/usr/local/bin/maildrop: Cannot have world/group permissions on the filter file
--

laosechong 发表于 2003-2-20 21:45

HZQBBC 进来,MAILDROP,有进展了:)

我编译maildrop 1.5.0 支持LDAP;;;

《〈〈但还是有问题!给一个你的配置〉〉》

--enable-maildropldap
--with-ldapconfig=/etc/
--enable-maildrop-uid=vuser
--enable-maildrop-gid=vgroup

cp maildropldap.cfg ----> /etc/

maildropldap.cfg 配置如下:

# hostname - host name of your ldap server
hostname    218.*.*.*

# basedn - base DN by which to search for LDAP entries
basedn     dc=MailServer,dc=CN

# this option can be left out and the default search would
# just be &#39;mail=<email address>&#39;
filter     &(&(objectclass=MailAccount)(accountActive=TRUE))

# binddn, bindpw - optional, binddn and password if your ldap server
# requires you to authenticate before searching
#binddn     uid=binduser,dc=yourdomain,dc=com
#bindpw     yourbindpassword

# timeout - specifies maximum time ( in seconds ) to wait for a response
# from the LDAP server
timeout     5

# if set to &#39;uid&#39; then to deliver mail to a user you need only specify
# the users id (username)
#  ie.  maildrop -d joeuser
#
search_method      mail

# default_uid - default uid (number only) to use incase uidnumber attribute not
# found in users ldap entry
default_uidnumber    10000

# default_gid - default gid (number only) to use incase gidnumber attribute not
# found in users ldap entry
default_gidnumber    10000

# LDAP Field definitions
#
# This section allows you to specify the actual attributes you
# use in your LDAP object class

# The example attribute mapping shown below is also the default
# mapping used by maildrop in the case that any are missing

# MAIL_ATTR - LDAP attribute which contains the users complete email address
mail_attr        mail

# UID_ATTR - LDAP attribute which contains the users name (w/o domain)
uid_attr        uid

# UIDNUMBER_ATTR - LDAP attribute which contains the system uid to deliver
# mail as
uidnumber_attr     10000

# GIDNUMBER_ATTR - LDAP attribute which contains the system gid to deliver
# mail as
gidnumber_attr     10000

# MAILDIR_ATTR - LDAP attribute which contains the path to the users
# custom maildir
maildir_attr      maildir

# HOMEDIRECTORY_ATTR - LDAP attribute which contains the path to the users
# home directory
homedirectory_attr   homedirectory

# QUOTA_ATTR - LDAP attribute which contains the users quota
quota_attr       quota






laosechong 发表于 2003-2-20 22:18

/export/home/domain/bj.cn/liu/Maildir/.mailfilter

是个空文件

bash-2.03# ls -la .mailfilter
-rwxr-xr-x  1 vuser  vgroup     0 2月 20 09:20 .mailfilter
bash-2.03# echo "china is china , zhongguo is zhongguo" │ /usr/local/bin/maildr
op -V 20 -d liu@bj.cn
maildrop: Changing to /export/home/domain/bj.cn/liu
Message start at 0 bytes, envelope sender=liu@bj.cn
maildrop: Attempting .mailfilter
maildrop: Delivery complete.

bash-2.03# more new/*
::::::::::::::
new/1045704511.14925_0.mail-sun,S=38
::::::::::::::
china is china , zhongguo is zhongguo

[b][font=黑体][color=red] 但在sqwebmail中无法登陆 , 给点建议 [/b][/font][/color]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

具体设置如下:

# liu@bj.cn, bj.cn, Postfix, MailServer, CN
dn: mail=liu@bj.cn,vd=bj.cn,o=Postfix,dc=MailServer,dc=CN
objectClass: top
objectClass: MailAccount
accountActive: TRUE
mail: liu@bj.cn
clearPassword: liu
mailbox: /export/home/domain/bj.cn/liu/Maildir/
homeDirectory: /export/home/domain/bj.cn/liu
userPassword:: e0NSWVBUfXlTeFVHRGJFdURtMS4=


main.cf 中我认为有关的项
home_mailbox = Maildir/
mailbox_transport = maildrop
virtual_mailbox_base = /export/home/domain
virtual_mailbox_maps = ldap:accounts

hzqbbc 发表于 2003-2-21 00:10

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:bash-2.03# echo "abcabcabcabcabcabc" │ /usr/local/bin/maildrop -V 20 -d liu@bj.
:cn
:maildrop: Changing to /export/home/domain/bj.cn/liu
:Message start at 0 bytes, envelope sender=liu@bj.cn
[/quote]

你这个文件必须是700属性,,你肯定是755 or 644属性。。一定是这个问题。maildrop代码里有属性判断的。你注意一下。

hzqbbc 发表于 2003-2-21 00:12

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:/export/home/domain/bj.cn/liu/Maildir/.mailfilter

:是个空文件

[/quote]

很明显嘛。。属性不对。必须是600 或700 也就是 rwx------ or rx-------什么的。

laosechong 发表于 2003-2-21 00:48

我的问题是在SQWEBMAIL中无法登陆进邮件系统,暂时还与 maildrop 过滤无关;

我感觉问题在这里
mailbox: /export/home/domain/bj.cn/liu/Maildir/
homeDirectory: /export/home/domain/bj.cn/liu

原来是如下设置时能够正常登陆,
mailbox: bj.cn/liu/Maildir/
homeDirectory: bj.cn/liu

以上两种情况,POSTFIX的配置都如下:
main.cf 中我认为有关的项
home_mailbox = Maildir/
mailbox_transport = maildrop
virtual_mailbox_base = /export/home/domain
virtual_mailbox_maps = ldap:accounts

是不是跟这些目录设置有关系??? 如果有,指点一二 :)

在此先谢过了:)))))





hzqbbc 发表于 2003-2-21 00:52

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:我的问题是在SQWEBMAIL中无法登陆进邮件系统,暂时还与 maildrop 过滤无关;

:我感觉问题在这里
:mailbox: /export/home/domain/bj.cn/liu/Maildir/
[/quote]

我说的问题是说maildrop给出的debug信息,maildrop complain that:
.mailfilter has world write/own permission ,and it&#39;s wrong..

我针对的是这个。

hzqbbc 发表于 2003-2-21 00:55

[quote]【[b]在 laosechong 发表的大作中提到:[/b]】
:我的问题是在SQWEBMAIL中无法登陆进邮件系统,暂时还与 maildrop 过滤无关;

:我感觉问题在这里
:mailbox: /export/home/domain/bj.cn/liu/Maildir/
[/quote]

对。你说得对。sqwebmail那里其实需要的是一个相对路径,不是决对的。
例如basedir = /home/domains
而某拥护liu的homedirectory是bj.cn/liu/那么sqwebmail最后查找的目录是:
/home/domains/bj.cn/liu/,后面的Maildir它自己内部有一个默认的,如果你设置了
mailbox的话,那么就根据mailbox来查找。

你先按偶给你的ldap的ldif格式来加用户吧。


页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.