WebMail: roundcube的组建

    技术2022-05-11  2

    组建:Ubuntu server 8.04 + Apache2 + Postfix + Courier + Mysql + Roundcube + Saslauth 一、点评:     本人参照网文 http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04 组 建了一个邮件系统,这篇文章写得非常好,组建的邮件系统功能涵盖了收、发、容量控制、病毒过滤等,可以说是一个完整的企业邮件系统,但采用的 webmail即squirrelmail不行,界面非常难看,而且汉化不全,功能很少。经过网上一番搜索后决定更换成roundcube,该 webmail工具界面非常漂亮,采用PHP开发语言,只是多种语言,中文支持非常完美。安装过程一波三折,整整耗费了我一天半时间,最终还是被我搞定 了,且制作了修改密码的补丁(原始版本没有修改邮件密码的功能)。先看看两张截图:

    二、安装:    参照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


    最新回复(0)