2012-07-19 88 views
6

我收到郵件,其中「From」和「Reply-to」與「Return-Path」,「Received from」不同,如本例所示。 如何爲這種郵件設置過濾器?使用過濾器返回路徑

Return-Path: <[email protected]> 
Received: from bhasha.interpole.net (bhasha.interpole.net. 
Received: from cybersho by bhasha.interpole.net with local (Exim 4.77) 
    (envelope-from <[email protected]>) 
From: "Gadima.com" <[email protected]> 
Reply-to: "Gadima.com" <[email protected]> 
+0

您要過濾哪個字段?此外,這似乎是一個超級用戶的問題。 – gogowitsch 2014-02-14 20:06:31

回答

1

不幸的是,在Gmail中似乎不可能。

我回到了我的電子郵件客戶端Gnus(因爲它有驚人的靈活性和輕便性)。細節在其手冊的"6.3.3 Client-Side IMAP Splitting"部分進行了解釋。

這非常容易。在我的「.gnus.el」的文件,我把(我使用的Gmail的nnimap後端)是這樣的:

(setq nnimap-split-methods 
'(("mail-list-folder" "Return-Path: mail-list-address") 
    ("INBOX" "")) 

你需要調整你的‘郵件列表文件夾’(標籤)和「返回路徑:郵件列表地址」部分。包含「Return-Path:...」的字符串是一個正則表達式,因此您可以使用通配符,如。*甚至組。例如,過濾掉一些名單,我訂閱了,我有:

(setq nnimap-split-methods 
'(("list.\\1" "^Return-Path: <\\(.*\\)-bounces.*@gnu.org>") 
    ("INBOX" "")) 

通知捕獲組,\\這是用來形成我的標籤,以及所需的調整(* \\。)以匹配由郵件列表程序形成的返回路徑。

如果你想嘗試一下,我可以建議下面的wiki開始:https://www.emacswiki.org/emacs/GnusGmail