mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
[snappymail] More changes to use the word "extensions" rather than plugins/packages
This commit is contained in:
parent
45662b39b0
commit
4e28a7bb7b
24 changed files with 58 additions and 50 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
This plugin, written by https://github.com/jas8522
|
This extension, written by https://github.com/jas8522
|
||||||
and optimised by
|
and optimised by
|
||||||
https://github.com/rhyswilliamsza
|
https://github.com/rhyswilliamsza
|
||||||
https://github.com/rhysit
|
https://github.com/rhysit
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,21 @@
|
||||||
What is it?
|
What is it?
|
||||||
|
|
||||||
In essense, this plugin allows for multiple users across multiple servers to use one RainLoop installation,
|
In essense, this extension allows multiple users across multiple servers to
|
||||||
all without the administrator needing to create each domain separately. This plugin detects the required
|
use one Snappymail installation without the administrator having to create
|
||||||
hostname from the inputted email address (for example, it would detect "example.com" as the hostname if
|
and configure individual domans.
|
||||||
"info@example.com" is inputted). This hostname is then used for IMAP and SMTP communication.
|
|
||||||
|
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:
|
How to Use:
|
||||||
|
|
||||||
1) Activate plugin
|
1) Activate extension
|
||||||
2) Visit Settings, and add a new wildcard domain "*"
|
2) Go to settings, and add a new wildcard domain "*"
|
||||||
3) Set your ports/ssl requirements as needed. These will not be changed by the plugin.
|
3) Set your ports/TLS/SSL configuration as needed. These settings will not be
|
||||||
4) In the SMTP and/or IMAP host fields, place the single word "auto". This will be replaced when the plugin is active.
|
altered by the extension.
|
||||||
5) That's it! The plugin should now work!
|
4) Set the SMTP and/or IMAP host fields to "auto", this field will then be
|
||||||
|
auto-configured.
|
||||||
|
5) That's it!
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This plug-in automatically detects the IMAP and SMTP settings by extracting them from the email address itself.
|
* This extension automatically detects the IMAP and SMTP settings by
|
||||||
* For example, user inputs: "info@example.com"
|
* extracting them from the email address itself. For example, if the user
|
||||||
* This plugin sets the IMAP and SMTP host to "example.com" upon login, and then connects to it.
|
* attemps to login as "info@example.com", then the IMAP and SMTP host would
|
||||||
|
* be set to to "example.com".
|
||||||
*
|
*
|
||||||
* Based on:
|
* Based on:
|
||||||
* https://github.com/the-djmaze/snappymail/blob/master/plugins/override-smtp-credentials/index.php
|
* https://github.com/the-djmaze/snappymail/blob/master/plugins/override-smtp-credentials/index.php
|
||||||
|
|
@ -13,11 +14,11 @@
|
||||||
class AutoDomainGrabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class AutoDomainGrabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Auto Domain Selection',
|
||||||
VERSION = '2.1',
|
VERSION = '2.1',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Sets the IMAP/SMTP host based on the user\'s login';
|
||||||
|
|
||||||
private $imap_prefix = "mail.";
|
private $imap_prefix = "mail.";
|
||||||
private $smtp_prefix = "mail.";
|
private $smtp_prefix = "mail.";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class BlackListPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-04-21',
|
RELEASE = '2021-04-21',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Login',
|
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
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-07-20',
|
RELEASE = '2021-07-20',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Security',
|
CATEGORY = 'Security',
|
||||||
DESCRIPTION = 'This plugin allows you to change passwords of email accounts';
|
DESCRIPTION = 'Extension to allow users to change their passwords';
|
||||||
|
|
||||||
// \RainLoop\Notifications\
|
// \RainLoop\Notifications\
|
||||||
const
|
const
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
|
class ChangeSmtpEhloMessagePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Change SMTP EHLO Message',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Extension to enable custom SMTP EHLO messages';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
class ContactsSuggestionsExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Custom Contacts Suggestions Example',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Custom contacts suggestions example';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
class CustomAdminSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class CustomAdminSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Custom Admin Settings',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Custom admin settings example';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN]
|
[SETTINGS_CUSTOM_ADMIN_CUSTOM_TAB_PLUGIN]
|
||||||
TAB_NAME = "Custom Plugin Tab"
|
TAB_NAME = "Custom Extension Tab"
|
||||||
LEGEND_CUSTOM = "Custom Plugin Tab (Example)"
|
LEGEND_CUSTOM = "Custom Extension Tab (Example)"
|
||||||
LABEL_PHP_VERSION = "PHP version"
|
LABEL_PHP_VERSION = "PHP version"
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
class CustomAuthExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
class CustomAuthExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Custom Auth Example Extension',
|
||||||
VERSION = '2.1',
|
VERSION = '2.1',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Login',
|
CATEGORY = 'Login',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Custom auth mechanism example';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class CustomLoginMappingPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-04-21',
|
RELEASE = '2021-04-21',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Login',
|
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
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
class CustomSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class CustomSettingsTabPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Custom Settings Tab',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Example extension for custom settings tabs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[SETTINGS_CUSTOM_PLUGIN]
|
[SETTINGS_CUSTOM_PLUGIN]
|
||||||
TAB_NAME = "Custom Plugin"
|
TAB_NAME = "Custom Extension"
|
||||||
LEGEND_CUSTOM = "Custom Plugin (Example)"
|
LEGEND_CUSTOM = "Custom Extension (Example)"
|
||||||
LABEL_SKYPE = "Skype"
|
LABEL_SKYPE = "Skype"
|
||||||
LABEL_FACEBOOK = "Facebook"
|
LABEL_FACEBOOK = "Facebook"
|
||||||
BUTTON_SAVE = "Save"
|
BUTTON_SAVE = "Save"
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
class CustomSystemFoldersPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class CustomSystemFoldersPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Custom System Folders',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
DESCRIPTION = 'Set custom sytem folders';
|
DESCRIPTION = 'Set custom sytem folders';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class DemoAccountPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Demo Account Extension',
|
||||||
CATEGORY = 'Login',
|
CATEGORY = 'Login',
|
||||||
DESCRIPTION = '';
|
DESCRIPTION = 'Extension to enable a demo account';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
NAME = 'Contacts suggestions (LDAP)',
|
NAME = 'Contacts suggestions (LDAP)',
|
||||||
VERSION = '2.1',
|
VERSION = '2.1',
|
||||||
CATEGORY = 'Security',
|
CATEGORY = 'Security',
|
||||||
DESCRIPTION = 'Plugin to get contacts suggestions from LDAP.';
|
DESCRIPTION = 'Get contacts suggestions from LDAP.';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
@ -20,7 +20,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
if (!\function_exists('ldap_connect'))
|
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 '';
|
return '';
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class LdapIdentities implements IIdentities
|
||||||
// Check if LDAP is available
|
// Check if LDAP is available
|
||||||
if (!extension_loaded('ldap') || !function_exists('ldap_connect')) {
|
if (!extension_loaded('ldap') || !function_exists('ldap_connect')) {
|
||||||
$this->ldapAvailable = false;
|
$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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class LdapIdentitiesPlugin extends AbstractPlugin
|
||||||
RELEASE = '2020-11-11',
|
RELEASE = '2020-11-11',
|
||||||
REQUIRED = '2.1.0',
|
REQUIRED = '2.1.0',
|
||||||
CATEGORY = 'Accounts',
|
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()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class LoginRegisterPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-06-01',
|
RELEASE = '2021-06-01',
|
||||||
REQUIRED = '2.5.2',
|
REQUIRED = '2.5.2',
|
||||||
CATEGORY = 'Login',
|
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
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
class OverrideSmtpCredentialsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
class OverrideSmtpCredentialsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = 'Override Smtp Credentials',
|
NAME = 'Override SMTP Credentials',
|
||||||
VERSION = '2.1',
|
VERSION = '2.1',
|
||||||
RELEASE = '2021-04-21',
|
RELEASE = '2021-04-21',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Filters',
|
CATEGORY = 'Filters',
|
||||||
DESCRIPTION = 'Plugin which allows you to override smtp credentials specified users.';
|
DESCRIPTION = 'Override SMTP credentials for specific users.';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = '',
|
NAME = 'Proxy Auth Login Example',
|
||||||
VERSION = '2.1',
|
VERSION = '2.1',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'General',
|
CATEGORY = 'General',
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class SnowfallOnLoginScreenPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
NAME = 'Snowfall on login screen',
|
NAME = 'Snowfall on login screen',
|
||||||
VERSION = '2.0',
|
VERSION = '2.0',
|
||||||
CATEGORY = 'Fun',
|
CATEGORY = 'Fun',
|
||||||
DESCRIPTION = 'Snowfall on login screen plugin (just for fun).';
|
DESCRIPTION = 'Snowfall on login screen (just for fun).';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-07-28',
|
RELEASE = '2021-07-28',
|
||||||
REQUIRED = '2.6.0',
|
REQUIRED = '2.6.0',
|
||||||
CATEGORY = 'Login',
|
CATEGORY = 'Login',
|
||||||
DESCRIPTION = 'This plugin allows you to have TOTP 2FA';
|
DESCRIPTION = 'Provides support for TOTP 2FA';
|
||||||
|
|
||||||
public function Init() : void
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class WhiteListPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
RELEASE = '2021-04-21',
|
RELEASE = '2021-04-21',
|
||||||
REQUIRED = '2.5.0',
|
REQUIRED = '2.5.0',
|
||||||
CATEGORY = 'Login',
|
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
|
public function Init() : void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue