国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網管 > 服務器 > 正文

postfix部署多個Content Filter的方法

2020-05-27 13:24:37
字體:
來源:轉載
供稿:網友

   Postfix郵件服務器可以在接收郵件時使用content_filter來掃描郵件(病毒,廣告等).通過整合一個集中化的電子郵件內容過濾器,比如amavis或mailscanner,Postfix可以利用單次調用來進行多個掃描.這非常好,但是有些過濾器很難或者幾乎不可能整合到一個集中化的過濾器中.這是一個問題,尤其是你的Postfix系統已經安裝了某些集中化的content_filter.我們能解決這個問題嗎,當然可以.這個文檔將給出許多可能的解決方案中的一種.你的步驟可能不一樣,根據你的配置而定.

  在案例中,我們假設我們需要一個運行Postfix,Amavis(包含各種插件)和Avira MailGate的郵件系統.Postfix已經配置為使用Amavis系統作為content_filter.MailGate 不能通過Amavis進行整合,因此它要使用一個單獨的content_filter.

  Amavis配置:Amavis監聽10026端口,然后通過10027端口進行轉發.

 代碼如下   $inet_socket_port = 10026; forward_method => smtp:[127.0.0.1]:10027;

  MailGate配置:MailGate監聽20024端口,然后通過20025端口進行轉發.

 代碼如下   ListenAddress localhost port 20024 ForwardTo SMTP: localhost port 20025

  Postfix需要配置兩個過濾器.

  這可以通過串接過濾器:進入的郵件首先提交到Postfix Content_filter,(www.3lian.net然后Content_filter將掃描后的郵件傳給Postfix.掃描后的郵件再傳給第二個Content_filter.最后再送到用戶手中.我們的鏈是這樣的:Postfix > MailGate > Postfix > Amavisd-new >

 代碼如下  

Postfix > User main.cf:

content_filter = smtp:127.0.0.1:20024 master.cf

localhost:20025 inet n - n - - smtpd -o content_filter=smtp:127.0.0.1:10026 127.0.0.1:10027 inet n - n - - smtpd -o content_filter= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o smtpd_restriction_classes= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters -o local_header_rewrite_clients=

  就這樣,Postfix提交所有進來的郵件到20024端口的MailGate,MailGate再將掃描的結果傳回到20025的Postfix.Postfix在20025端口運行著一個額外的SMTP服務,這個服務也包含了一個content_filter,因此所有到達20025端口的郵件會再傳給10026端口.Amavis監聽著10026端口,因此郵件將被Aamavis掃描.掃描完成后Amavis將郵件傳送到10027端口.而在10027端口上運行著另外一個Postfix提供的SMTP服務,至此郵件到達鏈的終點,郵件將被郵遞給用戶.

  另外一個配置樣例可能如下:

 代碼如下  

In main.cf:

# send email to amavisd content_filter = amavisd:[127.0.0.1]:10024 In master.cf:

# amavisd amavisd unix - - n - 2 lmtp -o lmtp_data_done_timeout=1200s -o disable_dns_lookups=yes

# receive email from amavisd # and then send email to altermine 127.0.0.1:10025 inet n - n - - smtpd -o content_filter=altermine

# receive email from 127.0.0.1:10025 altermine unix - - n - 2 pipe ...

# receive email from altermine 127.0.0.1:20025 inet n - n - - smtpd -o content_filter= -o ...

  整個流程為: postfix -> amavisd:[127.0.0.1]:10024 -> postfix -> altermine -> postfix -> user

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 磐安县| 清水河县| 崇礼县| 紫金县| 金阳县| 巴塘县| 北流市| 西藏| 绍兴市| 天峨县| 宁陕县| 馆陶县| 天祝| 南华县| 大宁县| 托克逊县| 阜新市| 麦盖提县| 会同县| 苏尼特左旗| 金川县| 浦县| 繁峙县| 巴马| 龙泉市| 昌黎县| 原阳县| 东乡县| 西畴县| 左贡县| 揭东县| 攀枝花市| 德格县| 田东县| 无锡市| 普洱| 漳平市| 安乡县| 罗平县| 奎屯市| 和平区|