yellowsink/tls_icon_ys

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

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 5

Type:roundcube-plugin

2.0.5 2025-01-23 14:42 UTC

This package is auto-updated.

Last update: 2025-06-23 15:43:13 UTC


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.