我有一个网站运行在亚马逊EC2的Ubuntu实例。 我的networking服务器是Apache。 我正在使用PHP邮件function从联系人窗体发送邮件。 我已经安装了postfix并使用了默认的ocnfiguration。 我们域名的电子邮件由rackspace托pipe。 当联系人表单尝试发送邮件到我们的域名([email protected]),这是一个有效的ID的电子邮件ID,mail.log显示后缀正试图在本地提供。 然而,它适用于Gmail的ids。 这是我的mail.log从服务器:
Sep 17 07:48:15 ip-10-134-177-117 postfix/pickup[2189]: EC11D68106: uid=0 from=<root> Sep 17 07:48:15 ip-10-134-177-117 postfix/cleanup[11700]: EC11D68106: message-id=<20110917074815.EC11D68106@ip-10-134-177-117.ap-southeast-1.compute.internal> Sep 17 07:48:15 ip-10-134-177-117 postfix/qmgr[17377]: EC11D68106: from=<[email protected]>, size=650, nrcpt=1 (queue active) Sep 17 07:48:15 ip-10-134-177-117 postfix/local[11702]: EC11D68106: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.05, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Sep 17 07:48:15 ip-10-134-177-117 postfix/qmgr[17377]: EC11D68106: removed Sep 17 08:01:53 ip-10-134-177-117 postfix/pickup[13498]: AC5EA68106: uid=33 from=<www-data> Sep 17 08:01:53 ip-10-134-177-117 postfix/cleanup[13628]: AC5EA68106: message-id=<20110917080153.AC5EA68106@ip-10-134-177-117.ap-southeast-1.compute.internal> Sep 17 08:01:53 ip-10-134-177-117 postfix/qmgr[17377]: AC5EA68106: from=<[email protected]>, size=604, nrcpt=4 (queue active) Sep 17 08:01:53 ip-10-134-177-117 postfix/local[13631]: AC5EA68106: to=<[email protected]>, relay=local, delay=0.28, delays=0.04/0.23/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info") Sep 17 08:01:55 ip-10-134-177-117 postfix/local[13632]: AC5EA68106: to=<[email protected]>, relay=local, delay=1.5, delays=0.04/0.23/0/1.2, dsn=5.1.1, status=bounced (unknown user: "nithin.kv") Sep 17 08:01:58 ip-10-134-177-117 postfix/smtp[13630]: AC5EA68106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=5.2, delays=0.04/0.08/0.94/4.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1316246518 m10si2182807yhk.92) Sep 17 08:01:58 ip-10-134-177-117 postfix/smtp[13630]: AC5EA68106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=5.2, delays=0.04/0.08/0.94/4.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1316246518 m10si2182807yhk.92) Sep 17 08:01:58 ip-10-134-177-117 postfix/cleanup[13628]: DB42468107: message-id=<20110917080158.DB42468107@ip-10-134-177-117.ap-southeast-1.compute.internal> Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: DB42468107: from=<>, size=2795, nrcpt=1 (queue active) Sep 17 08:01:58 ip-10-134-177-117 postfix/bounce[13633]: AC5EA68106: sender non-delivery notification: DB42468107 Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: AC5EA68106: removed Sep 17 08:01:58 ip-10-134-177-117 postfix/local[13631]: DB42468107: to=<[email protected]>, relay=local, delay=0.09, delays=0.01/0/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox) Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: DB42468107: removed Sep 17 08:27:43 ip-10-134-177-117 postfix/pickup[13498]: 22FC468106: uid=33 from=<www-data> Sep 17 08:27:43 ip-10-134-177-117 postfix/cleanup[15563]: 22FC468106: message-id=<20110917082743.22FC468106@ip-10-134-177-117.ap-southeast-1.compute.internal> Sep 17 08:27:43 ip-10-134-177-117 postfix/qmgr[17377]: 22FC468106: from=<[email protected]>, size=624, nrcpt=5 (queue active) Sep 17 08:27:43 ip-10-134-177-117 postfix/local[15566]: 22FC468106: to=<[email protected]>, relay=local, delay=0.06, delays=0.03/0.02/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info") Sep 17 08:27:44 ip-10-134-177-117 postfix/local[15567]: 22FC468106: to=<[email protected]>, relay=local, delay=0.98, delays=0.03/0.02/0/0.93, dsn=5.1.1, status=bounced (unknown user: "nithin.kv") Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13) Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13) Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13) Sep 17 08:27:45 ip-10-134-177-117 postfix/cleanup[15563]: F3DBA68107: message-id=<20110917082745.F3DBA68107@ip-10-134-177-117.ap-southeast-1.compute.internal> Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: F3DBA68107: from=<>, size=2815, nrcpt=1 (queue active) Sep 17 08:27:46 ip-10-134-177-117 postfix/bounce[15568]: 22FC468106: sender non-delivery notification: F3DBA68107 Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: 22FC468106: removed Sep 17 08:27:46 ip-10-134-177-117 postfix/local[15566]: F3DBA68107: to=<[email protected]>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: F3DBA68107: removed
如何告诉后缀路由我的邮件发送到jivity.com外部,而不是把它作为本地域? 谢谢。
这个域名最有可能在Postfix'mydestination指令中列出。 解决的办法是编辑你的/etc/postfix/main.cf并更改myhostname和mydestination指令:
myhostname = hostname.jivity.com mydestination = $myhostname
这样,您的邮件服务器将只考虑hostname.jivity.com作为本地主机名,其他所有内容将被正确路由。
您的机器是该邮件的最终目的地 。 您需要调整$mydestination以便这样的邮箱不再在本地域类中 ,不会传递到本地传输 。