slickalpha/autoconfigsrv

Roundcube 插件,用于根据 RFC 6186 和 6764 获取主机和 webdav 的 DNS SRV 记录

安装次数: 37

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:roundcube-plugin

1.1 2020-06-10 05:53 UTC

This package is auto-updated.

Last update: 2024-09-15 21:12:39 UTC


README

Roundcube 插件,用于根据 RFC 6186 和 6764 获取主机和 webdav 的 DNS SRV 记录。欢迎提交 PR。

安装

手动安装

  1. 下载、解压,将 master 重命名为 'autoconfigsrv',并将其粘贴到 Roundcube 安装目录的 'plugins' 文件夹中。
  2. 在终端中浏览文件夹,并运行 'php composer.phar update' 下载依赖项。
  3. 更新 '/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

待办事项

  1. 更改 DNS 库或更新 pear 库。(以确保没有 DNS 获取请求失败)
  2. 使用权重和优先级处理多个条目(rfc2782)
  3. 检查主机是否为 FQDN
  4. 遵循 RFC 添加 pop3s 等