.設(shè)置所有的郵件用戶成為虛擬郵件域的用戶
我們推薦所有的郵件域都設(shè)置為虛擬郵件域。
配置選項(xiàng)
常用選項(xiàng)
(1)--enable-roaming-users=n|y Enable or dissable open relay after pop authentication.Default is no
配置這個(gè)選項(xiàng)為Yes意味著客戶端的IP地址是添加到一個(gè)IP地址列表中,用于允許用戶在他們的pop認(rèn)證通過(guò)以后利用smtp轉(zhuǎn)發(fā)信件。服務(wù)器端有一個(gè)cron job :clearopensmtp,會(huì)從這個(gè)IP 地址列表中清除認(rèn)證超過(guò)3個(gè)小時(shí)的IP地址。這個(gè)選項(xiàng)需要你以tcpserver的方式運(yùn)行smtp,并且提供-x /etc/tcp.smtp.cdb 參數(shù)(或者其它你放置tcp.smtp.cdb文件的路徑)。
(2)--enable-hardquota=#|n Set and Enable hard quota or n for no quota
為每個(gè)pop用戶設(shè)置磁盤(pán)配額的最大值(硬)。默認(rèn)值為50M。當(dāng)用戶的磁盤(pán)配額的最大值達(dá)到以后,所有新的發(fā)給用戶的郵件將會(huì)被退回,并附上一條信息。這條信息可以被自定義定制。假如你想關(guān)掉磁盤(pán)配額設(shè)置,可以設(shè)置這個(gè)值為:NOQUOTA,例如 --enable-hardquota=NOQUOTA
(3)--enable-default-domain=name Default domain name, default is null
我們推薦把所有的郵件以虛擬郵件域的方式運(yùn)行。你可以設(shè)置其中一個(gè)為缺省。如果你只有一個(gè)域,那么把它設(shè)置為缺省。缺省設(shè)置的郵件域的用戶可以直接用用戶名進(jìn)行認(rèn)證,即不需要使用用戶名%虛擬郵件域的格式。
(4)--enable-ip-alias-domains=y|n enable virutal domain lookup via reverse ip address lookup for virtual domains.
每個(gè)域缺省都使用基于虛擬郵件域的用戶名。也就是說(shuō):用戶必須提供包含所屬的域的名稱的用戶名,例如:用戶名 %虛擬郵件域。這也可以通過(guò)設(shè)置--enable-default-domain option來(lái)覆蓋這個(gè)規(guī)則。
Vpopmail也支持基于IP地址的虛擬郵件域。假如這個(gè)選項(xiàng)打開(kāi)后,而用戶沒(méi)有提供%,那么就會(huì)觸發(fā)一個(gè)對(duì)用戶連接的服務(wù)器的IP地址的反向查詢。如果服務(wù)器的IP地址能解析到一個(gè)域名,那么vpopmail使用那個(gè)域名做為郵件域。例如:
IP地址 w.x.y.z反向解析到test.com。用戶設(shè)置他們的pop服務(wù)器的IP地址為w.x.y.z 并開(kāi)始連接。vpopmail接收到這個(gè)連接,檢查連接的服務(wù)器端的IP地址。做一個(gè)IP地址的反向查詢從而獲得test.com這個(gè)域名。用戶發(fā)送joe作為他們的pop用戶名,vpopmail使用test.com作為域名。
你可以混合使用基于名稱和基于IP地址的形式的虛擬主機(jī)。
(5)--enable-relay-clear-minutes=360 expire time for roaming users after pop authentication.
如果設(shè)置了--enable-roamin-users=y 選項(xiàng),那么這個(gè)選項(xiàng)就設(shè)置了clearopensmtp應(yīng)該保留用戶的IP地址在列表中多長(zhǎng)時(shí)間。默認(rèn)值是3小時(shí)。
Mysql選項(xiàng)
(1)--enable-mysql=n|y use mysql, default is no
啟用mysql認(rèn)證方式。
注意:確認(rèn)編輯vmysql.h以及設(shè)置mysql 服務(wù)器名稱或者IP地址,mysql用戶和mysql用戶密碼。這個(gè)mysql用戶必須有創(chuàng)建vpopmail數(shù)據(jù)庫(kù)和在此數(shù)據(jù)庫(kù)里生成表的權(quán)限。
(2)--enable-sqlincdir= Directory where sql include files are.
設(shè)置mysql include文件的目錄位置。默認(rèn)值是設(shè)置為/usr/local/mysql。
(3)--enable-sqllibdir=/usr/lib/mysql Directory where sql libs are.
設(shè)置mysql libmysqlclient.a文件所在的目錄。默認(rèn)的會(huì)在/usr/lib/mysql中查找。
(4)--enable-sqllibs=mysqlclient libraries for sql linking.
設(shè)置連接的庫(kù)。默認(rèn)會(huì)是libmysqlclient.a
(5)--enable-large-site=n|y Default is no, tune for large numbers of users per domain
默認(rèn)的,vpopmail放置所有的域信息在一個(gè)vpopmail表中。這是維護(hù)很多郵件站點(diǎn)的最有效的方法。假如你在運(yùn)行一個(gè)有大量用戶的站點(diǎn),你也許會(huì)想設(shè)置這個(gè)選項(xiàng)為YES。假如設(shè)置為YES,vpopmail會(huì)為每個(gè)虛擬域生成一個(gè)表。主要的不同在于域名不存儲(chǔ)在數(shù)據(jù)庫(kù)中,因?yàn)楸砻擞蛎。?duì)有500,000+用戶的站點(diǎn)來(lái)說(shuō),這種設(shè)置可以節(jié)省非常有價(jià)值的硬盤(pán)空間。然而,對(duì)于有大量的郵件虛擬域的站點(diǎn)來(lái)說(shuō),這會(huì)導(dǎo)致mysql系統(tǒng)性能的降低。
Vpasswd/cdb 選項(xiàng)
(1)--enable-ucspi-dir=dir Directory where the compiled ucspi package is.
設(shè)置uspi-tcp包所在目錄。默認(rèn)設(shè)置為../ucspi-tcp-0.84。vpopmail使用在目錄中的headers以及兩個(gè).a文件。
Logging選項(xiàng)
(1)--enable-logging=e|y|n Turn on (y) or off (n) logging to syslog or (e) only log errors
設(shè)置日志紀(jì)錄的等級(jí)。默認(rèn)只記錄pop認(rèn)證錯(cuò)誤?梢酝ㄟ^(guò)設(shè)置此選項(xiàng)為no,以關(guān)閉所有日志記錄。也可以通過(guò)設(shè)置此選項(xiàng)為YES記錄所有的pop認(rèn)證。
(2)--enable-log-name=vpopmail set syslog name.
覆蓋默認(rèn)的vpopmail系統(tǒng)日志名稱。
User/group 選項(xiàng)
(1)--enable-vpopuser=vpopmail user vchkpw was installed as.
假如基于某個(gè)原因你希望用一個(gè)不同的用戶安裝這個(gè)軟件,那么使用這個(gè)選項(xiàng)。
(2)--enable-vpopgroup=vchkpw group vchkpw was installed as.
假如基于某個(gè)原因你希望用一個(gè)不同的組安裝這個(gè)軟件,那么使用這個(gè)選項(xiàng)。
(3)--enable-admin-email=email-address e-mail of system administrator.
覆蓋默認(rèn)的管理員郵件地址。
Directory and file location 選項(xiàng)
(1)--enable-tcpserver-file=/etc/tcp.smtp File where tcpserver -x relay information is stored.
設(shè)置你的tcp. smtp文件名。默認(rèn)的設(shè)置程序在/etc中查找,然后再在/etc/tcprules.d目錄查找。
(2)--enable-qmaildir=dir directory where qmail is installed.
假如在其它的目錄中安裝了qmail,而不是在/var/qmail,那么使用這個(gè)選項(xiàng)。
(3)--enable-tcprules-prog=/usr/local/bin/tcprules where is your tcprules program.
假如在其它的目錄中安裝了tcprules程序,而不是在/usr/local/bin,那么使用這個(gè)選項(xiàng)。
(4)--enable-apop-file=/etc/apop-secrets directory where apop secrerts are stored.
覆蓋默認(rèn)的apop-secrets文件的位置。
其它選項(xiàng)
(1)--enable-apop=y|n Enable or disable apop authentication.
通過(guò)設(shè)置這個(gè)選項(xiàng)為NO來(lái)禁用apop。默認(rèn)為YES(pop and apop)。
一旦vdelivermail起來(lái)后,它就會(huì)使用核心的vpopmail api 來(lái)檢查一個(gè)虛擬域用戶。如果用戶退出了,郵件將被投遞到他的目錄。如果vpopmail有hard quotas(默認(rèn)是50M的磁盤(pán)配額),然后,用戶的maildir/new郵件文件和Maildir/cur目錄都會(huì)被計(jì)算。如果用戶的磁盤(pán)配額使用完,郵件會(huì)被配回給發(fā)送方,并附上一個(gè)可以自定義的消息。如果新的郵件只有1K字節(jié)或者更小,那么不管配額是否使用完,仍會(huì)被投遞而不受磁盤(pán)配額的限制。所以系統(tǒng)管理程序一直能夠給用戶發(fā)送消息。
轉(zhuǎn)化現(xiàn)有用戶帳戶
轉(zhuǎn)化程序可以把郵件賬戶從一種格式轉(zhuǎn)化成另一種格式。轉(zhuǎn)化程序可以在/etc/passwd,vpasswd文件、mysql(小規(guī)模)和mysql(大規(guī)模)之間轉(zhuǎn)化。
現(xiàn)在大多數(shù)的vpopmail用戶也許比較感興趣怎樣轉(zhuǎn)化現(xiàn)有的域到mysql格式的域。轉(zhuǎn)化整個(gè)機(jī)器的用戶到mysql格式,使用以下命令:vconvert -c -s 。這將會(huì)檢查~vpopmail/domains目錄下的所有域,并讀取每一個(gè)vpasswd 文件并且加載獲得的內(nèi)容到mysql的vpopmail . vpopmail表中。而vpasswd文件基于安全的原因保持不改變。Vconvert也可以同時(shí)處理多個(gè)一個(gè)或多個(gè)域。這個(gè)可以通過(guò)運(yùn)行一下命令: vconvert c s domain1 domain2 ...來(lái)實(shí)現(xiàn)。
Security and pop server under tcpserver
加入所有的pop郵件帳戶都在虛擬域中,你通過(guò)使用tcpserver -u and -g options來(lái)指定使用vpopmail/vchkpw用戶和組來(lái)運(yùn)行pop服務(wù)器,以增加你的pop服務(wù)器的安全性。
vpopmail API
從版本3.4.10開(kāi)始,vpopmail建立了一個(gè)libvpopmail.a庫(kù),在~vpopmail/lib/下。連接這個(gè)庫(kù)到你的應(yīng)用程序?qū)⑻峁┑较旅娴腃函數(shù)的方法。相關(guān)的 header文件在~vpopmail/include下。
int vadddomain(char *domain)
domain=the new virtual domain
# 新的虛擬郵件域;
int vdeldomain(char *domain)
domain=virtual domain to delete
#刪除的虛擬郵件域;
int vadduser(char *user,char *domain ,char *password , int apop)
user=new user name
#新建的用戶名;
domain=virtual domain
#新建用戶的虛擬郵件域
password=clear text password
#明文密碼
apop=0 for pop and 1 for apop
#數(shù)字0 指定pop , 1 指定apop
int vdeluser(char *user, char *domain)
user=user to delete
#刪除的用戶
domain=virtual domain
#刪除用戶的虛擬郵件域
int vpasswd(char *user, char *domain, char *password)
user=user to change password for
#需要修改密碼的用戶名
domain=virtual domain
#修改密碼用戶所在的虛擬郵件域
password=clear text password
#明文密碼
int vsetuserquota(char *user, char *domain, char *quota)
user=user name to change quota for
#修改用戶磁盤(pán)配額的用戶名
domain=virtual domain
#需要修改磁盤(pán)配額的用戶所在虛擬郵件域
char=quota in bytes. M/m and K/k abbrieviations apply. 5M 5m and 500000 all equal 5 million bytes hard quota
#字節(jié)為單位的磁盤(pán)配額,5M 5m 以及500000全部等同于5百萬(wàn)字節(jié)的硬配額
vpopmail authentication API
int vauth_addomain(char *domain)
domain=domain name to add to authentication system
#添加到認(rèn)證系統(tǒng)的域名
int vauth_deldomain(char *domain)
domain=domain name to delete from authentication system
#從認(rèn)證系統(tǒng)刪除的域名
int vauth_adduser(char *user, char *domain, char *crypted_password, char *dir, int apop)
user=user to add from authentication system
#增加到認(rèn)證系統(tǒng)的用戶
domain=domain name
#域名
crypted_password=encrypted password
#加密密碼
dir=full path to directory where users Maildir is stored
#Maildir存儲(chǔ)的全路徑
apop=0 for POP and 1 for APOP
#數(shù)字0指定POP ,1 指定 APOP
int vauth_deluser(char *user, char *domain)
user=user to delete from authentication system
#從認(rèn)證系統(tǒng)刪除的用戶名
domain=domain name
#域名
int vauth_password(char *user, char *domain, char *crypted_password)
user=user to change password in authentication system
#在認(rèn)證系統(tǒng)中更改密碼的用戶
domain=domain name
#域名
crypted_password=the encrypted password
#加密密碼
int vauth_setquota(char *user, char *domain, char *quota)
user=user to set quota for in authentication system
#在認(rèn)證系統(tǒng)中設(shè)置配額的用戶
domain=domain name
#域名
quota=空間配額,字節(jié),或者使用 M/m K/k 衡量。5M=5m=5000000
struct *passwd vauth_getpw(char *user, char *domain)
user=user name to retrieve password entry from authentication system
#需要從認(rèn)證系統(tǒng)中重新獲得密碼的用戶名
domain=domain name
#域名
int vauth_setpw(struct *passwd, char *domain)
passwd=pointer to a passwd structure to store in authentication system .
#指向一個(gè)密碼結(jié)構(gòu)來(lái)存儲(chǔ)在認(rèn)證系統(tǒng)
domain=domain name for this passwd structure
#這個(gè)密碼結(jié)構(gòu)的域名
struct *vauth_user(char *user, char *domain, char *password, char *apop)
user=user name to authenticate
#認(rèn)證的用戶名
domain=domain name
#域名
password=clear text password
#明文密碼
apop=not used in version 3.4.10
#apop不在3.4.10版本中使用
struct *vauth_getall(char *domain, int first, int sort_it)
domain=domain name to retrieve password structure from authentication system
#需要從認(rèn)證系統(tǒng)中重新獲得密碼結(jié)構(gòu)的域名
first=1 to get first record, 0 = get next record
#數(shù)字1指定提取第一個(gè)紀(jì)錄,0指定提取下一個(gè)記錄
sort_it=1 to have the user list sorted alphabetically . This has no effect on vpasswd/cdb
method, since all users are added alphabetically. With mysql it adds an order by pw_name to
the query.
#數(shù)字1指定按照字母順序排列用戶列表。由于所有的用戶是按照字母順序添加的,所以,這個(gè)對(duì)vpasswd/cdb無(wú)效。
而mysql增加的順序由pw_name決定。作者: xmy 時(shí)間: 2003-09-17 22:33 標(biāo)題: vpopmail 管理員手冊(cè) 呵呵,有人翻譯了,加精留給大家看吧。作者: sunt 時(shí)間: 2003-09-19 14:09 標(biāo)題: vpopmail 管理員手冊(cè) 不錯(cuò),建議加精阿,可以讓更多的人來(lái)參考阿!作者: swingcoder 時(shí)間: 2003-09-19 14:23 標(biāo)題: vpopmail 管理員手冊(cè) 不錯(cuò)作者: super亮亮 時(shí)間: 2003-10-23 17:06 標(biāo)題: vpopmail 管理員手冊(cè) 辛苦了,確實(shí)是好東東! 作者: lanfox2006 時(shí)間: 2007-10-06 23:23
樓主,沒(méi)有個(gè)電子文檔嗎?
我想要,:wink:作者: linuxpf 時(shí)間: 2008-12-02 14:57
的確是個(gè)好東西!