二、安装: 参照http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04 把发件、收件、防毒模块搭起来,后面的squirrelmail就不用安装了,然后从roundcube官方网站下载0.2-stable版本到/tmp下并执行命令: # tar zxvf roundcubemail-0.2-stable.tar.gz # mv roundcubemail-0.2-stable /var/www/roundcubemail.dst ---上面这条命令是把解压目录移到APACHE2的web主目录下。然后可参考其中的INSTALL文件操作。 # chown -R root:root /var/www/roundcubemail.dst # chown -R www-data:www-data /var/www/roundcubemail.dst/temp # chown -R www-data:www-data /var/www/roundcubemail.dst/logs # vim /etc/apache2/sites-available/roundcubemail
NameVirtualHost *:80 <VirtualHost *:80> ServerName mail.example.com DocumentRoot /var/www/roundcubemail.dst Options Indexes FollowSymLinks DirectoryIndex index.php </VirtualHost> # ln -sv /etc/apache2/sites-available/roundcubemail /etc/apache2/sites-enabled/100-roundcube # mkdir -p /var/lib/php/bin # cp /usr/sbin/authtest /var/bin/php/bin # cat > /var/bin/php/bin/mail_my <<EOF #!/bin/bash /usr/bin/mysql -umail_admin -pHua123wei mail <<SQL update users set password=trim(leading "{CRYPT}" from password) where email='$1'; SQL EOF # chmod u+s /var/lib/bin/authtest # chmod 755 /var/lib/bin/mail_my # vim /etc/php5/apach2/php.ini …… safe_mode_exec_dir = /var/lib/php/bin …… # apache2ctl restart 然后在浏览器中输入 http://mail.example.com/installer 或 http://localhost/installer 进行配置。注意DSN的格式,如果你用的mysql是4.0以上的版本,那么采用mysqli,否则采用mysql,我的是mysql 5.0,那么最终的串是: $rcmail_config['db_dsnw'] = 'mysqli://roundcube:123456@localhost/roundcubemail';其他的配置: $rcmail_config['default_charset'] = 'gbk'; $rcmail_config['language'] = 'zh_CN'; $rcmail_config['date_long'] = 'Y.m.d H:i'; 配 置完了(注意:配置过程中会形成两个配置文件的内容,把他们复制拷贝并分别保存到/var/www/roundcubemail.dst/config下 db.inc.php和main.inc.php),把目录/var/www/roundcubemail.dst/installer删除: # rm -rf /var/www/roundcubemail.dst/installer 然后从www.moodisk.com/download_other_c.php 下载补丁roundcube-0.2-stable.patch.bz2到/tmp下并执行: # cd /var/www/roundcubemail.dst # bzip2 -d /tmp/roundcube-0.2-stable.patch.bz2 # patch -p1 < /tmp/roundcube-0.2-stable.patch # patch -p1 < /tmp/roundcube-0.2-stable.patch