Ubuntu安裝OpenWebMail 全過程

來源:互聯網
上載者:User

Webmail 是能讓您通過網頁瀏覽器任何地方,任意電腦上都可以瀏覽電子郵件的軟體。OpenWebMail 則是一個簡單、快速且流行的 Webmail 軟體包。本指南將使您能在您的伺服器上安裝 webmail,以便你在家裡和外面網路上都可以使用。

為了能在Ubuntu下正常運行,您必須首先要完成下列安裝:

1.sudo apt-get install openssh-server 安裝ssh便於操作;



--------------------------------------------------------------------------------

2.安裝samba

安裝samba(sudo apt-get install samba) ,smbclient(sudo apt-get install smbclient),smbfs(sudo apt-get install smbfs).

裝完以後配置smb.conf檔案(命令:sudo gedit /etc/samba/smb.conf),需要修改的幾個主要地方:

然後配置samba設定檔

sudo gedit /etc/samba/smb.conf

按照這個說明:

[global]

#WINDOWS 中顯示的工作群組

workgroup=workgroup

#windows中顯示的電腦名稱

netbios name=baileyking

#samba伺服器的介紹

server string=welcome

#驗證和登陸方式,有好多中,選share就不用設定使用者和密碼了

security=share

#在windows中顯示出來的目錄名

[download]

#設定共用目錄放在哪裡

path=/home/download

#是否可寫

wirteable=yes

#是否可瀏覽

browseable=yes

#匿名帳戶以guest使用者登陸

guest ok=yes

這個說明上的東西很多,其實需要自己改的就是把security=user那一行前的注釋符";"去掉,然後把user改為share。其它的內容都可以在“共用的檔案夾”

中自動設定。

設好後,通過sudo /etc/init.d/samba restart自行重啟。在Win下就可以看到並直接存取了。

添加共用可以在系統——系統管理——共用的檔案夾裡面設定,也可以直接編輯上面的smb.conf。

添加SMB帳戶。[http://ubuntuone.cn我直接用這個就行了,把帳戶加進去啊]

首先要添加一個Ubuntu帳戶 sudo adduser -a bunorte(這裡就是添加一個名為bunorte的帳戶,enter後要求輸入帳戶密碼。)

然後在把bunorte添加為smb帳戶 sudo smbpasswd -a bunorte(enter後要求輸入smb密碼,這個密碼是從別的電腦訪問時需要輸入的,可以跟上面的帳戶密碼不同)3.安裝dns

sudo apt-get install bind9

--------------------------------------------------------------------------------

4。要讓apache支援CGI程式

sudo apt-get install perl-suid


sudo apt-get install libapache2-mod-perl2

--------------------------------------------------------------------------------

5.開始安裝postfix

sudo apt-get install postfix

sudo apt-get install mailx(可在shell下用mail命令發送和接受郵件)

--------------------------------------------------------------------------------

6.安裝pop3協議軟體

sudo apt-get install courier-pop

sudo apt-get install courier-imap

--------------------------------------------------------------------------------

7.安裝apache

sudo apt-get install apache2

--------------------------------------------------------------------------------

8.下載openwebmail;

openwebmail-2.52.tar.gz 要去官網去下載 http://openwebmail.org/openwebmail/download/release/openwebmail-2.52.tar.gz

1.tar xzvf openwebmail-2.52.tar.gz

2. 將openwebmail解壓縮到/home/www目錄下,生產cgi-bin和data目錄

3. 將/var/www/cgi-bin/openwebmail/etc/default/auth_unix.conf拷貝到/etc目錄下,並修改

a. passwdfile_encrypted /etc/shadow

b. passwdmkdb none

4.在/var/www/cgi-bin/openwebmail/etc目錄下建立dbm.conf檔案,內容如下:

./etc/dbm.conf

dbm_ext .pag

dbmopen_ext none

dbmopen_haslock no

5.在/cgi-bin/openwebmail/etc目錄下修改openwebmail.conf檔案,內容如下:

a. mailspooldir /var/spool/mail

b. ow_cgidir /var/www/cgi-bin/openwebmail

c. ow_cgiurl /cgi-bin/openwebmail

d. ow_htmldir /var/www/data/openwebmail

e. ow_htmlurl /data/openwebmail

f. default_language zh_CN.GB2312

g. default_iconset Cool3D.Chinese.Simplified (顯示圖片,一定要正確,多個空格都不行。)

6.安裝sudo apt-get install perl-suid 

運行 /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

修改/cgi-bin/openwebmail/etc/sessionss屬性,增加寫入權限。

7.修訂認證機制:

[root@test root]# vi /var/www/cgi-bin/openwebmail/auth/auth_unix.pl

# 找到:

my $passwdfile_encrypted = $conf{passwdfile_encrypted} || /etc/master.passwd;

# 修改成:

my $passwdfile_encrypted = /etc/shadow;

不能修改密碼:

把下下面的代碼也改掉。

#my $passwdmkdb = $conf{passwdmkdb} || /usr/sbin/pwd_mkdb;

# 修改成:

my $passwdmkdb = none;

然後連到您的主機:http://hostname/cgi-bin/openwebmail/openwebmail.pl ,就能夠看到您的OpenWebmail 囉

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.