中国反垃圾邮件联盟论坛: 当用虚拟用户aa@aa.com登录时,postfix却用aa@linux.com来验证 - 中国反垃圾邮件联盟论坛

跳到内容

共计一页
  • You cannot start a new topic
  • You cannot reply to this topic

当用虚拟用户aa@aa.com登录时,postfix却用aa@linux.com来验证

#1 User is offline   yyyyuuuu386

  • 新兵
  • Pip
  • 群组: 会员
  • 帖子: 3
  • 加入: 2008-08-16 09:09

发表于 2009-12-16 08:08:55

我的实验环境是:linux主机名为:apache.linux.com,后台管理用的是postfixadmin
现在用postfixadmin添加了一个aa.com虚拟域,新建用户为aa;查询mysql中存在该用户的记录
当用foxmail的pop3登陆时,提示“验证失败,请检查用户名和密码是否正确”
在maillog中的日志如下:
apache authdaemond: received auth request, service=pop3, authtype=login
Dec 15 04:01:21 apache authdaemond: authmysql: trying this module
Dec 15 04:01:21 apache authdaemond: received auth request, service=smtp, authtype=login
Dec 15 04:01:21 apache authdaemond: authmysql: trying this module
Dec 15 04:01:21 apache authdaemond: authmysqllib: connected. Versions: header 50088, client 50088, server 50088
Dec 15 04:01:21 apache authdaemond: SQL query: SELECT username, password, "", '1002', '1002', '/home/mail', maildir, "", name, "" FROM mailbox WHERE username = 'aa'
Dec 15 04:01:21 apache authdaemond: zero rows returned
Dec 15 04:01:21 apache authdaemond: no password available to compare
Dec 15 04:01:21 apache authdaemond: authmysql: REJECT - try next module
Dec 15 04:01:21 apache authdaemond: FAIL, all modules rejected
Dec 15 04:01:21 apache authdaemond: authmysqllib: connected. Versions: header 50088, client 50088, server 50088
Dec 15 04:01:21 apache authdaemond: SQL query: SELECT username, password, "", '1002', '1002', '/home/mail', maildir, "", name, "" FROM mailbox WHERE username = 'aa@linux.com'
Dec 15 04:01:21 apache authdaemond: zero rows returned
Dec 15 04:01:21 apache authdaemond: no password available to compare
Dec 15 04:01:21 apache authdaemond: authmysql: REJECT - try next module
Dec 15 04:01:21 apache authdaemond: FAIL, all modules rejected
Dec 15 04:01:21 apache postfix/smtpd[3118]: warning: unknown[192.168.8.240]: SASL LOGIN authentication failed: authentication failure
Dec 15 04:01:21 apache pop3d: LOGIN FAILED, user=aa, ip=[192.168.8.240]
Dec 15 04:01:21 apache postfix/smtpd[3118]: lost connection after AUTH from unknown[192.168.8.240]
Dec 15 04:01:21 apache postfix/smtpd[3118]: disconnect from unknown[192.168.8.240]
Dec 15 04:01:26 apache pop3d: Disconnected, ip=[192.168.8.240]
Dec 15 04:02:14 apache postfix/pickup[3089]: 9A50A44634: uid=0 from=<root>
Dec 15 04:02:14 apache postfix/cleanup[3124]: 9A50A44634: message-id=<20091215090214.9A50A44634@apache.linux.com>
Dec 15 04:02:14 apache postfix/qmgr[3040]: 9A50A44634: from=<root@linux.com>, size=2707, nrcpt=1 (queue active)
Dec 15 04:02:21 apache postfix/smtp[3482]: 9A50A44634: to=<root@linux.com>, orig_to=<root>, relay=smtp1.linux.com[140.211.169.67]:25, delay=7.2, delays=0.21/0.2/6.1/0.63, dsn=2.0.0, status=sent (250 2.0.0 nBF90olU027646 Message accepted for delivery)
Dec 15 04:02:21 apache postfix/qmgr[3040]: 9A50A44634: removed
Dec 15 04:04:41 apache postfix/anvil[3130]: statistics: max connection rate 1/60s for (smtp:192.168.8.240) at Dec 15 04:01:21
Dec 15 04:04:41 apache postfix/anvil[3130]: statistics: max connection count 1 for (smtp:192.168.8.240) at Dec 15 04:01:21
Dec 15 04:04:41 apache postfix/anvil[3130]: statistics: max cache size 1 at Dec 15 04:01:21

我看这是用aa@linux.com去查询的,而不是我的aa@aa.com,所以会出现这个验证失败的问题
请问:这个问题怎么解决,谢
0

#2 User is offline   wxy

  • 营长
  • PipPipPipPipPipPipPip
  • 群组: 站长
  • 帖子: 1,391
  • 加入: 2003-08-10 15:03

发表于 2009-12-16 15:03:48

你的authdaemond里面的mysql如何配制的?把配制贴上来看看。
Posted Image
0

#3 User is offline   yyyyuuuu386

  • 新兵
  • Pip
  • 群组: 会员
  • 帖子: 3
  • 加入: 2008-08-16 09:09

发表于 2009-12-16 17:05:32

我的courier-authlib是安装在/usr/local/courier-authlib目录下的
/usr/local/courier-authlib/sbin/authdaemond的内容如下:
#! /bin/sh
#
# $Id: authdaemond.in,v 1.6 2005/07/05 12:25:08 mrsam Exp $
#
# Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
# distribution information.
#
# Courier authentication daemon startup script.

prefix=/usr/local/courier-authlib
exec_prefix=/usr/local/courier-authlib
sbindir=/usr/local/courier-authlib/sbin
localstatedir=/usr/local/courier-authlib/var

set -a
. /usr/local/courier-authlib/etc/authdaemonrc

exec ${sbindir}/courierlogger -pid=/var/spool/authdaemon/pid $LOGGEROPTS -$1 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
0

#4 User is offline   yyyyuuuu386

  • 新兵
  • Pip
  • 群组: 会员
  • 帖子: 3
  • 加入: 2008-08-16 09:09

发表于 2009-12-16 18:06:02

/usr/local/courier-authlib/etc/authmysqlrc的内容如下:
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '1002'
MYSQL_GID_FIELD '1002'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/home/mail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
0

共计一页
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users