Update iredmail-easy.best.practice.html.

This commit is contained in:
Zhang Huangbin 2020-02-10 23:28:16 +08:00
parent 63962112c3
commit dfbe2bf9ae
2 changed files with 45 additions and 18 deletions

View File

@ -400,10 +400,11 @@ link manually if you don't want to run another deployment.
#### Custom settings for official plugins
iRedMail Easy enables 2 official plugins by default:
iRedMail Easy enables 3 official plugins by default:
- `password`: used by end users to change their own passwords.
- `managesieve`: used by end users to custom mail filter rules.
- `markasjunk`: used by end users to report spam or ham.
If you have custom settings for plugins enabled by iRedMail Easy, please
put the custom settings in file
@ -413,29 +414,40 @@ For example:
- For `password` plugin: `/opt/iredmail/custom/roundcube/config_password.inc.php`
- For `managesieve` plugin: `/opt/iredmail/custom/roundcube/config_managesieve.inc.php`
- For `markasjunk` plugin: `/opt/iredmail/custom/roundcube/config_markasjunk.inc.php`
#### Custom settings for official plugins but not enabled by iRedMail
If you have custom settings for plugin which is not enabled by iRedMail
Easy, please append a line to
`/opt/www/roundcubemail/plugins/<plugin-name>/config.inc.php` like below:
Easy:
* Add shell commands like below in `/opt/iredmail/custom/roundcube/custom.sh`
(Note: replace `<plugin>` by the real plugin name):
```
require_once "/opt/iredmail/custom/roundcube/config_<plugin>.inc.php";
cd /opt/www/roundcubemail/plugins/<plugin>/
cp config.inc.php.dist config.inc.php
echo 'require_once "/opt/iredmail/custom/roundcube/config_<plugin>.inc.php";' >> config.inc.php
```
Then put all custom settings for this plugin to `/opt/iredmail/custom/roundcube/config_<plugin>.inc.php`.
* Create file `/opt/iredmail/custom/roundcube/config_<plugin>.inc.php` and
store all your custom settings in this file. __WARNING__: this file must be a
valid php file.
For example, if you have custom settings for official plugin `enigma`, you
should append this line to `/opt/www/roundcubemail/plugins/enigma/config.inc.php`:
should add shell commands like below in `/opt/iredmail/custom/roundcube/custom.sh`
```
require_once "/opt/iredmail/custom/roundcube/config_enigma.inc.php";
cd /opt/www/roundcubemail/plugins/engma/
cp config.inc.php.dist config.inc.php
echo 'require_once "/opt/iredmail/custom/roundcube/config_enigma.inc.php";' >> config.inc.php
```
Then put all custom settings for plugin `enigma` to
`/opt/iredmail/custom/roundcube/config_enigma.inc.php`.
This way if iRedMail Easy enables the plugin, it will successfully load
your own custom settings and not mess it up.
This way if iRedMail Easy enables this plugin in the future, it will
successfully load your own custom settings and not mess it up.
#### Custom skins

View File

@ -38,6 +38,7 @@
<li><a href="#custom-global-settings">Custom global settings</a></li>
<li><a href="#third-party-or-custom-plugins">Third-party or custom plugins</a></li>
<li><a href="#custom-settings-for-official-plugins">Custom settings for official plugins</a></li>
<li><a href="#custom-settings-for-official-plugins-but-not-enabled-by-iredmail">Custom settings for official plugins but not enabled by iRedMail</a></li>
<li><a href="#custom-skins">Custom skins</a></li>
</ul>
</li>
@ -509,10 +510,11 @@ touch main config file <code>/opt/www/roundcubemail/config/config.inc.php</code>
during iRedMail Easy deployment, but you need to create the symbol
link manually if you don't want to run another deployment.</p>
<h4 id="custom-settings-for-official-plugins">Custom settings for official plugins</h4>
<p>iRedMail Easy enables 2 official plugins by default:</p>
<p>iRedMail Easy enables 3 official plugins by default:</p>
<ul>
<li><code>password</code>: used by end users to change their own passwords.</li>
<li><code>managesieve</code>: used by end users to custom mail filter rules.</li>
<li><code>markasjunk</code>: used by end users to report spam or ham.</li>
</ul>
<p>If you have custom settings for plugins enabled by iRedMail Easy, please
put the custom settings in file
@ -521,23 +523,36 @@ put the custom settings in file
<ul>
<li>For <code>password</code> plugin: <code>/opt/iredmail/custom/roundcube/config_password.inc.php</code></li>
<li>For <code>managesieve</code> plugin: <code>/opt/iredmail/custom/roundcube/config_managesieve.inc.php</code></li>
<li>For <code>markasjunk</code> plugin: <code>/opt/iredmail/custom/roundcube/config_markasjunk.inc.php</code></li>
</ul>
<h4 id="custom-settings-for-official-plugins-but-not-enabled-by-iredmail">Custom settings for official plugins but not enabled by iRedMail</h4>
<p>If you have custom settings for plugin which is not enabled by iRedMail
Easy, please append a line to
<code>/opt/www/roundcubemail/plugins/&lt;plugin-name&gt;/config.inc.php</code> like below:</p>
<pre><code>require_once &quot;/opt/iredmail/custom/roundcube/config_&lt;plugin&gt;.inc.php&quot;;
Easy:</p>
<ul>
<li>Add shell commands like below in <code>/opt/iredmail/custom/roundcube/custom.sh</code>
(Note: replace <code>&lt;plugin&gt;</code> by the real plugin name):</li>
</ul>
<pre><code>cd /opt/www/roundcubemail/plugins/&lt;plugin&gt;/
cp config.inc.php.dist config.inc.php
echo 'require_once &quot;/opt/iredmail/custom/roundcube/config_&lt;plugin&gt;.inc.php&quot;;' &gt;&gt; config.inc.php
</code></pre>
<p>Then put all custom settings for this plugin to <code>/opt/iredmail/custom/roundcube/config_&lt;plugin&gt;.inc.php</code>.</p>
<ul>
<li>Create file <code>/opt/iredmail/custom/roundcube/config_&lt;plugin&gt;.inc.php</code> and
store all your custom settings in this file. <strong>WARNING</strong>: this file must be a
valid php file.</li>
</ul>
<p>For example, if you have custom settings for official plugin <code>enigma</code>, you
should append this line to <code>/opt/www/roundcubemail/plugins/enigma/config.inc.php</code>:</p>
<pre><code>require_once &quot;/opt/iredmail/custom/roundcube/config_enigma.inc.php&quot;;
should add shell commands like below in <code>/opt/iredmail/custom/roundcube/custom.sh</code></p>
<pre><code>cd /opt/www/roundcubemail/plugins/engma/
cp config.inc.php.dist config.inc.php
echo 'require_once &quot;/opt/iredmail/custom/roundcube/config_enigma.inc.php&quot;;' &gt;&gt; config.inc.php
</code></pre>
<p>Then put all custom settings for plugin <code>enigma</code> to
<code>/opt/iredmail/custom/roundcube/config_enigma.inc.php</code>.</p>
<p>This way if iRedMail Easy enables the plugin, it will successfully load
your own custom settings and not mess it up.</p>
<p>This way if iRedMail Easy enables this plugin in the future, it will
successfully load your own custom settings and not mess it up.</p>
<h4 id="custom-skins">Custom skins</h4>
<p>All third-party or custom skins should be placed under <strong><code>/opt/iredmail/custom/roundcube/skins/</code></strong>.</p>
<p>Skins will be linked to <code>/opt/www/roundcubemail/skins/</code> automatically