当前位置:文档之家› webmailRoundcubemail搭建

webmailRoundcubemail搭建

webmailRound cubemail搭建/u2/73230/show ... _Roundcube RoundCube Web Mail是一个基于浏览器,支持多国语言的IMAP客户端,操作界面看起像一个桌面应用程序。

它提供一个e-mail客户端应该具备的所有功能包括MIME支持,地址薄,文件夹操作,信息搜索和拼写检查。

RoundCube Webmail采用PHP+Ajax开发并且需要MySQL数据库来存储数据。

用户界面采用XHTML+CSS2设计. 安装、配置Roundcube* 从Roundcubemail 的官方主页下载最新版本:注:刚把0.2的配置出来,就发现这两天刚出了0.2.1版。

不过方法都一样的。

/downloads* 下载后解压缩并设置正确的权限:Shell 命令:# tar zxvf roundcubemail-0.2.tar.gz # mv roundcubemail-0.2 /var/www/roundcubemail # chown -R root:root /var/www/roundcubemail/ # chown -R www-data:www-data /var/www/roundcubemail/{temp,logs} # chmod 777 /var/www/roundcubemail/{temp,logs} # chmod 0000 /var/www/roundcubemail-0.1/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING,installer}### 0000让其没有任何权限,可以不设置* 导入Roundcubemail 的数据库:Shell 命令:# mysql -uroot -p# 创建数据库:roundcubemail mysql> CREATE DATABASE roundcubemail DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;# 将数据库的权限给MySQL 的本地用户:roundcube。

请将这里的'your_passwd' 改为你需要的密码。

mysql> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY 'your_passwd';# 导入数据库表mysql> use roundcubemail;mysql> source /var/www/roundcubemail/SQL/mysql.initial.sqlmysql> flush privileges; * 为Roundcubemail 设置数据库信息:Shell 命令:# cd /var/www/roundcubemail/config/ # cp db.inc.php.dist db.inc.php # cp main.inc.php.dist main.inc.php在这里将db.inc.php文件里的db_dsnw的值设置为:文件:/var/www/roundcubemail/config/db.inc.php$rcmail_config['db_dsnw'] = 'mysql://roundcube:your_passwd@localhost/roundcubemail'; 其余参数可以参考:/wiki/Howto_Config配置main.inc.php:文件:/var/www/roundcubemail-0.1/config/main.inc.php# 默认的IMAP 服务器$rcmail_config['default_host'] = '127.0.0.1';# 默认的SMTP 服务器$rcmail_config['smtp_server'] = '127.0.0.1';$rcmail_config['smtp_user'] = '%u'; $rcmail_config['smtp_pass'] = '%p';# 自动创建目录$rcmail_config['create_default_folders'] = TRUE;# 默认的域名# 用户在登录的时候只需要输入'username' 即可,Roundcubemail 会自动为它加上# 'username_domain' 里指定的域名,所以用户名就变成:'username@'。

#$rcmail_config['username_domain'] = '';# 默认显示的界面语言。

可选用的值可以去该目录下找,目录名就是可选的值:# /var/www/roundcube-0.1/program/localization/ $rcmail_config['locale_string'] = 'zh_CN';# 设置默认的时区。

东八区$rcmail_config['timezone'] = 8;# 是否拼写检查$rcmail_config['enable_spellcheck'] = FALSE;* 为Roundcubemail 设置Apache 目录别名。

新建文件:/etc/apache2/sites-available/roundcubemail,内容为:文件:/etc/apache2/sites-available/roundcubemailNameVirtualHost *:80 <VirtualHost *:80> ServerName DocumentRoot /var/www/roundcubemail Options Indexes FollowSymLinks DirectoryIndex index.php </VirtualHost>Shell 命令:# ln -sv /etc/apache2/sites-available/roundcubemail /etc/apache2/sites-enabled/100-roundcubemail # apache2ctl restart这样就可以通过以下地址来访问Roundcube 了(任选其一即可):* http://ip/ * /补丁注:此补丁均为0.1.1版的,0.2版的需下载patch后进行修改。

修改密码、设置转发由于Roundcubemail-0.1.1 里没有提供让用户自行修改密码和设置邮件转发的功能,所以这里打一个补丁用于提供这两个功能。

注:在此特别感谢Jungle <at> gmail 帮忙制作了这个补丁。

* 下载补丁(注:该补丁只在Roundcubemail-0.1.1 stable 版本上测试通过,其它版本没有经过测试):Shell 命令:# cd /tmp/# wget -c /svn/trunk/rh ... ward.patch # wget -c /svn/trunk/rh ... kins.patch* 进入指定目录并打补丁(打补丁前一定要注意所在的目录):Shell 命令:# cd /var/www/roundcubemail-0.1.1/ # patch -p0 < /tmp/roundcubemail-0.1.1_chpwd_forward.patch# cd /var/www/roundcubemail-0.1.1/skins/default/ # patch -p0 < /tmp/roundcubemail-0.1.1_chpwd_forward_skins.patch* 由于roundcubemail 使用的是数据库'roundcubemail',用户是'roundcube@localhost',所以这里需要让'roundcube@localhost' 能够修改vmail.mailbox 这个表。

设置数据库权限:Shell 命令:# mysql -uroot -p mysql> GRANT UPDATE,SELECT ON vmail.mailbox TO roundcube@localhost; mysql> GRANT INSERT,UPDATE,SELECT ON vmail.alias TO roundcube@localhost; mysql> FLUSH PRIVILEGES; mysql> quit这样就可以在登录Roundcubemail 后,通过访问“系统设定”里的“密码”和“邮件转发”标签修改密码和设置转发了。

自动回复* 创建目录并设置正确的权限:Shell 命令:# mkdir /var/www/sieve/ # chown www-data:vmail /var/www/sieve/ # chmod 0770 /var/www/sieve/# 创建链接:# cd /var/www/roundcubemail-0.1.1/ # ln -s ../sieve/ sieve* 下载补丁:Shell 命令:# cd /tmp/ # wget /svn/trun ... tion.patch # wget /svn/trun ... ault.patch* 打补丁:Shell 命令:# cd /var/www/roundcubemail-0.1.1/ # patch -p0 < /tmp/roundcubemail-0.1.1_vacation.patch# cd /var/www/roundcubemail-0.1.1/skins/default/ # patch -p0 < /tmp/roundcubemail-0.1.1_vacation_skin_default.patch# 如果有default-labels 这个主题,也可以直接打补丁:# cd /var/www/roundcubemail-0.1.1/skins/default-labels/ # patch -p0 < /tmp/roundcubemail-0.1.1_vacation_skin_default.patch* 登录Roundcubemail,在“系统设定”里可以看到“自动回复”的标签。

相关主题