2012-03-21 71 views
2

我設計的是捕獲錯誤從郵箱傳遞消息的應用程序,我已經做了一些研究中,但我仍然無法將它們過濾掉,似乎有沒有在它的標準,所以我不能讓/過濾它們:?檢索在PHP反彈通知/報告

  1. 如何正常郵件區分開來(例如,我的朋友給我發郵件用短語「失敗」和實際跳出通知郵件

  2. 如果問題1不能很容易地修復,那麼我創建一個單獨的帳戶來處理這個問題,但有什麼辦法來處理報告? (我只能使用郵件的正常表達來獲取失敗傳遞目的地並使用'失敗''代碼'作爲過濾器?)

謝謝你的幫助。我在這種工作方面經驗不足?

雅虎

Sorry, we were unable to deliver your message to the following address. 

<[email protected]>: 
Mail server for "dddddd.com" unreachable for too long 

--- Below this line is a copy of the message. 

Received: from [106.10.166.120] by nm22.bullet.mail.sg3.yahoo.com with NNFMP; 29 Feb 2012 09:04:06 -0000 
Received: from [106.10.167.232] by tm9.bullet.mail.sg3.yahoo.com with NNFMP; 29 Feb 2012 09:04:06 -0000 
Received: from [127.0.0.1] by smtp205.mail.sg3.yahoo.com with NNFMP; 29 Feb 2012 09:04:06 -0000 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.hk; s=s1024; t=1330506246; bh=znnAxTAuKSnliGq49apM7Ii1ERAlZxBv4cYit3wgR/g=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:Subject:From:To:MIME-Version:Content-Type; b=RXRjooHw6FSIX3zGXno0Uc0LLDwmfASQUP+6/1ZqNSHCLcEWzdfVitC0GhxzzwgVwoGxYAxyej/fagjOYUG1V476IKvLFwT2mc7V73nlLmFdo9UV185+QufcC9SFz+/qlgzy1vVYwrKo2Xm7/xZOFVVikFo1sbn0EKjus5GglnI= 
X-Yahoo-Newman-Id: [email protected] 
X-Yahoo-Newman-Property: ymail-3 
X-YMail-OSG: PB_6KyYVM1mf3BcmrbsDUUD94qa2mYVScNnQNXoaj.YxW7w 
8yXbdApm_0pTB_sYvXKZZQq8JLeGZi4kAeFTwI4U52w9O5G4LJFXiSDEg6O5 
2X8Bu8y84ZpZSa5qCi.1cjMWo7cV7CLX5SzG4CijG41iSFpIhwna1U.z9dx1 
8shvWd28JkxnLtU7PaRdxPURHFm1nV8kYyWIqYLBp5wM0qUrJJo9XsRY.Bg8 
EwEnqvdsYvejJ9YIGDZHn6FzBsyfYmSxnrxrM9M.TS7pDZTKDoPYi7VUOwM_ 
aoLMYr6UrNmQyOBQIRB_5CBV920o_6tnpeXKCMT1OJrM.pZEU6Uoow581AZU 
AVdmW7zvK2JC_hU.zL1J8LGuNdzV2T65etkN3WT.3Olm81AG.AzK1odnTIuT 
o 
X-Yahoo-SMTP: zNQ.D62swBB.riCml7vVOaU.Pw-- 
Received: from [::1] ([email protected] with login) 
     by smtp205.mail.sg3.yahoo.com with SMTP; 29 Feb 2012 01:04:06 -0800 PST 
Message-ID: <[email protected]> 
Date: Wed, 29 Feb 2012 10:03:17 +0100 
Subject: ttt 
From: tester <[email protected]> 
To: [email protected] 
MIME-Version: 1.0 
Content-Type: multipart/alternative; 
boundary="_=_swift_v4_13305061974f4de9d591f49_=_" 


--_=_swift_v4_13305061974f4de9d591f49_=_ 
Content-Type: text/plain; charset=utf-8 
Content-Transfer-Encoding: quoted-printable 

test in plain text 

--_=_swift_v4_13305061974f4de9d591f49_=_ 
Content-Type: text/html; charset=utf-8 
Content-Transfer-Encoding: quoted-printable 

Hello , ttttt,Here is a testing mail , ttttt, Unsubscribe from <a href=3Dl= 
ocalhost/fyp/unsub.php?code=3DcQfSoQmeopetSvVCNWMRqFQmxqhllOUH0zo4MqdN> li= 
nk</a> 

--_=_swift_v4_13305061974f4de9d591f49_=_-- 

的Gmail

Delivery to the following recipient failed permanently: 

    [email protected] 

Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 Requested action not taken: mailbox unavailable (state 14). 

----- Original message ----- 

Received-SPF: pass (google.com: domain of [email protected] designates 10.68.228.193 as permitted sender) client-ip=10.68.228.193; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of [email protected] designates 10.68.228.193 as permitted sender) [email protected]; dkim=pass [email protected] 
Received: from mr.google.com ([10.68.228.193]) 
     by 10.68.228.193 with SMTP id sk1mr4178326pbc.60.1330506479278 (num_hops = 1); 
     Wed, 29 Feb 2012 01:07:59 -0800 (PST) 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 
     d=gmail.com; s=gamma; 
     h=message-id:date:subject:from:to:mime-version:content-type; 
     bh=mTAZjN0yOMSZvZ93QlxjKHpcMuoOOMgF3ae4S5LrPpM=; 
     b=f1B4X5p0Unf+Yx3G+BHwsc6mn5x793Ezm60qIxoTX5Xb7fmORq5tPiihiNLNef0d7V 
     5+g6iVIa1MduQKbtrVKUFmkc163rSRpC2nzW+RERE8KhY/4BVY1tvR1pI4sqcljXzWZm 
     +sDvEotPrmn+m/AdRnPaCN44eGZ6xDv2SPUUE= 
Received: by 10.68.228.193 with SMTP id sk1mr3539133pbc.60.1330506479252; 
     Wed, 29 Feb 2012 01:07:59 -0800 (PST) 
Return-Path: <[email protected]> 
Received: from [::1] ([168.70.100.57]) 
     by mx.google.com with ESMTPS id f6sm2760781pbt.4.2012.02.29.01.07.56 
     (version=SSLv3 cipher=OTHER); 
     Wed, 29 Feb 2012 01:07:58 -0800 (PST) 
Message-ID: <[email protected]> 
Date: Wed, 29 Feb 2012 10:06:58 +0100 
Subject: ttt 
From: tester <[email protected]> 
To: [email protected] 
MIME-Version: 1.0 
Content-Type: multipart/alternative; 
boundary="_=_swift_v4_13305064184f4deab2410ee_=_" 

test in plain text 
+1

由於退回的電子郵件的格式取決於彈跳服務器,因此沒有實用/萬無一失的方法來捕捉反彈。格式沒有標準。 – 2012-03-21 19:02:25

回答

0

大多數做的是設置一個ReturnPath這樣地址發送的郵件,說去該地址是由服務器返回的任何郵件不是人類,因此請掃描該服務器添加的錯誤消息。

+0

如果廣告信無意中發送到該郵箱,該怎麼辦? – 2012-03-27 18:51:02

+0

不應該,但你可以嘗試做一些與自動回覆模式不匹配的郵件。 – 2012-03-27 20:15:08