茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1673282 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_60D_00334.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2012/11/20 16:10:33
recipient_bcc 與 sender_bcc + mysql實現郵件監控  
 

添加數據表mail_watch
CREATE TABLE `mail_watch` (
`sender` varchar(100) NOT NULL,
`bcc` varchar(100) NOT NULL,
PRIMARY KEY (`sender`)
)

vim /etc/postfix/main.cf


sender_bcc_maps = mysql:/etc/postfix/mail_watch.cf
recipient_bcc_maps = mysql:/etc/postfix/mail_watch.cf


mysql_watch.cf
user = postfix
password = xxxxx
dbname = postfix
table = mail_watch
select_field = bcc
where_field = sender
hosts = localhost
這樣就可以指定某個人監控某個人的郵件了
接下來考慮與extmail結合了,先趕緊記下來,免得忘了

 

 
===================================================================


postfix從2.1版本以後支持sender_bcc_maps 和recipient_bcc_maps這兩個選項

可以支持多種lookup table,如mysql_table

比如:按匹配發送人進行密送,配置如下

1)sender_bcc_maps = mysql:/etc/postfix/sender_bcc.cf

2)cat sender_bcc.cf

hosts = unix:/var/lib/mysql/mysql.sock
user = mail
password = mail
dbname = mail
query = SELECT user_bcc FROM bcc WHERE sender_bcc = '%s'

3)數據結構

mysql> select * from bcc;

+----------------+---------------+----------------+
| sender_bcc     | recipient_bcc | user_bcc       |
+----------------+---------------+----------------+

test1@tttt.com |               |  admin@tttt.com | 
+----------------+---------------+----------------+

4)同時也需要在master.cf中加入receive_override_options=no_address_mappings參數

 測試test1給任何人發信都會密送到 admin@tttt.com郵箱中


原文出處:recipient_bcc 与 sender_bcc + mysql实现邮件监控 - jsl99@mig的日志 - 网易博客
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|