ZhangHuangbin 写道:

那就改掉你的服务器主机名,不要用 mail.xxx.com.


这个好,谢谢张大侠

ZhangHuangbin 写道:

你的邮件子域名是 mail.mail.xxxx.com,那就用 iRedAdmin 建立一个 mail.mail.xxxx.com 的域名,然后添加相应的用户即可。


多谢耐心解答!

这样确实可以,但是我的子域名是指向另外的服务器的,如果这样配置,mail.XXX.com下面发到abc@mail.XXX.com的就回到本服务器,而不会到我想配置的那个外部服务器

是的,mail.***.com是主机名,我的邮件子域名是mail.mail.***.com,子域名服务器mx指向的其他服务器,有什么办法解决让postfix过滤这个子域名吗,似乎postfix默认XXX@mail.+域名是系统账号

发送其他邮箱均正常,各位大侠帮忙看下啊

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):
- 使用的 Linux/BSD 发行版名称及版本号:
- 与您的问题相关的日志信息:
==== ==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.8.7
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):OpenLDAP,MySQL
- 使用的 Linux/BSD 发行版名称及版本号:Centos 6.5
- 与您的问题相关的日志信息:
(服务器地址被我替换成了***.com)
服务器的主邮箱是@***.com,在其他企业邮箱上是@mail.***.com的,子域名邮箱可以发到主邮箱,主邮箱发送,被服务器打回
This is the mail system at host mail.***.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<abc@mail.***.com>: unknown user: "abc"

maillog日志如下:


Jun 16 17:49:33 mail postfix/smtpd[14967]: connect from unknown[59.40.0.96]
Jun 16 17:49:33 mail postfix/smtpd[14967]: 7B398C2BAC: client=unknown[59.40.0.96], sasl_method=LOGIN, sasl_username=test@***.com
Jun 16 17:49:33 mail postfix/cleanup[14911]: 7B398C2BAC: message-id=<2015061617494424434719@***.com>
Jun 16 17:49:33 mail postfix/qmgr[14899]: 7B398C2BAC: from=<test@***.com>, size=3567, nrcpt=1 (queue active)
Jun 16 17:49:33 mail postfix/smtpd[14967]: disconnect from unknown[59.40.0.96]
Jun 16 17:49:35 mail postfix/smtpd[14919]: connect from mail.***.com[127.0.0.1]
Jun 16 17:49:35 mail postfix/smtpd[14919]: 952D9C2BC6: client=mail.***.com[127.0.0.1]
Jun 16 17:49:35 mail postfix/cleanup[14911]: 952D9C2BC6: message-id=<2015061617494424434719@***.com>
Jun 16 17:49:35 mail postfix/smtpd[14919]: disconnect from mail.***.com[127.0.0.1]
Jun 16 17:49:35 mail postfix/qmgr[14899]: 952D9C2BC6: from=<test@***.com>, size=4590, nrcpt=1 (queue active)
Jun 16 17:49:35 mail amavis[12000]: (12000-10) Passed CLEAN {RelayedInternal}, MYUSERS LOCAL [59.40.0.96]:50276 [59.40.0.96] <test@***.com> -> <abc@mail.***.com>, Queue-ID: 7B398C2BAC, Message-ID: <2015061617494424434719@***.com>, mail_id: rQLAD-Uy62tU, Hits: -9.996, size: 3567, queued_as: 952D9C2BC6, dkim_new=dkim:***.com, 2100 ms
Jun 16 17:49:35 mail postfix/smtp[14969]: 7B398C2BAC: to=<abc@mail.***.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.2, delays=0.04/0/0/2.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 952D9C2BC6)
Jun 16 17:49:35 mail postfix/qmgr[14899]: 7B398C2BAC: removed
Jun 16 17:49:35 mail postfix/local[15131]: 952D9C2BC6: to=<abc@mail.***.com>, relay=local, delay=0.03, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "abc")
Jun 16 17:49:35 mail postfix/cleanup[14911]: 9DD38C2BAC: message-id=<20150616094935.9DD38C2BAC@mail.***.com>
Jun 16 17:49:35 mail postfix/bounce[15132]: 952D9C2BC6: sender non-delivery notification: 9DD38C2BAC
Jun 16 17:49:35 mail postfix/qmgr[14899]: 9DD38C2BAC: from=<>, size=6411, nrcpt=1 (queue active)
Jun 16 17:49:35 mail postfix/qmgr[14899]: 952D9C2BC6: removed
Jun 16 17:49:35 mail postfix/pipe[14920]: 9DD38C2BAC: to=<test@***.com>, relay=dovecot, delay=0.06, delays=0.01/0/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 16 17:49:35 mail postfix/qmgr[14899]: 9DD38C2BAC: removed


服务器配置里面修改
第一处
mydomain = ***.com
local_recipient_maps =
#mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname

第二处
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031

其他几乎没变

====