- 论坛徽章:
- 0
|
AS4+postfix-2.3.8+courier-authlib 0.57+courier-imap 4.0.6+mysql
出现的问题是:
[root@localhost saslfinger-1.0.1]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 email.XXXX.net ESMTP "Version not Available"
ehlo email.XXXX.net
250-email.XXXX.net
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH PLAIN
250-AUTH=PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
535 5.7.0 Error: authentication failed: no mechanism available
quit
221 2.0.0 Bye
Connection closed by foreign host.
==================================================
[root@localhost saslfinger-1.0.1]# telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user ghz@XXXX.edu.cn
+OK Password required.
pass 123456
-ERR Login failed.
quit
+OK Better luck next time.
Connection closed by foreign host.
也就是验证错误不能通过了。
查看本机是否开放所有服务:
[root@localhost saslfinger-1.0.1]# netstat -ant|grep "LISTEN"
tcp 0 0 0.0.0.0:32769 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 :::110 :::* LISTEN
tcp 0 0 :::143 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 :::443 :::* LISTEN
===================================================
关键的几个配置文件的内容如下:
[root@localhost saslfinger-1.0.1]# vi /etc/psotfix/main.cf
#===============================BASE================================
myhostname = email.XXXX.net
mydomain = XXXX.net
myorigin = $mydomain
mydestination = $myhostname local localhost.$mydomain
mynetworks = 127.0.0.0/8
inet_interfaces = all
alias_maps = hash:/etc/postfix/aliases
#
#
#
#=============================Virtual Mailbox settings==================
virtual_mailbox_base = /var/mailbox
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
#
#
#
#===============================QUOTA====================================
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry,the room is too small.
virtual_overquota_bounce = yes
#
#
#
#=============================SASL=====================================
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = $myhostname ESMTP "Version not Available"
-------------------------------------------------------------------------------------------------------------------
/etc/psotfix/master.cf中:
maildrop unix - n n - - pipe
flags=DRhu user=email argv=/usr/local/maildrop/bin/maildrop -w 90 -d ${recipient}
------------------------------------------------------------------------------------------------------------------
[root@localhost mysql]# vi mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
--------------------------------------------------------------------------------------------------------------
[root@localhost mysql]# vi mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'
---------------------------------------------------------------------------------------------------------------
[root@localhost mysql]# vi mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'
--------------------------------------------------------------------------------------------------------------
[root@localhost mysql]# vi mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'
------------------------------------------------------------------------------------------------------------
用saslfinger测试的错误是:
[root@localhost authlib]# saslfinger -c
saslfinger - postfix Cyrus sasl configuration Sun Mar 11 19:21:56 CST 2007
version: 1.0.1
mode: client-side SMTP AUTH
-- basics --
Postfix: 2.3.8
System: Red Hat Enterprise Linux AS release 4 (Nahant)
-- smtp is linked to --
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x00910000)
-- active SMTP AUTH and TLS parameters for smtp --
No active [color="#000000"]SMTP AUTH and TLS parameters for smtp in main.cf!
SMTP AUTH can't work!
------------------------------------------------------------------------------------------------------------
/var/log/maillog中的错误信息:
Mar 11 15:32:23 localhost postfix/smtpd[25953]: warning: SASL authentication failure: Couldn't find mech login
Mar 11 15:32:23 localhost postfix/smtpd[25953]: warning: localhost.localdomain[127.0.0.1]: SASL login authentication failed: no mechanism available
一次也贴不了那么多的了。先放这些。
小弟搜索了N多资料,也没有找到相应的解决方法。不知道哪位大哥遇到过相类似的问题。能否把解决方法告知一二,小弟感激不尽!
[ 本帖最后由 tiandi_g 于 2007-3-11 19:30 编辑 ] |
|