slickalpha / autoconfigsrv
Roundcube 插件,用于根据 RFC 6186 和 6764 获取主机和 webdav 的 DNS SRV 记录
1.1
2020-06-10 05:53 UTC
Requires
- php: >=7.0
- roundcube/plugin-installer: >=0.1.3
Requires (Dev)
- pear-pear.php.net/net_dns: 1.0.7
This package is auto-updated.
Last update: 2024-09-15 21:12:39 UTC
README
Roundcube 插件,用于根据 RFC 6186 和 6764 获取主机和 webdav 的 DNS SRV 记录。欢迎提交 PR。
安装
手动安装
- 下载、解压,将 master 重命名为 'autoconfigsrv',并将其粘贴到 Roundcube 安装目录的 'plugins' 文件夹中。
- 在终端中浏览文件夹,并运行 'php composer.phar update' 下载依赖项。
- 更新 '/config/config.inc.php' 以包括插件,并按照以下配置额外选项。
配置
编辑位于 /config 目录下的 config.inc.php
文件
<?php // Enable plugin in config by adding the keyword to plugins array $config['plugins'] = array('autoconfigsrv'); // Set default hosts to autoconfigsrv. Use both or either one. $config['default_host'] = 'autoconfigsrv'; $config['smtp_server'] = 'autoconfigsrv'; // Set prefix for hosts; Default 'ssl' $config['autoconfigsrv_imap_host_prefix'] = 'ssl'; $config['autoconfigsrv_smtp_host_prefix'] = 'tls'; // Set regex to whitelist hosts fetched from SRV records $config['autoconfigsrv_host_regex'] = '(^[a-z0-9\.]*\.example\.com)$'; // Set true, to fetch SRV records from host domain's nameserver $config['autoconfigsrv_use_authoritative_ns'] = false; ?>
RFC 指南
RFC 6186 - https://tools.ietf.org/html/rfc6186
RFC 6764 - https://tools.ietf.org/html/rfc6764
待办事项
- 更改 DNS 库或更新 pear 库。(以确保没有 DNS 获取请求失败)
- 使用权重和优先级处理多个条目(rfc2782)
- 检查主机是否为 FQDN
- 遵循 RFC 添加 pop3s 等