Exim Multidomain 測試二

The rewrite flag ``S'' specifies a rewrite of incoming envelope addresses at SMTP time, as soon as an address is received in a MAIL or RCPT command, and before any other processing

參考資料:
31.8. Flags specifying which headers and envelope addresses to rewrite
31.9. The SMTP-time rewriting flag

######################################################################
# REWRITE CONFIGURATION #
######################################################################

參數如下:
begin rewrite

\N^(.*)@(.*)$\N "${lookup mysql {SELECT pridomain FROM multidomaindb WHERE secdomain='$2'}{$1@$value}fail}" SE

S The SMTP-time rewriting flag
E rewrite all envelope fields

Posted in 標籤: | 0 意見

Exim Multidomain 測試一

建構想法:
1、不影嚮原主機架構
2、快速建置符合需求
3、決定使用rewrite方式

新增一個資料表 multidomain,新增兩欄位 Pridomain & Secdomain。

Pridomain:為主要Domain
Secdomain:為次要Domain 或第三筆、第四筆Domain

修改 Exim configure rewrite 區
######################################################################
# REWRITE CONFIGURATION #
######################################################################

參數如下:
begin rewrite
*@* "${lookup mysql {SELECT pridomain FROM multidomaindb WHERE secdomain='$2'}{$1@$value}fail}" Tbct

其中使用到 Tbct 表示意義如下:
T rewrite the envelope To field
b rewrite the Bcc: header
c rewrite the Cc: header
t rewrite the To: header

參數用意:
將進來的emailaddress,凡有第二筆Domain以上,皆置換為主要Domain後,送往後端主機。

測試結論,rewrite 在acl check之後,所以必須克服此問題。

Posted in 標籤: | 0 意見

Benchmark pop 、 smtp

# rabid:

./rabid
Usage: rabid [-r max-connections-per-minute] [-p processes] [-l local-address]
[-c messages-per-connection] [-a] [-i imap-percentage]
[-s ssl-percentage] [-d download-percentage[:delete-percentage]]
[-[z|Z] debug-file]
pop-server user-list-filename conversion-filename

./rabid -r 400 -c 100 127.0.0.1 users loqueseael
fichero users lo creareemos con: echo “username@oio.idv.tw password”

# postal:

./postal
Usage: postal [-m maximum-message-size] [-p processes] [-l local-address]
[-c messages-per-connection] [-r messages-per-minute] [-a]
[-b [no]netscape] [-[z|Z] debug-file]
[-s ssl-percentage]
smtp-server user-list-filename conversion-filename

Posted in 標籤: | 0 意見