Postfix的bcc郵件備份

來源:互聯網
上載者:User

標籤:bcc extmail

發送附件所受的限制有:

     

使用者郵箱的總容量。例如:使用者郵箱為 10M,你不可能給他發一個 11M 大的附件。     

PHP 裡設定的可上傳檔案的大小。例如:PHP 裡設定最大可上傳檔案為 10M,你不可能通過任何 PHP 的 Web 程式上傳大於 10M 的檔案,所以你不能上傳超過 10M 的檔案當附件。 

PHP 的設定檔是 /etc/php.ini,需要調整的參數主要有:

     

upload_max_filesize     

post_max_size 

適當增大它們的值,並重啟 Apache 服務即可。

(apachectl -k graceful)

某仁兄問:

好像不只是這個原因,我的upload_max_filesize設定的是10M,post_max_size設定的是12M,但是我用extmail他提示我不能超過5M,webmail還沒有測試,我試一下

回答:

ExtMail 的設定需要修改 /var/www/extsuite/extmail/webmail.cf,找到 ‘SYS_MESSAGE_SIZE_LIMIT‘ 參數,將它改為你需要的大小即可。

10M 附件大小的演算法是:

10M * 1024 * 1024

可以用 bc 命令來計算:#bc(退出時quit),將得到的值寫進 ExtMail 的配置裡即可。

註:extmail預設是5M,iRedmail將他調整為10M。 

這樣設定之後可以上傳設定大小的附件了,但可能還是無法發送,此時再修改/etc/postfix/main.cf

找到 message_size_limit 修改其大小,然後重啟Postfix:/etc/init.d/postfix stop/start.

OK,可以傳送大附件了。

 

Postfix的全域bcc(自動轉寄/郵件備份)設定  


postfix的bcc(密送)功能可以根據條件,將所有經過postfix隊列的郵件根據規則密送到指定的郵箱。

postfix帶有三個bcc參數:

①、always_bcc:將所有的郵件都備份到指定郵箱;

②、sender_bcc_maps:將收件者包含在map檔案中的郵件被分到指定郵箱;

③、recipient_bcc_maps:將收件者包含在map檔案中的郵件被分到指定郵箱。

1、recipient_bcc_maps和sender_bcc_maps的使用

# vi /etc/postfix/main.cf #增加下面兩行

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc

sender_bcc_maps = hash:/etc/postfix/sender_bcc

# cat sender_bcc

[email protected]       [email protected]

# cat recipient_bcc

[email protected]   [email protected]

#postmap /etc/postfix/sender_bcc

#postmap /etc/postfix/recipient_bcc

#/etc/init.d/postfix reload

2、always_bcc的使用方法

# vi /etc/postfix/main.cf #增加下面一行

always_bcc = [email protected]

#/etc/init.d/postfix reload

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


main.cf中與bcc有關的三個設定

 

參數含義

sender_bcc_maps通過 postfix 發送出去的郵件

recipient_bcc_maps通過 postfix 接收到的郵件

always_bcc通過 postfix 發送和接收的任何郵件。參數是單獨的 *一個* 郵件地址

 

注意:


如果設定了整個域的 bcc,又為域內的某個使用者單獨設定了 bcc,則只有域的 bcc 會生效。 

bcc 不支援多個地址,只能是單個地址。 

如何設定

如果你的postfix管理著多個郵件域,你希望將所有的進出郵件都轉寄到一個地址,使用always_bcc進行簡單配置就可以了。

編輯/etc/postfix/main.cf,加入

always_bcc = [email protected]

如果需要為不同的網域設定不同的轉寄地址,只針對個別使用者轉寄或只需要儲存接收信件,則只能使用sender_bcc_maps與recipient_bcc_maps了。

編輯/etc/postfix/main.cf,加入

sender_bcc_maps = hash:/etc/postfix/sender_bcc_maps

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps

 

然後建立/etc/postfix/sender_bcc_maps與/etc/postfix/recipient_bcc_maps

## 使用者##

#[email protected]    [email protected]

#[email protected]    [email protected]

## 全域##

#@a.org      [email protected]

#@b.org      [email protected]


根據你的需要,設定為全域或者單個使用者即可

編輯完成後需要產生hash db,否則postfix讀不到設定檔

postmap hash:/etc/postfix/sender_bcc_maps

postmap hash:/etc/postfix/recipient_bcc_maps

最後執行postfix reload重載設定檔,你的更改就生效了

PS:不要忘記將接收信箱的quota調大一些或者乾脆不設限額,否則信箱滿了後接踵而來的就是鋪天蓋地的退信。

===

可以建2個域 一個正常使用的域 一個歸檔的域, 名字相同網域名稱不同。批量處理帳號比較好操作


Postfix的bcc郵件備份

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.