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

Google 自訂搜尋

Goole 廣告

隨機相片
LSxMF_00042.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

小企鵝開談 : [轉貼]recipient_bcc 與 sender_bcc + mysql 實現郵件監控

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]recipient_bcc 與 sender_bcc + mysql 實現郵件監控
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的日志 - 网易博客
前一個主題 | 下一個主題 | 頁首 | | |



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