在Mailcow上使用roundcube网页客户端管理过滤规则
实在不喜欢自带的Sogo网页客户端,又笨又丑。自己就在外面搞了个docker的roundcube管理网页邮箱,依照docker配置好服务器信息,正常登陆都没啥问题。但是管理规则就不行了,就算添加了managesieve插件启动了,在log里面也是提示连接服务器localhost失败。看来根本没传送服务器配置过去,自己见了配置文件,自己手动在plugins/managesieve/里面复制一个配置文件改成conifg.inc.php,然后在里面添加上去sieve服务器内容再映射回去docker。
<?php // Managesieve server host (and optional port). Default: localhost. // Replacement variables supported in host name: // %h - user's IMAP hostname // %n - http hostname ($_SERVER['SERVER_NAME']) // %d - domain (http hostname without the first part) // For example %n = mail.domain.tld, %d = domain.tld // If port is omitted it will be determined automatically using getservbyname() // function, with 4190 as a fallback. // Note: Add tls:// prefix to enable explicit STARTTLS // or add ssl:// prefix to enable implicit SSL. $config['managesieve_host'] = 'tls://%h';
服务器记得使用'tls://%h',%h意思就是用你配置的IMAP服务器。这样子重新docker compose up,查看日志就看到可以正常连接4190的端口服务,用户可以在roundcube网页客户端修改邮件过滤规则了。
参考资料:
https://github.com/roundcube/roundcubemail/issues/7127
https://github.com/roundcube/roundcubemail/issues/9136
https://serverfault.com/questions/1148383/roundcube-unable-to-connect-to-managesieve-server
https://github.com/roundcube/roundcubemail/blob/master/plugins/managesieve/config.inc.php.dist
https://notes.sagredo.eu/en/qmail-notes-185/roundcube-plugins-35.html#sieve