myp 发表于 2011-11-12 16:28:55

postfix 基于系统用户 使用大写用户名时,报错

使用postfix时,基于系统用户的

用户名是小写的,使用telnet IP 25 这样的方法,发信没问题

但是当rcpt to:后面出现大写的用户名,回车后就提示 “User unknown in local recipient table”

看日志,没有什么有用的提示,只是提示 mail from:root@zhang.com to W5@zhang.com

不知道为什么,大家没有没好主意??

myp 发表于 2011-11-15 10:12:00

怎么没有人回??

我又仔细看了下,如果系统中有个小写的用户名,那么信就会发到他里面去

比如发给 L4@163.com的信,会发给 l4@163.com

如果这个小写的用户不存在,就报错, 收件人不在中继列表

myp 发表于 2011-11-15 17:08:06

这是maillog日志:
Nov 15 16:58:07 localhost postfix/smtpd: connect from localhost.localdomain
Nov 15 16:58:22 localhost postfix/smtpd: lost connection after CONNECT from localhost.localdomain
Nov 15 16:58:22 localhost postfix/smtpd: disconnect from localhost.localdomain
Nov 15 17:01:02 localhost postfix/smtpd: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 15 17:01:02 localhost postfix/smtpd: connect from localhost.localdomain
Nov 15 17:01:23 localhost postfix/smtpd: NOQUEUE: reject: RCPT from localhost.localdomain: 550 5.1.1 <NT2@qq.com>: Recipient address rejected: User unknown in local recipient table; from=<root@qq.com> to=<NT2@qq.com> proto=SMTP helo=<localhost>

------------------------------------------------------
这是用户配置文件:
# tail -2 /etc/passwd
NT:x:1008:1008::/home/NT:/sbin/nologin
NT2:x:1009:1009::/home/NT2:/bin/bash
# tail -2 /etc/shadow
NT:!!:15290:0:99999:7:::
NT2:$1$P2LPAslo$lKHx/rbHW5Gh8kviFlKHB0:15290:0:99999:7:::
#

--------------------------------------------------------
这是我telnet到127.0.0.1 25端口时的报错:
# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.qq.com ESMTP Postfix
helo localhost
250 mail.qq.com
mail from:root@qq.com
250 2.1.0 Ok
rcpt to:NT2@qq.com
550 5.1.1 <NT2@qq.com>: Recipient address rejected: User unknown in local recipient table

-------------------------------------------------------
这是我的postfix配置文件:
# less /etc/postfix/main.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
myhostname=mail.qq.com
inet_interfaces=192.168.1.1,127.0.0.1
mydomain=qq.com
myorigin=$mydomain
mydestination=$mydomain,$myhostname
home_mailbox=Maildir/


就这样了,请帮忙,谢谢!!

myp 发表于 2011-11-16 11:19:22

原帖由 haha_yong 于 2011-11-15 17:43 发表 http://www.5dmail.net/bbs/images/common/back.gif
alias_maps = hash:/etc/aliases   在main.cf里面加上这条试试!

加了之后也是一样的毛病

这句应该是加的别名查询表吧?
页: [1]
查看完整版本: postfix 基于系统用户 使用大写用户名时,报错