yellowsink/tls_icon_ys 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yellowsink/tls_icon_ys

最新稳定版本:2.0.5

Composer 安装命令:

composer require yellowsink/tls_icon_ys

包简介

(Fork) Displays a small icon in Roundcube after the subject line that displays the (presumed) encryption state of received mails.

README 文档

README

Fork changes

In upstream, config.inc.php is ran every single time, overwriting your own config (at least with docker), so this fixes that. Also, this makes the tooltip look nicer.

Configuration for https://stalw.art:

<?php

$config['tls_icon'] = [
    'header_pattern' => 'by your.mail.server',
    'check_pattern' => 'using TLSv1\.[23]',
    'local_pattern' => '(local-hostname|127.0.0.1)',
    'tooltip_pattern' =>  '(using TLSv1.[23] [A-Z0-9-_ ]*)\)',
];

Original README

Displays a small icon after the subject line that displays the (presumed) encryption state of received mails.

  • Green lock: TLS1.2 or TLS1.3 with Details
  • Blue lock: Internal message from localhost
  • Red lock: No encryption

Supported languages:

  • English
  • Hungarian
  • German
  • Russian
  • Dutch

Configuration

Add the following lines to your config.php:

$config['tls_icon'] = [
    'header_pattern' => '(by <your.mail.server>|from \[127\.0\.0\.1\])',
    'check_pattern' => '\(using TLSv?(1\.[2-3])',
    'local_pattern' => '(mailcowdockerized-dovecot-mailcow-1|127.0.0.1)',
    'tooltip_pattern' =>  '\(using\s(.*?)\s',

];

and change the different patterns to match your mail server:

  • header_pattern: Pattern to match the last hop of the mail server (e.g. by mail.example.com)
  • check_pattern: Pattern to match the encryption state (e.g. using TLSv1.2)
  • local_pattern: Pattern to match the local mail server (e.g. 127.0.0.1)
  • tooltip_pattern: Pattern to match the encryption details. Use () to extract details. Tooltip uses the first match (e.g. ...(TLSv?1\.[2-3])...)

Changelog

v1.0.0

  • First release

v1.0.1

  • Some bugfix
  • Add Hungarian language

v1.0.2

  • Link bug fix

v1.0.3

  • Add IPv6 Support
  • Add Dutch Language

v2.0.0

  • Replaced icons
  • Improved pattern matching
  • Added tooltip for encrypted messages
  • Improved translations

Screenshots

Encrypted message

Encrypted message

Internal message

Internal message

Unencrypted message

Unencrypted message

Credits

Original plugin by oszto90 and fork from Takika. I renamed the plugin to match the plugin naming shema and add more pattern to support more mail servers.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-23