- 论坛徽章:
- 0
|
环境如题,FreeBSD+Postfix+MySQL+Courier-IAMP+SASL2
参数此教程做的,http://www.yiyou.org/docs/freebsd_postfix_03/#mailserver
当执行echo "test" | maildrop -V 10 -d root@freebsd.yakang.com时显示以下结果:
maildrop: Temporary authentication failure.
还希望达人们指教一下,谢谢,本人是非常非常新手:wink: ,所以查了很多地方 ,也做了很多努力 ,还是没有办法解决 !
下面是/var/log/maillog的错误日志:
Aug 21 11:06:53 freebsd maildrop[996]: Temporary authentication failure.
Aug 21 11:07:27 freebsd authdaemond: stopping authdaemond children
Aug 21 11:07:27 freebsd authdaemond: modules="authmysql", daemons=5
Aug 21 11:07:27 freebsd authdaemond: Installing libauthmysql
Aug 21 11:07:27 freebsd authdaemond: Installation complete: authmysql
Aug 21 11:07:28 freebsd authdaemond: failed to connect to mysql server (server=localhost, userid=extmail): Access denied for user 'extmail'@'localhost' (using password: YES)
Aug 21 11:07:28 freebsd maildrop[1020]: Temporary authentication failure.
执行hostname时显示以下结果:
freebsd.yakang.com
执行sockstat -4的结果如下:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
www httpd 998 3 tcp46 *:80 *:*
chinaid sshd 933 3 tcp4 10.0.0.26:22 10.0.0.20:1424
root sshd 930 3 tcp4 10.0.0.26:22 10.0.0.20:1424
chinaid sshd 923 3 tcp4 10.0.0.26:22 10.0.0.20:1423
root sshd 920 3 tcp4 10.0.0.26:22 10.0.0.20:1423
root sshd 855 4 tcp4 *:22 *:*
root couriertcp 841 3 tcp4 *:993 *:*
root couriertcp 831 3 tcp4 *:143 *:*
root couriertcp 816 3 tcp4 *:995 *:*
root couriertcp 807 3 tcp4 *:110 *:*
root master 790 11 tcp4 *:25 *:*
mysql mysqld 757 17 tcp4 *:3306 *:*
root perl 674 3 tcp4 *:10000 *:*
root perl 674 5 udp4 *:10000 *:*
www httpd 673 3 tcp46 *:80 *:*
www httpd 672 3 tcp46 *:80 *:*
www httpd 671 3 tcp46 *:80 *:*
www httpd 670 3 tcp46 *:80 *:*
www httpd 669 3 tcp46 *:80 *:*
root httpd 641 3 tcp46 *:80 *:*
root syslogd 536 7 udp4 *:514 *:*
下面是cat /usr/local/etc/authlib/authmysqlrc的配置:
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE extmail
MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber,CONCAT('/home/maildir/',homedir),CONCAT('/home/maildir/',maildir,quota,name FROM mailbox WHERE username = '$(local_part)@$(domain)'
位于/usr/local/etc/postfix/下的mysql_virtual_alias_maps.cf的内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
additional_conditions = AND active = '1'
位于/usr/local/etc/postfix/下mysql_virtual_domains_maps.cf的内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = description
where_field = domain
additional_conditions = AND active = '1'
位于/usr/local/etc/postfix/下mysql_virtual_mailbox_maps.cf的内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username
additional_conditions = AND active = '1'
位于/usr/local/etc/postfix/下mysql_virtual_mailbox_limit_maps.cf的内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1'
下面是关于用Username/Password分别为extmail/extmail来登录MySQL,已经核对过extmail绝对有权操作mysql,是通过extmain/docs下面的extmail.sql和init.sql来初始化执行的:
mysql -u extmail -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 5.1.11-beta-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
[ 本帖最后由 ChinaID 于 2008-8-23 22:35 编辑 ] |
|