标签 roundcube 下的文章

在 iredmail 1.7.1 - roundcube 1.6.8 里安装 kolab calendar 3.5.11

环境:

  • debian 12
  • iredmail 1.7.1 - roundcube 1.6.8 - kolab calendar 3.5.11

步骤:

  1. apt install git # 安装 git
  2. cd /opt/www && git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git # 转到 /opt/www 目录,并下载 kolab 的相关文件
  3. chown -R www-data:www-data roundcubemail-plugins-kolab/ # 给 www-data 用户权限
  4. cd /opt/www/roundcubemail/plugins/ # 转到 roundcube 插件目录
  5. cp -a /opt/www/roundcubemail-plugins-kolab/plugins/calendar ./ # 复制 calendar 插件文件
  6. cp -a /opt/www/roundcubemail-plugins-kolab/plugins/libcalendaring ./ # 复制 libcalendaring 插件文件
  7. cp -a /opt/www/roundcubemail-plugins-kolab/plugins/libkolab ./ # 复制 libkolab 插件文件
  8. cp calendar/config.inc.php.dist calendar/config.inc.php # 创建配置文件
  9. vi calendar/config.inc.php # 修改配置文件内容,如将 calendar_caldav_url 设置为有效的 caldav 服务器访问域名;设置 calendar_caldav_url 具体的 日历 URL 地址
  10. cd /opt/www/ # 转到 www 目录
  11. curl -s https://getcomposer.org/installer | php # 获取 composer
  12. cd /opt/www/roundcubemail # 转到 roundcube 目录
  13. sudo -u www-data bin/initdb.sh --dir=plugins/calendar/drivers/caldav/SQL && sudo -u www-data bin/initdb.sh --dir=plugins/libkolab/SQL # 初始化数据库
  14. apt install node-less # 安装 node-less 软件
  15. sudo -u www-data lessc --relative-urls -x plugins/libkolab/skins/elastic/libkolab.less > plugins/libkolab/skins/elastic/libkolab.min.css # 生成 css 文件
  16. apt install php-ldap # 安装 ldap 扩展
  17. sudo -u www-data php /opt/www/composer.phar require "sabre/vobject" "~4.5.1" # 安装 sabre/vobject
  18. sudo -u www-data php /opt/www/composer.phar require "pear/http_request2" "~2.5.0" # 安装 pear/http_request2
  19. vi config/config.inc.php # 编辑 roundcube 配置文件,在插件配置中,加上 calendar

问题:用 baikal 架设的 caldav 服务器,无法直接在 calendar 中使用。例如,保存不了事件,提示 Faild to save changs。 syslog 提示 PHP Error: DAV Error (405) 。未完成用户鉴权验证吗?
回答:请尝试在 baikal 里配置使用 IMAP 验证。

参考:

roundcube 用户端的 calendar 界面

roundcube 的“关于”页面信息显示内容

roundcube 日历 中的事件

thunderbird 雷鸟 客户端连接上 日历

安装 kolab 提供的 roundcube 插件

https://git.kolab.org/diffusion/RPK/browse/master/plugins/

用 roudcube webmail 的 password plugin 更改密码后 postfix 报错 SQL prepare failed: disk I/O error

环境:服务端是 postfix + sqlite3 ,当 roundcube webmail 配置了 password 插件后,用户能更改密码,但之后 postfix 报错,错误信息是 SQL prepare failed: disk I/O error 。影响的结果是,收不了邮件。

原因:roundcube 的 sqlite 连接配置时,使用了 PRAGMA journal_mode = WAL ,但 postfix 不支持。

尝试:可将 sqlite 的 journal_mode 更改回原来的 delete 。如在Linux里执行命令: sqlite3 /var/vmail/postfixadmin.db 'PRAGMA journal_mode=delete;'

# sqlite3 /var/vmail/postfixadmin.db
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite> PRAGMA journal_mode;
delete

参考:

Roundcube - Server Error: UID COPY: The folder could not be found - create_default_folders

问题:在 Windows 里尝试安装 Roundcube Webmail ,但在用户登录后作邮件删除操作时,会提示错误:Server Error: UID COPY: The folder could not be found

解决:在 Roundcube 的 config.php 配置文件中,新增一行 $config['create_default_folders'] = true; 即可。

参考:https://www.roundcubeforum.net/index.php?topic=22955.0

roundcube 菜单定制 禁用功能

https://local2.anqun.org/mail/?_task=settings&_action=plugin.password

// don't allow these settings to be overridden by the user
$config['dont_override'] = [];

// List of disabled UI elements/actions
$config['disabled_actions'] = [];

https://local2.anqun.org/mail/?_task=settings&_action=plugin.password
https://local2.anqun.org/mail/?_task=addressbook&_source=1

'mail.delete', 'mail.copy', 'mail.move', 'mail.mark', 'mail.send', 'mail.sendmdn', 'mail.import',

./program/js/app.js:1942
['show', 'reply', 'reply-all', 'reply-list', 'move', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'bounce', 'print', 'load-attachment', 'download-attachment', 'show-headers', 'hide-headers', 'download', 'forward', 'forward-inline', 'forward-attachment', 'change-format']

class="about" innerClass="inner" onclick="UI.about_dialog(this)" />
<roundcube:button command="compose" type="link" class="compose"

config.dark_mode_support: false
https://github.com/roundcube/roundcubemail/blob/master/skins/elastic/meta.json
"dark_mode_support": true,

POST /mail/?_task=mail&_action=expunge HTTP/2.0" 
POST /mail/ HTTP/2.0" 200 651 "https://local2.anqun.org/mail/?_task=settings&_action=add-folder&
'settings.add-folder', 'settings.preferences','settings.identities','settings.responses',

192.168.1.7 - - [15/Jul/2023:16:17:59 +0800] "GET /mail/?_task=mail&_action=getunread&_page=1&_remote=1&_unlock=0&_=1689409079167 HTTP/2.0" 200 99 "https://local2.anqun.org/mail/?_task=mail&_mbox=Trash
?_task=mail&_mbox=Trash"  folder can not be found

mail._mbox=Trash

dovecot
https://forum.vestacp.com/viewtopic.php?t=11948

<!-- folders list -->
<div id="layout-sidebar" class="listbox" role="navigation" aria-labelledby="aria-label-folderlist">
        <div class="header">
                <a class="button icon back-list-button" href="#back"><span class="inner"><roundcube:label name="back" /></span></a>
                <span class="header-title username"><roundcube:object name="username" /></span>
                <roundcube:button name="folderactions" type="link" title="folderactions" label="actions"
                        class="button icon sidebar-menu" innerclass="inner" data-popup="mailboxoptions-menu" />

1. templates/mail.html
2. /templates/includes/mail-menu.html:2:<div id="mailtoolbar" class="toolbar menu" role="toolbar">
./templates/includes/mail-menu.html:28: <roundcube:container name="toolbar" id="mailtoolbar" />
3. vi /opt/www/roundcubemail/config/config.inc.php
// PLUGINS
// $config['plugins'] = array('managesieve', 'password', 'zipdownload');

// List of disabled UI elements/actions
$config['disabled_actions'] = ['settings', 'addressbook','mail.compose', 'mail.delete', 'mail.copy', 'mail.move', 'mail.mark', 'mail.send', 'mail.sendmdn', 'mail.import','mail.reply', 'mail.reply-all', 'mail.reply-list', 'mail.flagged', 'mail.reply', 'mail.reply-all', 'mail.reply-list', 'mail.move', 'mail.copy', 'mail.delete', 'mail.open', 'mail.mark', 'mail.edit', 'mail.viewsource', 'mail.bounce', 'mail.print', 'mail.load-attachment', 'mail.forward', 'mail.forward-inline', 'mail.forward-attachment', 'about', 'mail.expunge', 'mail.purge', 'mail.folders', 'settings.add-folder','settings.folders','settings.preferences','settings.identities','settings.responses','settings.compose','mail.import-messages'];

// automatically create the above listed default folders on user login
$config['create_default_folders'] = false;

// protect the default folders from renames, deletes, and subscription changes
$config['protect_default_folders'] = false;

https://github.com/roundcube/roundcubemail/blob/3b6c06f697eca916d5756795461a8eea4e397cd2/config/defaults.inc.php