Network File System (NFS)

最近因為Mail server 使用NFS方式 mount nas ,
但是一直因為NFS server file lock,造成NFS client cyrus ioerror:
IOERROR: locking header for user.lani: Operation not supported

NFS Server and NFS Client OS 皆是FreeBSD
為了解此問題,所以查詢了一下NFS man page.

其實Frebsd NFS 針對 locking 說明:

If real locking between the NFS clients and NFS server is not required, it is possible to let the NFS client do locking locally by passing -L to mount_nfs(8). Refer to the mount_nfs(8) manual page for further details.

參考資料:
FreeBSD mount NFS file systems
mount_nfs -- mount NFS file systems
Red Hat Enterprise Linux Reference Guide Network File System

基本設定可參考此說明:
http://turtle.ee.ncku.edu.tw/~ac/FreeBSD/50_NFS/nfs.html
http://mgtcc.mgt.ncu.edu.tw/faq_in.php?op=Linux&oop=NFS.htm

Posted in 標籤: | 0 意見

BSD big5 to utf8

將 big5 的文字檔轉換為 utf8 的文字檔

Usage: iconv [-c] [-s] [-f fromcode] [-t tocode] [file ...]
or: iconv -l

iconv -l :顯示支援的字形

iconv -f BIG5 -t UTF-8 big5.txt > utf8.txt

Posted in 標籤: | 0 意見

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 意見