[snappymail] More changes to use the word "extensions" rather than plugins/packages

This commit is contained in:
David Härdeman 2021-08-27 23:49:03 +02:00
parent 45662b39b0
commit 4e28a7bb7b
24 changed files with 58 additions and 50 deletions

View file

@ -1,4 +1,4 @@
This plugin, written by https://github.com/jas8522
This extension, written by https://github.com/jas8522
and optimised by
https://github.com/rhyswilliamsza
https://github.com/rhysit

View file

@ -1,14 +1,21 @@
What is it?
In essense, this plugin allows for multiple users across multiple servers to use one RainLoop installation,
all without the administrator needing to create each domain separately. This plugin detects the required
hostname from the inputted email address (for example, it would detect "example.com" as the hostname if
"info@example.com" is inputted). This hostname is then used for IMAP and SMTP communication.
In essense, this extension allows multiple users across multiple servers to
use one Snappymail installation without the administrator having to create
and configure individual domans.
This extension detects the required hostname from a given email address (for
example, it would use "example.com" as the hostname if a user would
log in as "info@example.com").
This hostname is then used for IMAP and SMTP communication.
How to Use:
1) Activate plugin
2) Visit Settings, and add a new wildcard domain "*"
3) Set your ports/ssl requirements as needed. These will not be changed by the plugin.
4) In the SMTP and/or IMAP host fields, place the single word "auto". This will be replaced when the plugin is active.
5) That's it! The plugin should now work!
1) Activate extension
2) Go to settings, and add a new wildcard domain "*"
3) Set your ports/TLS/SSL configuration as needed. These settings will not be
altered by the extension.
4) Set the SMTP and/or IMAP host fields to "auto", this field will then be
auto-configured.
5) That's it!

View file

@ -1,9 +1,10 @@
<?php
/**
* This plug-in automatically detects the IMAP and SMTP settings by extracting them from the email address itself.
* For example, user inputs: "info@example.com"
* This plugin sets the IMAP and SMTP host to "example.com" upon login, and then connects to it.
* This extension automatically detects the IMAP and SMTP settings by
* extracting them from the email address itself. For example, if the user
* attemps to login as "info@example.com", then the IMAP and SMTP host would
* be set to to "example.com".
*
* Based on:
* https://github.com/the-djmaze/snappymail/blob/master/plugins/override-smtp-credentials/index.php
@ -13,11 +14,11 @@
class AutoDomainGrabPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Auto Domain Selection',
VERSION = '2.1',
REQUIRED = '2.5.0',
CATEGORY = 'General',
DESCRIPTION = '';
DESCRIPTION = 'Sets the IMAP/SMTP host based on the user\'s login';
private $imap_prefix = "mail.";
private $smtp_prefix = "mail.";

View file

@ -3,12 +3,12 @@
class BlackListPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Black list',
NAME = 'Blacklist',
VERSION = '2.1',
RELEASE = '2021-04-21',
REQUIRED = '2.5.0',
CATEGORY = 'Login',
DESCRIPTION = 'Simple black list plugin (with wildcard and exceptions functionality).';
DESCRIPTION = 'Simple blacklist extension (with wildcard and exceptions functionality).';
public function Init() : void
{

View file

@ -10,7 +10,7 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
RELEASE = '2021-07-20',
REQUIRED = '2.5.0',
CATEGORY = 'Security',
DESCRIPTION = 'This plugin allows you to change passwords of email accounts';
DESCRIPTION = 'Extension to allow users to change their passwords';
// \RainLoop\Notifications\
const

View file

@ -3,9 +3,9 @@
class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Change SMTP EHLO Message',
CATEGORY = 'General',
DESCRIPTION = '';
DESCRIPTION = 'Extension to enable custom SMTP EHLO messages';
public function Init() : void
{

View file

@ -3,9 +3,9 @@
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Custom Contacts Suggestions Example',
CATEGORY = 'General',
DESCRIPTION = '';
DESCRIPTION = 'Custom contacts suggestions example';
public function Init() : void
{

View file

@ -3,9 +3,9 @@
class CustomAdminSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Custom Admin Settings',
CATEGORY = 'General',
DESCRIPTION = '';
DESCRIPTION = 'Custom admin settings example';
/**
* @return void

View file

@ -1,4 +1,4 @@
[SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN]
TAB_NAME = "Custom Plugin Tab"
LEGEND_CUSTOM = "Custom Plugin Tab (Example)"
LABEL_PHP_VERSION = "PHP version"
TAB_NAME = "Custom Extension Tab"
LEGEND_CUSTOM = "Custom Extension Tab (Example)"
LABEL_PHP_VERSION = "PHP version"

View file

@ -3,11 +3,11 @@
class CustomAuthExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Custom Auth Example Extension',
VERSION = '2.1',
REQUIRED = '2.5.0',
CATEGORY = 'Login',
DESCRIPTION = '';
DESCRIPTION = 'Custom auth mechanism example';
public function Init() : void
{

View file

@ -8,7 +8,7 @@ class CustomLoginMappingPlugin extends \RainLoop\Plugins\AbstractPlugin
RELEASE = '2021-04-21',
REQUIRED = '2.5.0',
CATEGORY = 'Login',
DESCRIPTION = 'Plugin which allows you to set up custom username by email address.';
DESCRIPTION = 'Enables custom usernames by email address.';
public function Init() : void
{

View file

@ -3,9 +3,9 @@
class CustomSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Custom Settings Tab',
CATEGORY = 'General',
DESCRIPTION = '';
DESCRIPTION = 'Example extension for custom settings tabs';
/**
* @return void

View file

@ -1,6 +1,6 @@
[SETTINGS_CUSTOM_PLUGIN]
TAB_NAME = "Custom Plugin"
LEGEND_CUSTOM = "Custom Plugin (Example)"
TAB_NAME = "Custom Extension"
LEGEND_CUSTOM = "Custom Extension (Example)"
LABEL_SKYPE = "Skype"
LABEL_FACEBOOK = "Facebook"
BUTTON_SAVE = "Save"
BUTTON_SAVE = "Save"

View file

@ -3,7 +3,7 @@
class CustomSystemFoldersPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Custom System Folders',
CATEGORY = 'General',
DESCRIPTION = 'Set custom sytem folders';

View file

@ -3,9 +3,9 @@
class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Demo Account Extension',
CATEGORY = 'Login',
DESCRIPTION = '';
DESCRIPTION = 'Extension to enable a demo account';
/**
* @return void

View file

@ -6,7 +6,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
NAME = 'Contacts suggestions (LDAP)',
VERSION = '2.1',
CATEGORY = 'Security',
DESCRIPTION = 'Plugin to get contacts suggestions from LDAP.';
DESCRIPTION = 'Get contacts suggestions from LDAP.';
public function Init() : void
{
@ -20,7 +20,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
{
if (!\function_exists('ldap_connect'))
{
return 'The LDAP PHP extension must be installed to use this plugin';
return 'The LDAP PHP extension must be installed to use this extension';
}
return '';

View file

@ -40,7 +40,7 @@ class LdapIdentities implements IIdentities
// Check if LDAP is available
if (!extension_loaded('ldap') || !function_exists('ldap_connect')) {
$this->ldapAvailable = false;
$logger->Write("The LDAP plugin is not available!", Type::WARNING, self::LOG_KEY);
$logger->Write("The LDAP extension is not available!", Type::WARNING, self::LOG_KEY);
return;
}

View file

@ -14,7 +14,7 @@ class LdapIdentitiesPlugin extends AbstractPlugin
RELEASE = '2020-11-11',
REQUIRED = '2.1.0',
CATEGORY = 'Accounts',
DESCRIPTION = 'Plugin that adds functionality to import account identities from LDAP.';
DESCRIPTION = 'Adds functionality to import account identities from LDAP.';
public function __construct()
{

View file

@ -8,7 +8,7 @@ class LoginRegisterPlugin extends \RainLoop\Plugins\AbstractPlugin
RELEASE = '2021-06-01',
REQUIRED = '2.5.2',
CATEGORY = 'Login',
DESCRIPTION = 'Links on login screen for registration and forgot password';
DESCRIPTION = 'Links on login screen for registration and forgotten password';
public function Init() : void
{

View file

@ -3,12 +3,12 @@
class OverrideSmtpCredentialsPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Override Smtp Credentials',
NAME = 'Override SMTP Credentials',
VERSION = '2.1',
RELEASE = '2021-04-21',
REQUIRED = '2.5.0',
CATEGORY = 'Filters',
DESCRIPTION = 'Plugin which allows you to override smtp credentials specified users.';
DESCRIPTION = 'Override SMTP credentials for specific users.';
public function Init() : void
{

View file

@ -3,7 +3,7 @@
class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = '',
NAME = 'Proxy Auth Login Example',
VERSION = '2.1',
REQUIRED = '2.5.0',
CATEGORY = 'General',

View file

@ -6,7 +6,7 @@ class SnowfallOnLoginScreenPlugin extends \RainLoop\Plugins\AbstractPlugin
NAME = 'Snowfall on login screen',
VERSION = '2.0',
CATEGORY = 'Fun',
DESCRIPTION = 'Snowfall on login screen plugin (just for fun).';
DESCRIPTION = 'Snowfall on login screen (just for fun).';
public function Init() : void
{

View file

@ -10,7 +10,7 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
RELEASE = '2021-07-28',
REQUIRED = '2.6.0',
CATEGORY = 'Login',
DESCRIPTION = 'This plugin allows you to have TOTP 2FA';
DESCRIPTION = 'Provides support for TOTP 2FA';
public function Init() : void
{

View file

@ -3,12 +3,12 @@
class WhiteListPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'White list',
NAME = 'Whitelist',
VERSION = '2.1',
RELEASE = '2021-04-21',
REQUIRED = '2.5.0',
CATEGORY = 'Login',
DESCRIPTION = 'Simple white list plugin (with wildcard and exceptions functionality).';
DESCRIPTION = 'Simple login whitelist (with wildcard and exceptions functionality).';
public function Init() : void
{