<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.2clever.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rdswikiadmin</id>
	<title>Realm Business Systems - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.2clever.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rdswikiadmin"/>
	<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Special:Contributions/Rdswikiadmin"/>
	<updated>2026-05-01T07:30:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_DB_Command&amp;diff=108</id>
		<title>SMEServer DB Command</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_DB_Command&amp;diff=108"/>
		<updated>2026-04-03T10:23:36Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;copied from; https://wiki.koozali.org/Db_command_tutorial#Signal-event (This page was last edited on 5 March 2022, at 19:31.)  ==db command tutorial==  The &amp;#039;&amp;#039;&amp;#039;db&amp;#039;&amp;#039;&amp;#039; command is unique to SME Server, and is the command line user interface to the &amp;#039;&amp;#039;&amp;#039;db system&amp;#039;&amp;#039;&amp;#039;. It is used to manipulate configuration setting of the various configuration databases which are then incorporated into the standard configuration files in /etc/.... via the template expansion process.  The &amp;#039;&amp;#039;&amp;#039;db sy...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;copied from; https://wiki.koozali.org/Db_command_tutorial#Signal-event (This page was last edited on 5 March 2022, at 19:31.)&lt;br /&gt;
&lt;br /&gt;
==db command tutorial==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;db&#039;&#039;&#039; command is unique to SME Server, and is the command line user interface to the &#039;&#039;&#039;db system&#039;&#039;&#039;. It is used to manipulate configuration setting of the various configuration databases which are then incorporated into the standard configuration files in /etc/.... via the template expansion process.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;db system&#039;&#039;&#039; comes with default values that can be manipulated by either manually through the CLI or fully automatic through the Server Manager. This tutorial explains manipulating the &#039;&#039;&#039;db system&#039;&#039;&#039; manually through the CLI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display the syntax issue the following command:&lt;br /&gt;
 /sbin/e-smith/db&lt;br /&gt;
which will result in the db help output below, for we did not pass any parameters.&lt;br /&gt;
 /sbin/e-smith/db dbfile keys&lt;br /&gt;
 /sbin/e-smith/db dbfile print [key]&lt;br /&gt;
 /sbin/e-smith/db dbfile show [key]&lt;br /&gt;
 /sbin/e-smith/db dbfile get key&lt;br /&gt;
 /sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...&lt;br /&gt;
 /sbin/e-smith/db dbfile setdefault key type [prop1 val1] [prop2 val2] ...&lt;br /&gt;
 /sbin/e-smith/db dbfile delete key&lt;br /&gt;
 /sbin/e-smith/db dbfile printtype [key]&lt;br /&gt;
 /sbin/e-smith/db dbfile gettype key&lt;br /&gt;
 /sbin/e-smith/db dbfile settype key type&lt;br /&gt;
 /sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...&lt;br /&gt;
 /sbin/e-smith/db dbfile getprop key prop&lt;br /&gt;
 /sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...&lt;br /&gt;
 /sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...&lt;br /&gt;
&lt;br /&gt;
{{Note box|Note that on a properly setup SME Server (path wise) &#039;&#039;&#039;you do not need&#039;&#039;&#039; to include the&lt;br /&gt;
/sbin/e-smith/ part, &#039;&#039;&#039;only use db or config&#039;&#039;&#039; since you are in the Path of your environment}}&lt;br /&gt;
&lt;br /&gt;
===Only for the configuration database===&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
 db configuration&lt;br /&gt;
is&lt;br /&gt;
 config&lt;br /&gt;
&lt;br /&gt;
Note this only applies to this one often used database file, all others must be referred to using the format&lt;br /&gt;
 db dbname command key [property value] [property2 value2]&lt;br /&gt;
&lt;br /&gt;
All database files are in&lt;br /&gt;
 /home/e-smith/db&lt;br /&gt;
&lt;br /&gt;
===Auto completion===&lt;br /&gt;
&lt;br /&gt;
Like in every Linux shell you can use the TAB key when you use the command line to auto complete or propose all available answers&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
Here are a few examples to demonstrate usage and syntax correlation&lt;br /&gt;
 db dbname show&lt;br /&gt;
&lt;br /&gt;
Using real db names - for the database in /home/e-smith/db/configuration&lt;br /&gt;
 db configuration show&lt;br /&gt;
 db configuration show |less&lt;br /&gt;
 db configuration keys |less&lt;br /&gt;
&lt;br /&gt;
* An example for the imap service&lt;br /&gt;
 [root@sme8dev64 ~]# db configuration show imap&lt;br /&gt;
&lt;br /&gt;
 imap=service&lt;br /&gt;
    ConcurrencyLimit=400&lt;br /&gt;
    ConcurrencyLimitPerIP=12&lt;br /&gt;
    TCPPort=143&lt;br /&gt;
    access=private&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
we can retrieve a value&lt;br /&gt;
 [root@sme8dev64 ~]# db configuration getprop imap status&lt;br /&gt;
which gives something like&lt;br /&gt;
 enabled&lt;br /&gt;
&lt;br /&gt;
 [root@sme8dev64 ~]# db configuration getprop dansguardian ConcurrencyLimitPerIP&lt;br /&gt;
which gives something like&lt;br /&gt;
 12&lt;br /&gt;
&lt;br /&gt;
Compare the above displayed actual element values of the db command with the syntax result from issuing the db command where each element or piece equates to:&lt;br /&gt;
&lt;br /&gt;
===Keys/Properties/values===&lt;br /&gt;
&lt;br /&gt;
All turn around A key with properties and values of the properties, no more, no less. You can have a lot of properties under a key which is unique&lt;br /&gt;
&lt;br /&gt;
 imap=service&lt;br /&gt;
   ConcurrencyLimit=400&lt;br /&gt;
   ConcurrencyLimitPerIP=12&lt;br /&gt;
   TCPPort=143&lt;br /&gt;
   access=private&lt;br /&gt;
   status=enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Database name !! Unique key !! Property name !! Default value || Possible values || Description&lt;br /&gt;
|-&lt;br /&gt;
| configuration ||style=&amp;quot;text-align:center;&amp;quot;| imap || ||style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;service&#039;&#039;&#039;|| || Unique key name&lt;br /&gt;
|-&lt;br /&gt;
| || || Concurrenstyle || style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;400&#039;&#039;&#039; || style=&amp;quot;text-align:center;&amp;quot;|nnn || User defined value&lt;br /&gt;
|-&lt;br /&gt;
| || || ConcurrencyLimitPerIP || style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;12&#039;&#039;&#039; || style=&amp;quot;text-align:center;&amp;quot;|nn || User defined value&lt;br /&gt;
|-&lt;br /&gt;
| || || TCPPort || style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;143&#039;&#039;&#039; || style=&amp;quot;text-align:center;&amp;quot;|nnn || TCP port or port range [nnn] or [nnn-nnn]&lt;br /&gt;
|-&lt;br /&gt;
| || || access || style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;private&#039;&#039;&#039; || style=&amp;quot;text-align:center;&amp;quot;|private / public || Specify LAN only or LAN and WAN access.&amp;lt;br&amp;gt; The firewall will be adjusted accordingly&lt;br /&gt;
|-&lt;br /&gt;
| || || status || style=&amp;quot;text-align:center;&amp;quot;|&#039;&#039;&#039;enabled&#039;&#039;&#039; || style=&amp;quot;text-align:center;&amp;quot;|enabled / disabled || Enable or disable this service.&amp;lt;br&amp;gt; The firewall will be adjusted accordingly&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apply the above &amp;quot;reasoning&amp;quot; to any database and the the syntax presented by issuing db then makes sense.&lt;br /&gt;
&lt;br /&gt;
Note that missing (or no) properties and values do not necessarily mean no value is in the /etc/file.conf system, as the template code can have a default value in the absence of a specific db value.&lt;br /&gt;
&lt;br /&gt;
Note to determine what db settings are supported by sme code, or what the default values are, refer to (ie read) the code that is in the particular template or custom template associated with a /etc/file.conf&lt;br /&gt;
 &lt;br /&gt;
Look in /etc/e-smith/templates/... and /etc/e-smith/templates-custom/....&lt;br /&gt;
and subfolders and template fragments applicable to particular /etc/file.conf configuration files.&lt;br /&gt;
&lt;br /&gt;
===show all available databases===&lt;br /&gt;
To show a list of existing databases do&lt;br /&gt;
 ls -al /home/e-smith/db&lt;br /&gt;
&lt;br /&gt;
which gives something like for official databases&lt;br /&gt;
&lt;br /&gt;
 total 304&lt;br /&gt;
 -rw-r----- 1 root admin   1921 févr. 18  2014 accounts&lt;br /&gt;
 -rw-r--r-- 1 root admin      0 févr.  2  2013 backups&lt;br /&gt;
 -rw-r----- 1 root admin   8816 nov.  4 19:38 configuration&lt;br /&gt;
 -rw-r----- 1 root admin    361 févr.  2  2013 domains&lt;br /&gt;
 -rw-r----- 1 root admin    816 févr.  7  2013 hosts&lt;br /&gt;
 drwxr-x--- 2 root ldap    4096 févr. 22  2013 ldap&lt;br /&gt;
 -rw-r----- 1 root admin   3098 févr.  2  2013 mailpatterns&lt;br /&gt;
 drwxr-x--- 2 root root    4096 avril 27  2014 mysql&lt;br /&gt;
 drwxr-xr-x 2 root root    4096 nov.  3 21:42 navigation&lt;br /&gt;
 -rw-r----- 1 root admin    299 févr.  2  2013 networks&lt;br /&gt;
 -rw-r----- 1 root admin      0 mars 11  2010 portforward_tcp&lt;br /&gt;
 -rw-r----- 1 root admin      0 mars 11  2010 portforward_udp&lt;br /&gt;
 -rw-r----- 1 root admin    271 févr.  2  2013 spamassassin&lt;br /&gt;
 -rw-r--r-- 1 root root  201371 nov.  4 04:04 yum_available&lt;br /&gt;
 -rw-r--r-- 1 root root   37419 nov.  4 04:04 yum_installed&lt;br /&gt;
 -rw-r----- 1 root admin   4459 févr. 18  2014 yum_repositories&lt;br /&gt;
 -rw-r--r-- 1 root root      70 nov.  4 04:04 yum_updates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To show the keys for the two main databases do:&lt;br /&gt;
 db configuration show |less&lt;br /&gt;
That can be abbreviated to&lt;br /&gt;
 config show |less&lt;br /&gt;
&lt;br /&gt;
 db accounts show |less&lt;br /&gt;
Note after using the |less switch, press Enter to scroll down a line at a time, or press Space to scroll down a page at a time. &#039;q&#039; to quit.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
====Create a  key in a database====&lt;br /&gt;
the generic command is :&lt;br /&gt;
 db dbfile set key type [prop1 val1] [prop2 val2] ...&lt;br /&gt;
&lt;br /&gt;
 dbfile : choose the database in /home/e-smith/db&lt;br /&gt;
 key : the name of key&lt;br /&gt;
 type : generally &#039;service&#039; or &#039;configuration&#039; but it can be other things as webbapps or url or ...&lt;br /&gt;
 &lt;br /&gt;
If you want to create a keys called &#039;plop&#039; in the configuration database with a type as &#039;configuration you can do like this&lt;br /&gt;
&lt;br /&gt;
 db configuration set plop configuration Name wordpress PublicAccess private status enabled DbName wordpress DbUser wordpress WpLang en&lt;br /&gt;
&lt;br /&gt;
you can see the result&lt;br /&gt;
&lt;br /&gt;
 config show plop&lt;br /&gt;
or &lt;br /&gt;
 db configuration show plop&lt;br /&gt;
&lt;br /&gt;
  plop=configuration&lt;br /&gt;
    DbName=wordpress&lt;br /&gt;
    DbUser=wordpress&lt;br /&gt;
    Name=wordpress&lt;br /&gt;
    PublicAccess=private&lt;br /&gt;
    WpLang=en&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
====Change values of properties====&lt;br /&gt;
The generic command line is &lt;br /&gt;
 db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...&lt;br /&gt;
&lt;br /&gt;
 dbfile : choose the database in /home/e-smith/db&lt;br /&gt;
 key : the name of key&lt;br /&gt;
&lt;br /&gt;
Then if you want to modify some values of our example above&lt;br /&gt;
 db configuration setprop plop PublicAccess public WpLang fr&lt;br /&gt;
or&lt;br /&gt;
 config setprop plop PublicAccess public WpLang fr&lt;br /&gt;
&lt;br /&gt;
We want to verify&lt;br /&gt;
 config show plop &lt;br /&gt;
or&lt;br /&gt;
 db configuration show plop&lt;br /&gt;
&lt;br /&gt;
 plop=configuration&lt;br /&gt;
    DbName=wordpress&lt;br /&gt;
    DbUser=wordpress&lt;br /&gt;
    Name=wordpress&lt;br /&gt;
    PublicAccess=public  &amp;lt;----------Here&lt;br /&gt;
    WpLang=fr            &amp;lt;----------Here&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
====Create a property under a key====&lt;br /&gt;
&lt;br /&gt;
Same as above, really not difficult&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop plop PlopTheWorld YES             &lt;br /&gt;
or&lt;br /&gt;
 config setprop plop PlopTheWorld YES             &lt;br /&gt;
&lt;br /&gt;
and to display modification&lt;br /&gt;
&lt;br /&gt;
 db configuration show plop&lt;br /&gt;
or&lt;br /&gt;
 config show plop&lt;br /&gt;
&lt;br /&gt;
 plop=configuration&lt;br /&gt;
    DbName=wordpress&lt;br /&gt;
    DbUser=wordpress&lt;br /&gt;
    Name=wordpress&lt;br /&gt;
    PlopTheWorld=YES    &amp;lt;----------Here&lt;br /&gt;
    PublicAccess=public&lt;br /&gt;
    WpLang=fr&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
==== Setting db variables to default values ====&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
&lt;br /&gt;
Any db variable that has a default value can be reset to the default by deleting the variable entirely, then re-initializing the default database values as follows:&lt;br /&gt;
 config delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
 db configuration delprop plop WPlang&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
or&lt;br /&gt;
 config delprop plop WpLang&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
==== Delete a property value ====&lt;br /&gt;
To delete the property&lt;br /&gt;
 db dbfile delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
for example&lt;br /&gt;
 db configuration delprop plop WpLang&lt;br /&gt;
or&lt;br /&gt;
 config delprop plop WpLang&lt;br /&gt;
&lt;br /&gt;
==== Delete a Key ====&lt;br /&gt;
To delete the Key&lt;br /&gt;
 db dbfile delete &amp;lt;key&amp;gt;&lt;br /&gt;
for example&lt;br /&gt;
 db configuration delete plop&lt;br /&gt;
or&lt;br /&gt;
 config delete plop&lt;br /&gt;
&lt;br /&gt;
==== Reset a property to an empty value ====&lt;br /&gt;
To reset to an empty value&lt;br /&gt;
 db dbfile setprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt; &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
 db configuration setprop plop WpLang &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
 config setprop plop WpLang &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Check if a key is used====&lt;br /&gt;
To check if a key is used, grep templates&lt;br /&gt;
&lt;br /&gt;
Eg :&lt;br /&gt;
&lt;br /&gt;
grep -irn grapCutof /etc/e-smith/templates&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
grep -rn AutoBlock /etc/e-smith/templates&lt;br /&gt;
&lt;br /&gt;
{{Note box|: via CLI so it is easy to make mistakes.&lt;br /&gt;
&lt;br /&gt;
Hence it is safer to user server manager when there is an entry to configure key.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}&lt;br /&gt;
&lt;br /&gt;
===Signal-event===&lt;br /&gt;
&lt;br /&gt;
Once you have &#039;&#039;&#039;adjusted/modified/created&#039;&#039;&#039; your &#039;&#039;&#039;keys/properties/values&#039;&#039;&#039;, it is not finished because you have to do a signal-event to read all templates and add the values you have set in all configuration files.&lt;br /&gt;
&lt;br /&gt;
signal-event are called like this, the most known is &lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
This one reboot your server and reconfigure all templates and initialize all default db entries. It is an SME Server requirement that all database entries and configuration files must be correctly configured after a &amp;quot;reconfiguration reboot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 signal-event console-save&lt;br /&gt;
This one is useful when you don&#039;t want to restart your server, a lot of event are called with this command line but The console-save event is not a &amp;quot;reconfigure everything&amp;quot; event, and only changes items which can be configured from the text-mode console. It is convenient in this case as it performs database initialization and migration. &lt;br /&gt;
&lt;br /&gt;
all specific events can be found  at [[DB_Variables_Configuration]] and in the [[SME_Server:Documentation:Developers_Manual#Signalling_events|developer manual]] with more informations&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
See the Howto section for a couple of articles on db commands that should give useful info ie&lt;br /&gt;
&lt;br /&gt;
http://wiki.contribs.org/DB_Variables_Configuration&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
http://wiki.contribs.org/Useful_Commands&lt;br /&gt;
&lt;br /&gt;
and refer to the Developers Guide for technical information if needed&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=107</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=107"/>
		<updated>2026-03-29T06:03:47Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ciphers&lt;br /&gt;
 openssl ciphers -v | awk &#039;{print $2}&#039; | sort | uniq&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
 xz -dv xxx.xz&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
 xz -6cv --threads=0 /path/filename &amp;gt; /path/filename.xz&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/path/filename /path&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/path/filename /path&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[35m\]\h:\w#\[\e[m\] &amp;quot;         PINK&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Websites&amp;diff=106</id>
		<title>Websites</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Websites&amp;diff=106"/>
		<updated>2026-01-16T08:13:40Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== SME ===&lt;br /&gt;
: http://smebox.uk/mirror/releases/&lt;br /&gt;
: http://mirror.canada.pialasse.com/releases/&lt;br /&gt;
: http://www.mirrorservice.org/sites/mirror.contribs.org/smeserver/releases/&lt;br /&gt;
: https://wiki.koozali.org/Category:Contrib&lt;br /&gt;
&lt;br /&gt;
=== KVM ===&lt;br /&gt;
: https://wiki.debian.org/KVM&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_cli&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lv#lvm_cache_volume_creation&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/index&lt;br /&gt;
: https://www.libvirt.org/kbase/live_full_disk_backup.html&lt;br /&gt;
: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso&lt;br /&gt;
&lt;br /&gt;
=== Nextcloud ===&lt;br /&gt;
: https://docs.nextcloud.com/server/latest/admin_manual/index.html&lt;br /&gt;
: https://docs.nextcloud.com/server/13/admin_manual/configuration_server/occ_command.html#&lt;br /&gt;
: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html&lt;br /&gt;
&lt;br /&gt;
=== Microsoft ===&lt;br /&gt;
: https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-are-private-public-hybrid-clouds&lt;br /&gt;
&lt;br /&gt;
=== Super GRUB2 Disk ===&lt;br /&gt;
:https://www.supergrubdisk.org/donate/ &lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
: https://www.server-world.info/en/&lt;br /&gt;
: http://www.apcupsd.com/manual/manual.html&lt;br /&gt;
: http://www.apcupsd.com/manual/manual.html#configuration-directives-used-to-set-the-ups-eeprom&lt;br /&gt;
: https://docs.mojolicious.org/Mojolicious/Guides&lt;br /&gt;
: https://en.wikipedia.org/wiki/Private_network&lt;br /&gt;
: https://en.wikipedia.org/wiki/Iptables&lt;br /&gt;
: https://en.wikipedia.org/wiki/Netfilter&lt;br /&gt;
&lt;br /&gt;
=== RedHat===&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/security_guide/index&lt;br /&gt;
: https://www.redhat.com/sysadmin/iptables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_DB_Variables&amp;diff=105</id>
		<title>SMEServer DB Variables</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_DB_Variables&amp;diff=105"/>
		<updated>2026-01-14T17:40:01Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/DB_Variables_Configuration (This page was last edited on 2 January 2024, at 00:18.)  {{usefulnote}} == Database variables == {{Note box|See following wiki pages for the syntax of access to the configuration database entries from the command line [http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual:Section2#Access_from_the_command_line Access from the Command Line] and a [http://wiki.contribs.org/Db_command_tutorial db...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/DB_Variables_Configuration (This page was last edited on 2 January 2024, at 00:18.)&lt;br /&gt;
&lt;br /&gt;
{{usefulnote}}&lt;br /&gt;
== Database variables ==&lt;br /&gt;
{{Note box|See following wiki pages for the syntax of access to the configuration database entries from the command line [http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual:Section2#Access_from_the_command_line Access from the Command Line] and a [http://wiki.contribs.org/Db_command_tutorial db command tutorial]}}&lt;br /&gt;
&lt;br /&gt;
SME Server comes with the most used parameters set as variables in its internal configuration databases. These variables are used to store values to be used in the final configuration files. Please, read the [[SME_Server:Documentation:Developers_Manual:Section2]] to understand the template and database process.&lt;br /&gt;
&lt;br /&gt;
These variables are useful to configure your system more easily, as you do not need to modify configuration files directly for most common cases. It also makes it possible to administer the server through its server-manager as the database variables are used to set and change configuration parameters.  After editing, the configuration files must be regenerated and affected services need to be restarted.&lt;br /&gt;
&lt;br /&gt;
For example, suppose you need to increase &amp;quot;memory-limit&amp;quot; in php.&lt;br /&gt;
&lt;br /&gt;
You would simply execute these commands at the server console:&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop php MemoryLimit 64M&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
&lt;br /&gt;
The first line changes the value for the memory limit of PHP, the second line regenerates the configuration file and the last line will reload Apache (and subsequently also PHP as this is configured as a module of Apache).&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a typo.}}&lt;br /&gt;
&lt;br /&gt;
The database system is based on a flat file system, but you should never edit them directly. Instead you should use the db command. More details on using the database system can be found in the [http://mirror.contribs.org/smeserver/contribs/gordonr/devguide/html/devguide.html#SME-INTERNALS SME Server Developer&#039;s Guide].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting db variables to default values ===&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
&lt;br /&gt;
Any db variable that has a default value can be reset to the default by deleting the variable entirely, then re-initializing the default database values as follows:&lt;br /&gt;
 config delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
==== Delete a property value ====&lt;br /&gt;
To delete the property&lt;br /&gt;
 db accounts delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Reset a property value ====&lt;br /&gt;
To reset to an empty value&lt;br /&gt;
 db accounts setprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt; &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}&lt;br /&gt;
&lt;br /&gt;
===Concept of the signal-event command===&lt;br /&gt;
Due to the efforts of the developers, you can further simplify the commands using the signal-event proccess.&lt;br /&gt;
&lt;br /&gt;
For full details see [[SME_Server:Documentation:Developers_Manual:Section2]]&lt;br /&gt;
&lt;br /&gt;
=== Overview of database variables ===&lt;br /&gt;
The next section describes the standard variables defined on SME Server. Please update this list with new standard variables in future SME Server versions.&lt;br /&gt;
&lt;br /&gt;
The tables below have three columns. The first is the variable, the second is the target variable (located in the final configuration file), and the third is the default value.&lt;br /&gt;
&lt;br /&gt;
A lot of the variables can be set using the server-manager but some can not. For example the variable DomainMaster for samba is not important here, because this can be set through server-manager. On the other hand, the variable RecycleBin is important, because it is not accessible through the server-manager.&lt;br /&gt;
&lt;br /&gt;
Configuration files may use database values from a single configuration key, or may use multiple keys. The latter is the case for the /etc/rc.d/init.d/masq configuration file. This file takes it values from multiple database keys such as squid and masq.&lt;br /&gt;
&lt;br /&gt;
It is also possible that multiple configuration files use the same key. An example of this is the httpd-admin key. This key has a variable TCPPort which is used in multiple files (/etc/httpd/admin-conf/httpd.conf and /etc/services).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== AppleTalk (atalk) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop atalk variable value&lt;br /&gt;
 signal-event workgroup-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/atalk/netatalk.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MaxClients&lt;br /&gt;
|AFPD_MAX_CLIENTS&lt;br /&gt;
|20&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Warning box|The AppleTalk protocol has been removed from SME Server as of version 8.x}}&lt;br /&gt;
&lt;br /&gt;
==== Backup ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop backup variable value&lt;br /&gt;
 signal-event conf-backup&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/e-smith/events/post-backup/S90eject-tape&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Device&lt;br /&gt;
|$device&lt;br /&gt;
|/dev/st0&lt;br /&gt;
|-&lt;br /&gt;
|Eject&lt;br /&gt;
|&#039;&#039;Logical operation&#039;&#039;&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Console Mode ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039; - Choose either login or auto DB variable. &lt;br /&gt;
 config set ConsoleMode login&lt;br /&gt;
 signal-event post-upgrade&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|ConsoleMode&lt;br /&gt;
|Console Setting&lt;br /&gt;
|login&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Warning box|This functionality has been deprecated as of SME Server 9.x}}&lt;br /&gt;
&lt;br /&gt;
==== Clam AntiVirus (clamav) ====&lt;br /&gt;
===== clamav =====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop clamav variable value&lt;br /&gt;
 signal-event clamav-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/clamd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveBlockEncrypted&lt;br /&gt;
|ArchiveBlockEncrypted&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveBlockMax&lt;br /&gt;
|ArchiveBlockMax&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveMaxCompressionRatio&lt;br /&gt;
|ArchiveMaxCompressionRatio&lt;br /&gt;
|300&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveMaxFiles&lt;br /&gt;
|ArchiveMaxFiles&lt;br /&gt;
|1500&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveMaxFileSize&lt;br /&gt;
|ArchiveMaxFileSize&lt;br /&gt;
|15M&lt;br /&gt;
|-&lt;br /&gt;
|ArchiveMaxRecursion&lt;br /&gt;
|ArchiveMaxRecursion&lt;br /&gt;
|8&lt;br /&gt;
|-&lt;br /&gt;
|Debug&lt;br /&gt;
|Debug&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|DetectBrokenExecutables&lt;br /&gt;
|DetectBrokenExecutables&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|FilesystemScanExclude&lt;br /&gt;
|FilesystemScanExclude&lt;br /&gt;
|/proc,/sys,/usr/share,/var&lt;br /&gt;
|-&lt;br /&gt;
|IdleTimeout&lt;br /&gt;
|IdleTimeout&lt;br /&gt;
|60&lt;br /&gt;
|-&lt;br /&gt;
|LeaveTemporaryFiles&lt;br /&gt;
|LeaveTemporaryFiles&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|LogClean&lt;br /&gt;
|LogClean&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|LogTime&lt;br /&gt;
|LogTime&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|LogVerbose&lt;br /&gt;
|LogVerbose&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|MaxConnectionQueueLength&lt;br /&gt;
|MaxConnectionQueueLength&lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|MaxDirectoryRecursion&lt;br /&gt;
|MaxDirectoryRecursion&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|MaxThreads&lt;br /&gt;
|MaxThreads&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|ReadTimeout&lt;br /&gt;
|ReadTimeout&lt;br /&gt;
|300&lt;br /&gt;
|-&lt;br /&gt;
|ScanArchive&lt;br /&gt;
|ScanArchive&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|ScanHTML&lt;br /&gt;
|ScanHTML&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|ScanMail&lt;br /&gt;
|ScanMail&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|ScanOLE2&lt;br /&gt;
|ScanOLE2&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|ScanPE&lt;br /&gt;
|ScanPE&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|SelfCheck&lt;br /&gt;
|SelfCheck&lt;br /&gt;
|1800&lt;br /&gt;
|-&lt;br /&gt;
|StreamMaxLength&lt;br /&gt;
|StreamMaxLength&lt;br /&gt;
|25M&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/freshclam.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Checks&lt;br /&gt;
|Checks&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|DatabaseMirror&lt;br /&gt;
|DatabaseMirror&lt;br /&gt;
|db.local.clamav.net&lt;br /&gt;
|-&lt;br /&gt;
|DNSDatabaseInfo&lt;br /&gt;
|DNSDatabaseInfo&lt;br /&gt;
|current.cvd.clamav.net&lt;br /&gt;
|-&lt;br /&gt;
|LogVerbose&lt;br /&gt;
|LogVerbose&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|MaxAttempts&lt;br /&gt;
|MaxAttempts&lt;br /&gt;
|6&lt;br /&gt;
|}&lt;br /&gt;
===== clamd =====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop clamd variable value&lt;br /&gt;
 signal-event clamav-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/clamd/env/MEMLIMIT&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MemLimit&lt;br /&gt;
|MEMLIMIT&lt;br /&gt;
|1400000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== DHCP daemon (dhcpd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop dhcpd variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/dhcpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Bootp&lt;br /&gt;
|bootp&lt;br /&gt;
|deny&lt;br /&gt;
|-&lt;br /&gt;
|startDynamicIPRange&lt;br /&gt;
|range&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|endDynamicIPRange&lt;br /&gt;
|range&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Note: the end of the dynamic IP range will be set to the value of &#039;endDynamicIPRange&#039; &#039;&#039;minus&#039;&#039; the value of pptpd:sessions.&lt;br /&gt;
&lt;br /&gt;
==== DNS Cache Forwarder (dnscache / dnscache.forwarder) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop dnscache variable value&lt;br /&gt;
 signal-event dns-update &lt;br /&gt;
or for some settings&lt;br /&gt;
 signal-event console-save&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected files: /var/service/dnscache.forwarder/config, var/service/dnscache.forwarder/root/servers/@&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
!Options&lt;br /&gt;
|-&lt;br /&gt;
|CacheSize&lt;br /&gt;
|CACHESIZE&lt;br /&gt;
|1000000 (SME9 10000000)&lt;br /&gt;
|Variable&lt;br /&gt;
|-&lt;br /&gt;
|DataLimit&lt;br /&gt;
|DATALIMIT&lt;br /&gt;
|3000000 (SME9 12000000)&lt;br /&gt;
|Variable&lt;br /&gt;
|-&lt;br /&gt;
|Forwarder&lt;br /&gt;
|Forwarder&lt;br /&gt;
|not configured&lt;br /&gt;
|a.b.c.d - address of remote DNS server&lt;br /&gt;
|-&lt;br /&gt;
|Forwarder&lt;br /&gt;
|Forwarder2&lt;br /&gt;
|not configured&lt;br /&gt;
|a.b.c.d - address of remote DNS server&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== TinyDNS ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop tinydns variable value&lt;br /&gt;
 signal-event dns-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/tinydns/env&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|ListenIP&lt;br /&gt;
|IP&lt;br /&gt;
|127.0.0.1&lt;br /&gt;
|-&lt;br /&gt;
|DataLimit&lt;br /&gt;
|DATALIMIT&lt;br /&gt;
|300000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== FlexBackup ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop flexbackup variable value&lt;br /&gt;
 signal-event conf-backup&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/flexbackup.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Blocksize&lt;br /&gt;
|$blksize&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|TapeBlocksize&lt;br /&gt;
|$mt_blksize&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|BufferProg&lt;br /&gt;
|$buffer&lt;br /&gt;
|buffer&lt;br /&gt;
|-&lt;br /&gt;
|BufferMegs&lt;br /&gt;
|$buffer_megs&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|erase_rewind_only&lt;br /&gt;
|$erase_rewind_only&lt;br /&gt;
|false&lt;br /&gt;
|-&lt;br /&gt;
|Type&lt;br /&gt;
|$type&lt;br /&gt;
|tar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Horde (webmail) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop horde variable value&lt;br /&gt;
&lt;br /&gt;
 expand-template /home/httpd/html/horde/conf.menu.apps.php&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /home/httpd/html/horde/conf.menu.aps.php&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MenuArray&lt;br /&gt;
|MenuArray&lt;br /&gt;
|enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 expand-template /home/httpd/html/horde/config/conf.php&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /home/httpd/html/horde/config/conf.php&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Administration&lt;br /&gt;
|Administration&lt;br /&gt;
|disabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/e-smith/templates/home/httpd/html/horde/config/prefs.php/200personal&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/e-smith/templates/home/httpd/html/horde/config/prefs.php/200personal&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Name&lt;br /&gt;
|&#039;My Company&#039;&lt;br /&gt;
|&#039;Horde Webmail&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 expand-template /home/httpd/html/horde/turba/config/sources.php&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /home/httpd/html/horde/turba/config/sources.php&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|freebusy&lt;br /&gt;
|freebusy&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|SharedAddressBooks&lt;br /&gt;
|SharedAddressBooks&lt;br /&gt;
|disabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Apache server ibay specific (httpd-e-smith) ====&lt;br /&gt;
see [[PHP]] for specific php options for ibays, or see [[Webhosting]] contrib.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db accounts setprop ibayname variable value&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/httpd/conf/httpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AllowOverride&lt;br /&gt;
|AllowOverride&lt;br /&gt;
|None&lt;br /&gt;
|-&lt;br /&gt;
|FollowSymLinks&lt;br /&gt;
|FollowSymLinks&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|Indexes&lt;br /&gt;
|Indexes&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|PHPRegisterGlobals&lt;br /&gt;
|register_globals&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|PHPBaseDir&lt;br /&gt;
|open_basedir&lt;br /&gt;
|/home/e-smith/files/ibays/ibayname&lt;br /&gt;
|-&lt;br /&gt;
|SSLv2&lt;br /&gt;
|SSLProtocol&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|SSL&lt;br /&gt;
|Force https access to ibay through Apache.&lt;br /&gt;
|disabled&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* these options are specific to SME Server 9 and are not backported to SME Server 8. See [[bugzilla:8239]]&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db accounts setprop ibayname variable value&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
&lt;br /&gt;
==== Apache server-manager (httpd-admin) ====&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/httpd/conf/httpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|PermitPlainTextAccess&lt;br /&gt;
|&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|ValidFrom&lt;br /&gt;
|&lt;br /&gt;
|ip/mask coma separated list&lt;br /&gt;
|}&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop httpd-admin variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/httpd/admin-conf/httpd.conf and /etc/services&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|TCPPort&lt;br /&gt;
|980&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IMAP (imap) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop imap variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/imap/config&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|ConcurrencyLimit&lt;br /&gt;
|INSTANCES&lt;br /&gt;
|2000&lt;br /&gt;
|-&lt;br /&gt;
|ConcurrencyLimitPerIP&lt;br /&gt;
|INSTANCES_PER_IP&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|ProcessMemoryLimit&lt;br /&gt;
|ulimitdata&lt;br /&gt;
|128000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Tip box|The notes on the concurrency limits noted under IMAPS also apply here. See below.}}&lt;br /&gt;
{{Note box| for sme9, only the key imap has properties ConcurrencyLimitPerIP,checkConcurrencyLimit,ProcessMemoryLimit. If you set these properties to the key imaps, a migrate fragment will remove them automatically}}&lt;br /&gt;
* only for SME Server 9&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/imap/config&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AllowPlainText&lt;br /&gt;
|if set to disabled, dovecot will still listen on port 143, but will only accept TLS connexions, even from the local networks&lt;br /&gt;
|enabled/disabled, default is enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IMAPS (imaps) ====&lt;br /&gt;
&lt;br /&gt;
These properties apply to SME versions before 9.0 only. After 9.0, the imap properties are used to control imaps concurrency and memory limits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop imaps variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/imaps/config&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|ConcurrencyLimit&lt;br /&gt;
|INSTANCES&lt;br /&gt;
|2000&lt;br /&gt;
|-&lt;br /&gt;
|ConcurrencyLimitPerIP&lt;br /&gt;
|INSTANCES_PER_IP&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|ProcessMemoryLimit&lt;br /&gt;
|ulimitdata&lt;br /&gt;
|128000000&lt;br /&gt;
|}&lt;br /&gt;
{{Note box| For sme9, only the key imap has properties ConcurrencyLimitPerIP, checkConcurrencyLimit, ProcessMemoryLimit. If you set these properties to the key imaps, a migrate fragment will remove them automatically. Look at /etc/dovecot/dovecot.conf for default values. ProcessMemoryLimit defaults to 256MB.&lt;br /&gt;
}}&lt;br /&gt;
{{Tip box|msg=You can see if you are running out of the number of available connections in your log file /var/log/dovecot/current (for sme8, it is /var/log/imap/current and /var/log/imaps/current)  and look for messages like the log extract below where the ConcurrencyLimitPerIP was set to 12. A 13th connection was attempted and was denied.&lt;br /&gt;
&lt;br /&gt;
 @400000005396a2d215b40d9c imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=12): &lt;br /&gt;
 user=&amp;lt;stephane&amp;gt;,  method=PLAIN, rip=90.84.144.xxx, lip=192.168.xx.15, TLS&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
{{Tip box|Mobile devices have a tendency to frequently disconnect and connect from the network. When this disconnect happens, the sessions on the server are not always immediately cleaned up (they get cleaned up after a time out of some minutes). When the email client reconnects, they create new network connections and you get into the situation that these new connections get denied because of the concurrency limit. On the mobile device this may be noted as a &amp;quot;Unable to connect to server&amp;quot; message.&lt;br /&gt;
}}&lt;br /&gt;
{{Tip box|Some email clients use a separate connection per imap folder, so the concurrency limits may occur for users that have many imap folders.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Dovecot ====&lt;br /&gt;
* Only for SME Server 9&lt;br /&gt;
With smeserver-dovecot installed, 4 services in the configuration DB are used&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
imap and imaps are used to be backward compatible with e-smith-imap (and are used to control the TCPPort of the service, and if it&#039;s accessible from local network or from the internet)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dovecot is now the main service entry in the configuration DB. It&#039;s used to control various optional features of dovecot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop dovecot variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/dovecot/dovecot.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AdminIsMaster&lt;br /&gt;
| if enabled, the admin user will be a [http://wiki2.dovecot.org/Authentication/MasterUsers master user], and will be able to login as any user. To do so use user1*admin as login and the admin password to log as user1&lt;br /&gt;
|enabled/disabled, default is disabled&lt;br /&gt;
|-&lt;br /&gt;
|FullTextIndexing&lt;br /&gt;
|will turn on or off the full text indexing. When this option is enabled, a first search in an IMAP folder will trigger indexation. Next searches will be much faster. Read [http://wiki2.dovecot.org/Plugins/FTS/Squat this page] before enabling this option&lt;br /&gt;
|enabled/disabled, default is disabled&lt;br /&gt;
|-&lt;br /&gt;
|LogActions&lt;br /&gt;
|will turn on or off extra logging (flag change, move, copy etc…). !! Warning !!: enabling this can generate a huge amount of logs&lt;br /&gt;
|enabled/disabled, default is disabled&lt;br /&gt;
|-&lt;br /&gt;
|Quotas&lt;br /&gt;
|will report the actual [http://wiki2.dovecot.org/Quota/FS used space and the remaining one if the user has a quota limit]&lt;br /&gt;
|enabled/disabled, default is enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fetchmail ====&lt;br /&gt;
Various fetchmail settings for email collection&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop fetchmail variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
See the man page for more settings:&lt;br /&gt;
&lt;br /&gt;
https://www.fetchmail.info/fetchmail-man.html&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/fetchmail&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Verbosity&lt;br /&gt;
| For debugging&lt;br /&gt;
|silent/verbose, default is silent&lt;br /&gt;
|-&lt;br /&gt;
|SSL&lt;br /&gt;
|Use SSL&lt;br /&gt;
|enabled/disabled, default is disabled&lt;br /&gt;
|-&lt;br /&gt;
|Protocol&lt;br /&gt;
|POP3&lt;br /&gt;
|POP/Other, default is POP3&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|Retrieved from smtpd&lt;br /&gt;
|default 25&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== IPTables firewall (masq) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop masq variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/rc.d/init.d/masq&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Logging&lt;br /&gt;
|Logging&lt;br /&gt;
|most&lt;br /&gt;
|-&lt;br /&gt;
|Stealth&lt;br /&gt;
|Stealth&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Tip box|Special case is TCPPort and UDPPort from any DB key.&lt;br /&gt;
&lt;br /&gt;
Any Db key named &amp;quot;TCPPort&amp;quot; or &amp;quot;UDPPort&amp;quot; affect masq file.&lt;br /&gt;
&lt;br /&gt;
Currently the following keys are included in masq:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TCPPort:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;httpd-admin - sshd - smtpd - ssmtpd&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Additional information on customizing iptables=====&lt;br /&gt;
Create a custom-named service definition in the configuration database.&lt;br /&gt;
&lt;br /&gt;
 db configuration set &amp;lt;servicename&amp;gt; service&lt;br /&gt;
&lt;br /&gt;
Apply your desired firewall restrictions to any existing SME &#039;service&#039; or to a custom-named service that you have created. Combine a custom-named service with port-forwarding to create customized firewall rules.&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; TCPPort &amp;lt;portnumber&amp;gt;&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; TCPPorts &amp;lt;portnumbers&amp;gt;&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; UDPPort &amp;lt;portnumber&amp;gt;&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; UDPPorts &amp;lt;portnumbers&amp;gt;&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; status enabled|disabled&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; access public|private|localhost&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; AllowHosts a.b.c.d,x.y.z.0/24&lt;br /&gt;
 db configuration setprop &amp;lt;servicename&amp;gt; DenyHosts e.f.g.h,l.m.n.0/24&lt;br /&gt;
&lt;br /&gt;
Effectuate the changes you have made&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/rc.d/init.d/masq&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
| --proto tcp --dport &amp;lt;Ports&amp;gt;&lt;br /&gt;
|Pre-configured for default services; no default for custom services&lt;br /&gt;
|-&lt;br /&gt;
|TCPPorts&lt;br /&gt;
| --proto tcp --dports &amp;lt;Ports&amp;gt;&lt;br /&gt;
|No default for custom services; Ranges of ports are defined with a : not a -&lt;br /&gt;
|-&lt;br /&gt;
|UDPPort&lt;br /&gt;
| --proto udp --dport &amp;lt;Ports&amp;gt;&lt;br /&gt;
|Pre-configured for default services; no default for custom services&lt;br /&gt;
|-&lt;br /&gt;
|UDPPorts&lt;br /&gt;
| --proto udp --dports &amp;lt;Ports&amp;gt;&lt;br /&gt;
|No default for custom services; Ranges of ports are defined with a : not a -&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
| enabled | disabled&lt;br /&gt;
|AllowHosts is set to &amp;quot;&amp;quot; (an empty string) unless the status is &#039;enabled&#039;&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
| public | private&lt;br /&gt;
|AllowHosts is set to &amp;quot;&amp;quot; (an empty string) unless access is &#039;public&#039;&lt;br /&gt;
|-&lt;br /&gt;
|AllowHosts&lt;br /&gt;
| --src ..... --jump ACCEPT&lt;br /&gt;
|Pre-configured for default services; no default for custom services.  Default is &#039;0.0.0.0/0&#039; if service is &#039;&#039;enabled&#039;&#039; and &#039;&#039;public&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|DenyHosts&lt;br /&gt;
| --src ..... --jump denylog&lt;br /&gt;
|Pre-configured for default services; no default for custom services.  If &#039;DenyHosts&#039; is empty or does not exist then there are no &#039;... --jump denylog&#039; entries created in /etc/init.d/masq.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== SpamAssassin ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop spamassassin variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/mail/spamassassin/local.cf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|DNSAvailable&lt;br /&gt;
|dns_available&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|OkLanguages&lt;br /&gt;
|ok_languages&lt;br /&gt;
|all&lt;br /&gt;
|-&lt;br /&gt;
|OkLocales&lt;br /&gt;
|ok_locales&lt;br /&gt;
|all&lt;br /&gt;
|-&lt;br /&gt;
|ReportSafe&lt;br /&gt;
|report_safe&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Subject&lt;br /&gt;
|rewrite_header Subject&lt;br /&gt;
|[SPAM]&lt;br /&gt;
|-&lt;br /&gt;
|SkipRBLChecks&lt;br /&gt;
|skip_rbl_checks&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|TrustedNetworks&lt;br /&gt;
|trusted_networks&lt;br /&gt;
|127.&lt;br /&gt;
|-&lt;br /&gt;
|UseAutoWhitelist&lt;br /&gt;
|use_auto_whitelist&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|UseBayes&lt;br /&gt;
|use_bayes&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|Sensitivity&lt;br /&gt;
|required_hits&lt;br /&gt;
|medium&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sometimes certain spamassassin update servers [http://bugs.contribs.org/show_bug.cgi?id=7116 get corrupted or are not updated frequently]. &lt;br /&gt;
The list is available at:&lt;br /&gt;
&#039;&#039;&#039;/var/lib/spamassassin/3.003001/updates_spamassassin_org/MIRRORED.BY&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== MySQL (mysqld) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop mysqld variable value&lt;br /&gt;
 expand-template /etc/my.cnf&lt;br /&gt;
 sv t /service/mysqld&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/my.cnf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|InnoDB&lt;br /&gt;
|InnoDB&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|LocalNetworkingOnly&lt;br /&gt;
|LocalNetworkingOnly&lt;br /&gt;
|yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Network Time Protocol (ntpd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop ntpd variable value&lt;br /&gt;
 signal-event timeserver-update&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/ntpd/env/MEMLIMIT&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MemLimit&lt;br /&gt;
|MEMLIMIT&lt;br /&gt;
|35000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/ntp/step-tickers and /etc/ntp.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|NTPServer&lt;br /&gt;
|server&lt;br /&gt;
|pool.ntp.org&lt;br /&gt;
|-&lt;br /&gt;
|SyncToHWClockSupported&lt;br /&gt;
|SyncToHWClockSupported&lt;br /&gt;
|yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====SupportLargeDrift=====&lt;br /&gt;
A new db key for ntpd: SupportLargeDrift. &lt;br /&gt;
Default value is disabled, which doesn&#039;t change the current behaviour. [[bugzilla: 7979]] &lt;br /&gt;
&lt;br /&gt;
If set to enabled, it will&lt;br /&gt;
- add tinker panic 0 at the begening of the ntp.conf&lt;br /&gt;
- remove the lines&lt;br /&gt;
 server 127.127.1.0 # local clock&lt;br /&gt;
 fudge 127.127.1.0 stratum 10&lt;br /&gt;
&lt;br /&gt;
With SupportLargeDrift enabled, the guest is able to resync the clock with the&lt;br /&gt;
configured ntp server, even after resuming from a suspended state (tested with&lt;br /&gt;
a ~10min drift, it took about 3 or 4 minutes for the guest to resync the clock&lt;br /&gt;
after resuming).&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop ntpd SupportLargeDrift enabled&lt;br /&gt;
&lt;br /&gt;
==== Php ====&lt;br /&gt;
see [[PHP]] page for all the available options&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop php variable value&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/php.ini&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|max_execution_time&lt;br /&gt;
|30&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|memory_limit&lt;br /&gt;
|32M&lt;br /&gt;
|-&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|post_max_size&lt;br /&gt;
|20M&lt;br /&gt;
|-&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|upload_max_filesize&lt;br /&gt;
|10M&lt;br /&gt;
|-&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|allow_url_fopen&lt;br /&gt;
|Off&lt;br /&gt;
|-&lt;br /&gt;
|ExposePHP&lt;br /&gt;
|expose_php : Exposes to the world that PHP is installed on the server&lt;br /&gt;
|Off&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;Don&#039;t forget &amp;quot;M&amp;quot; unit because you get a lot of httpd errors and apache can&#039;t start!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/php-fpm.d/{ibays.conf,www.conf,custom.conf} and /etc/e-smith/templates/etc/httpd/conf/httpd.conf/&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|AllowUrlfOpen&lt;br /&gt;
|disabled, set to enabled&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|disabled, set a M as unit, eg 64M&lt;br /&gt;
|-&lt;br /&gt;
|UpMaxFileSize&lt;br /&gt;
|UpMaxFileSize&lt;br /&gt;
|disabled, set a M as unit, eg 64M&lt;br /&gt;
|-&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|disabled, set a M as unit, eg 64M&lt;br /&gt;
|-&lt;br /&gt;
|MaxExecTime&lt;br /&gt;
|MaxExecTime&lt;br /&gt;
|disabled, set time in second without units, eg 60 or unlimited&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Virtual Private Network (VPN) (pptpd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop pptpd variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/ppp/options.pptpd&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|debug&lt;br /&gt;
|debug&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|mtu&lt;br /&gt;
|mtu&lt;br /&gt;
|not set by default, add your value (1404) after mtu&lt;br /&gt;
|-&lt;br /&gt;
|mru&lt;br /&gt;
|mru&lt;br /&gt;
|not set by default, add your value (1404) after mru&lt;br /&gt;
-&lt;br /&gt;
|-&lt;br /&gt;
|Passive&lt;br /&gt;
|passive&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|Interfaces&lt;br /&gt;
|Unknown&lt;br /&gt;
|not set by default&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/pptpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|debug&lt;br /&gt;
|debug&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Pro FTP (proftpd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop ftp variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/proftpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
==== Qmail ====&lt;br /&gt;
You can set the maximum size of email to be sent&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
expressed in bytes&lt;br /&gt;
 db configuration setprop qmail MaxMessageSize 15000000&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/proftpd.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|MaxMessageSize&lt;br /&gt;
|The maximum email size for sending&lt;br /&gt;
|15000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Qpsmptd====&lt;br /&gt;
{{Note box |For KOOZALI SME 10 server, qpsmtpd replaces smtpd.}}&lt;br /&gt;
&lt;br /&gt;
Work in progress !!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 config show qpsmtpd&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file:     &lt;br /&gt;
.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Authentication&lt;br /&gt;
|Authentication&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|Bcc&lt;br /&gt;
|Bcc&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|BccMode&lt;br /&gt;
|BccMode&lt;br /&gt;
|cc&lt;br /&gt;
|-&lt;br /&gt;
|BccUser&lt;br /&gt;
|BccUser&lt;br /&gt;
|maillog&lt;br /&gt;
|-&lt;br /&gt;
|DKIMSigning&lt;br /&gt;
|DKIMSigning&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|DNSBL&lt;br /&gt;
|DNSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|Instances&lt;br /&gt;
|Instances&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|InstancesPerIP&lt;br /&gt;
|InstancesPerIP&lt;br /&gt;
|5&lt;br /&gt;
|-&lt;br /&gt;
|LogLevel&lt;br /&gt;
|LogLevel&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
|MaxScannerSize&lt;br /&gt;
|MaxScannerSize&lt;br /&gt;
|25000000&lt;br /&gt;
|-&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|PatternScan&lt;br /&gt;
|PatternScan&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|Proxy&lt;br /&gt;
|Proxy&lt;br /&gt;
|blocked&lt;br /&gt;
|-&lt;br /&gt;
|RBLList&lt;br /&gt;
|RBLList&lt;br /&gt;
|bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org&lt;br /&gt;
|-&lt;br /&gt;
|RHSBL&lt;br /&gt;
|RHSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|RelayRequiresAuth&lt;br /&gt;
|RelayRequiresAuth&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|SBLList&lt;br /&gt;
|SBLList&lt;br /&gt;
|multi.surbl.org,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|TCPPort&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|TCPProxyPort&lt;br /&gt;
|TCPProxyPort&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|TlsBeforeAuth&lt;br /&gt;
|TlsBeforeAuth&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
|UBLList&lt;br /&gt;
|UBLList&lt;br /&gt;
|multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|-&lt;br /&gt;
|URIBL&lt;br /&gt;
|URIBL&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|VirusScan&lt;br /&gt;
|VirusScan&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|access&lt;br /&gt;
|public&lt;br /&gt;
|-&lt;br /&gt;
|qplogsumm&lt;br /&gt;
|qplogsumm&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Samba global settings (smbd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop smb variable value&lt;br /&gt;
 signal-event ibay-modify &lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/samba/smb.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|RecycleBin&lt;br /&gt;
|recycle&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|ShadowCopy&lt;br /&gt;
|shadow_copy&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|DeadTime&lt;br /&gt;
|deadtime&lt;br /&gt;
|10080&lt;br /&gt;
|-&lt;br /&gt;
|DisplayCharSet&lt;br /&gt;
|display charset&lt;br /&gt;
|ISO8859-1&lt;br /&gt;
|-&lt;br /&gt;
|DosCharSet&lt;br /&gt;
|dos charset&lt;br /&gt;
|850&lt;br /&gt;
|-&lt;br /&gt;
|LogonDrive&lt;br /&gt;
|logon drive&lt;br /&gt;
|Z&lt;br /&gt;
|-&lt;br /&gt;
|OpLocks&lt;br /&gt;
|oplocks&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|OsLevel&lt;br /&gt;
|os level&lt;br /&gt;
|65&lt;br /&gt;
|-&lt;br /&gt;
|ServerString&lt;br /&gt;
|server string&lt;br /&gt;
|SME Server&lt;br /&gt;
|-&lt;br /&gt;
|SMBPorts&lt;br /&gt;
|smb ports&lt;br /&gt;
|139&lt;br /&gt;
|-&lt;br /&gt;
|UnixCharSet&lt;br /&gt;
|unix charset&lt;br /&gt;
|UTF8&lt;br /&gt;
|-&lt;br /&gt;
|UseClientDriver&lt;br /&gt;
|use client driver&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|LogLevel&lt;br /&gt;
|log level&lt;br /&gt;
|1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Samba per i-bay settings (smbd) ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db accounts setprop ibay_name variable value&lt;br /&gt;
 signal-event ibay-modify &lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/samba/smb.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Browseable&lt;br /&gt;
|browseable&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|OpLocks&lt;br /&gt;
|oplocks&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|RecycleBin&lt;br /&gt;
|recycle&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|VetoOplockFiles&lt;br /&gt;
|veto oplock files&lt;br /&gt;
|(not set)&lt;br /&gt;
|-&lt;br /&gt;
|Audit&lt;br /&gt;
|full_audit&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|KeepVersions&lt;br /&gt;
|If RecycleBin is enabled in smbd, then you can keep version of recycle bin&lt;br /&gt;
|disabled, set it to enabled&lt;br /&gt;
|-&lt;br /&gt;
|ShadowCopy&lt;br /&gt;
|If Shadowcopy is enabled in the smbd, then you can turn off per ibay&lt;br /&gt;
|enabled, set it to disabled&lt;br /&gt;
|-&lt;br /&gt;
|cscPolicy&lt;br /&gt;
|set the csc policy (manual, documents, programs, disable)&lt;br /&gt;
|(not set)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Squid Proxy (squid) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop squid variable value&lt;br /&gt;
 signal-event proxy-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/squid/squid.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|SSLPorts&lt;br /&gt;
|Configure additional https ports (use single port or multiple ports separated by coma (,)&lt;br /&gt;
|no default value (443 and 563 are hard coded)&lt;br /&gt;
|-&lt;br /&gt;
|SafePorts&lt;br /&gt;
|acl Safe_ports port&lt;br /&gt;
|80&lt;br /&gt;
|-&lt;br /&gt;
|EnforceSafePorts&lt;br /&gt;
|EnforceSafePorts&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
How to configure additional https ports &lt;br /&gt;
* only one port&lt;br /&gt;
  config setprop squid SSLPorts 2083&lt;br /&gt;
  signal-event proxy-update&lt;br /&gt;
* several ports&lt;br /&gt;
  config setprop squid SSLPorts 2083,569,1,568,965&lt;br /&gt;
  signal-event proxy-update&lt;br /&gt;
* remove ports&lt;br /&gt;
 config setprop squid SSLPorts &amp;quot;&amp;quot;&lt;br /&gt;
 signal-event proxy-update&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/squid/squid.conf and /etc/rc.d/init.d/masq&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Transparent&lt;br /&gt;
|Transparent&lt;br /&gt;
|yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/rc.d/init.d/masq&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|TransparentPort&lt;br /&gt;
|TransparentPort&lt;br /&gt;
|3128&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Alternate Usage for Configuration of an Up-Stream Proxy Server&#039;&#039;&lt;br /&gt;
 db configuration set squid-parent-variable value&lt;br /&gt;
 signal-event proxy-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/squid/squid.conf&lt;br /&gt;
!squid-parent-variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|SquidParent&lt;br /&gt;
|name-or-ip-of-upstream-proxy-server&lt;br /&gt;
|(none)&lt;br /&gt;
|-&lt;br /&gt;
|SquidParentPort&lt;br /&gt;
|port-number-used-by-upstream-proxy-server&lt;br /&gt;
|(none)&lt;br /&gt;
|}(un-do using &#039;db configuration delete SquidParent&#039;, &#039;signal-event proxy-update&#039;)&lt;br /&gt;
&lt;br /&gt;
==== SSH (sshd) ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db configuration setprop sshd variable value&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/ssh/sshd_config&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|Port&lt;br /&gt;
|22&lt;br /&gt;
|-&lt;br /&gt;
|Protocol&lt;br /&gt;
|Protocol&lt;br /&gt;
|2&lt;br /&gt;
|-&lt;br /&gt;
|UsePAM&lt;br /&gt;
|UsePAM&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|MaxAuthTries&lt;br /&gt;
|MaxAuthTries&lt;br /&gt;
|2&lt;br /&gt;
|-&lt;br /&gt;
|MaxStartups&lt;br /&gt;
|MaxStartups&lt;br /&gt;
|10:30:60&lt;br /&gt;
|-&lt;br /&gt;
| MotdStatus&lt;br /&gt;
| MotdStatus (display or not the motd)&lt;br /&gt;
| enabled&lt;br /&gt;
|-&lt;br /&gt;
|PasswordAuthentication&lt;br /&gt;
|PasswordAuthentication&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|PermitRootLogin&lt;br /&gt;
|PermitRootLogin&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|AllowHosts &lt;br /&gt;
|AllowHosts&lt;br /&gt;
|IP address(es) list&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{Note box|Currently in SME 7.2 and up, TCPPort is configurable via server-manager, under Remote Access menu.&lt;br /&gt;
&lt;br /&gt;
To configure AllowHosts:&lt;br /&gt;
IP address(es) list is a single IP or a comma separated list of IP addresses and/or netmasks (e.g. 16.17.18.19,203.14.64.0/24).&lt;br /&gt;
Ssh will then only be allowed from those IP addresses. The firewall code will drop ssh connections from any other hosts.}}&lt;br /&gt;
&lt;br /&gt;
=====Autoblock_ssh=====&lt;br /&gt;
&lt;br /&gt;
see [[AutoBlock#Public_SSH_Acess]]&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/ssh/sshd_config&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AutoBlockTime&lt;br /&gt;
|AutoBlockTime&lt;br /&gt;
|900&lt;br /&gt;
|-&lt;br /&gt;
|AutoBlockTries&lt;br /&gt;
|AutoBlockTries&lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
|AutoBlock &lt;br /&gt;
|AutoBlock&lt;br /&gt;
|enabled for sme9/disabled for sme8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== smtpd ====&lt;br /&gt;
{{Warning box| OBSOLETE. smtpd has been deprecated in sme10. now the variable is qpsmtpd.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 config setprop smtpd variable value&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /var/service/qpsmtpd/runenv&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;[[bugzilla:7846]]&#039;&#039;&#039;: Changes to &amp;lt;code&amp;gt;&#039;&#039;&#039;Instances&#039;&#039;&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;&#039;&#039;InstancesPerIP&#039;&#039;&#039;&amp;lt;/code&amp;gt; require a restart of qpsmtpd:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;expand-template /var/service/qpsmtpd/runenv &amp;amp;&amp;amp; sv t /service/qpsmtpd /service/sqpsmtpd&amp;lt;/code&amp;gt;&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Instances&lt;br /&gt;
|Total smtp Instances&lt;br /&gt;
|40&lt;br /&gt;
|-&lt;br /&gt;
|InstancesPerIP&lt;br /&gt;
|smtp-Instances-Per-IP&lt;br /&gt;
|5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|+Affected file: /var/service/qpsmtpd/config/smtpgreeting&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|Greeting&lt;br /&gt;
|Hostname portion of the greeting provided by your server to inbound SMTP connections&lt;br /&gt;
|$SystemName.$DomainName&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|+Affected file: /var/qmail/control/helohost&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|HeloHost&lt;br /&gt;
|SMTP Helo / Ehlo value provided by your server when connecting to external SMTP servers to send email&lt;br /&gt;
|$DomainName&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== yum ====&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 config setprop yum variable value&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/yum.conf&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|AutoInstallUpdates&lt;br /&gt;
|Install updates automatically?&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|check4updates&lt;br /&gt;
|Frequency of Update Checking daily(default but monthly or weekly available)&lt;br /&gt;
|daily&lt;br /&gt;
|-&lt;br /&gt;
|EnableGroups&lt;br /&gt;
|Enable Groups&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|GPGCheck&lt;br /&gt;
|Check GPG signature for repositories&lt;br /&gt;
|0&lt;br /&gt;
|-&lt;br /&gt;
|PackageFunctions&lt;br /&gt;
|Display individual packages in &#039;Software Installer&#039;&lt;br /&gt;
|disabled&lt;br /&gt;
|-&lt;br /&gt;
|RandomDelay&lt;br /&gt;
|Random Delay&lt;br /&gt;
|120&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|Yum&#039;s status&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|RestrictRepo&lt;br /&gt;
|Repo names whose contents should be excluded from &#039;Available Packages&#039; in the &#039;Software Installer&#039;&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|RestrictRPM&lt;br /&gt;
|All or part of an RPM name to be excluded from &#039;Available Packages&#039; in the &#039;Software Installer&#039;&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|DeltaRpmProcess&lt;br /&gt;
| Only changes between the installed package and the new one are downloaded. Once the delta rpm loaded, a rebuilding process is started only SME10 see [[bugzilla:8834]])&lt;br /&gt;
| disabled (by default)/enabled&lt;br /&gt;
|-&lt;br /&gt;
| DownloadOnlyHour XX (0-23)&lt;br /&gt;
| Set the time when to download rpm updates by yum (only sme10 see [bugzilla:1502]])&lt;br /&gt;
| default is 04 AM if no property &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See also &#039;db yum_repositories&#039; [http://wiki.contribs.org/Category:Yum_Repository All available repositories]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Usage&#039;&#039;&lt;br /&gt;
 db yum_repositories setprop RepositoryName variable value&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+Affected file: /etc/yum.smerepos.d/sme-base.repo&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|EnableGroups&lt;br /&gt;
|Enable groupinstall with yum&lt;br /&gt;
|Yes(default)/no&lt;br /&gt;
|-&lt;br /&gt;
|GPGCheck&lt;br /&gt;
|Enable the rpm verification by GPG of the repository signature&lt;br /&gt;
|Yes(default)/no&lt;br /&gt;
|-&lt;br /&gt;
|MirrorList&lt;br /&gt;
|It is the base url where the repository can be found&lt;br /&gt;
|no default value&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|Enable the repository in yum, all updates will be installed if enabled&lt;br /&gt;
|disabled/enabled&lt;br /&gt;
|-&lt;br /&gt;
|Visible&lt;br /&gt;
|The repository can be selected from &#039;Enabled repositories&#039; in the &#039;Software Installer&#039; in order to be Enabled by Yum if set to yes&lt;br /&gt;
|no&lt;br /&gt;
|-&lt;br /&gt;
|IncludePkgs &#039;rpm1,rpm2,rpm3&#039;&lt;br /&gt;
|Only rpms mentioned here will be available for installation or upgrade.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Exclude &#039;rpm1,rpm2,rpm3&#039;&lt;br /&gt;
| rpms mentioned here will be excluded by yum &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DeltaRpmPercentage XX&lt;br /&gt;
| Defines the maximum ratio allowed between the delta rpm size and the package size on a per-repository basis: by default, delta rpms can’t be bigger than 75% of the size of the associated rpms, otherwise they are not used. Set to disabled if  you don&#039;t want to use deltarpm for this repository (only SME10 see [[bugzilla:8834]])&lt;br /&gt;
| default is &#039;75&#039; if no property&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous Other DB Variables ====&lt;br /&gt;
{{Note box|This is meant to be an easy place to add db variable information if you don&#039;t have time to put it into the correct section(s) above.  You can find most of the template fragments affected by a given db variable if you execute:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/e-smith&lt;br /&gt;
 fgrep -lR &#039;&#039;variable&#039;&#039; templ&amp;lt;nowiki&amp;gt;*/* |&amp;lt;/nowiki&amp;gt; less&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;variable&#039;&#039; is the name of the variable using correct capitalization&lt;br /&gt;
 &lt;br /&gt;
Note that any command listed here is to be executed on one line!}}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Command&lt;br /&gt;
!service(s)&lt;br /&gt;
!config file(s)&lt;br /&gt;
!notes&lt;br /&gt;
|-&lt;br /&gt;
|db domains setprop test.com &#039;&#039;&#039;MailServer&#039;&#039;&#039; a.b.c.d &amp;lt;br&amp;gt;or use FQDN in place of a.b.c.d&amp;lt;br&amp;gt; eg db domains setprop test.com &#039;&#039;&#039;MailServer&#039;&#039;&#039; aspmx.l.google.com&lt;br /&gt;
|qpsmtpd; qmail; fetchmail&lt;br /&gt;
|/var/service/qpsmtpd/config/goodrcptto&lt;br /&gt;
&lt;br /&gt;
/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
&lt;br /&gt;
/var/service/qpsmtpd/config/peers/&lt;br /&gt;
&lt;br /&gt;
/var/service/qpsmtpd/plugins&lt;br /&gt;
&lt;br /&gt;
/var/service/qmail/control/virtualdomains&lt;br /&gt;
&lt;br /&gt;
/var/service/qmail/control/smtproutes&lt;br /&gt;
&lt;br /&gt;
/etc/fetchmail&lt;br /&gt;
|Forward all email for the specified domain to the IP address &#039;&#039;a.b.c.d&#039;&#039;.  &#039;&#039;a.b.c.d&#039;&#039; can be either local or remote.  By default, the recipient address will be verified as valid on &#039;&#039;a.b.c.d&#039;&#039; before SME accepts the inbound message.&lt;br /&gt;
|-&lt;br /&gt;
|config set &#039;&#039;&#039;SquidParent&#039;&#039;&#039; &amp;lt;hostname or IP&amp;gt;&lt;br /&gt;
|squid, diald&lt;br /&gt;
|/etc/diald.filter, /etc/squid/squid.conf&lt;br /&gt;
|Configure squid to peform all web downloads from the specified upstream proxy server&lt;br /&gt;
|-&lt;br /&gt;
|config set &#039;&#039;&#039;SquidParentPort&#039;&#039;&#039; &amp;lt;portnumber&amp;gt;&lt;br /&gt;
|squid&lt;br /&gt;
|/etc/squid/squid.conf&lt;br /&gt;
|Connect to the upstream proxy server using &amp;lt;portnumber&amp;gt;.  Defaults to 3128 if &#039;SquidParentPort&#039; is unspecified. Ignored if SquidParent is not set.&lt;br /&gt;
|-&lt;br /&gt;
|config delete &#039;&#039;&#039;SquidParent&#039;&#039;&#039;&lt;br /&gt;
|squid, diald&lt;br /&gt;
|/etc/squid/squid.conf, /etc/diald.filter&lt;br /&gt;
|Return squid to normal operation (no upstream proxy server)&lt;br /&gt;
|-&lt;br /&gt;
|db accounts setprop username Visible internal ; signal-event email-update&lt;br /&gt;
|n/a&lt;br /&gt;
|n/a&lt;br /&gt;
|Make an email address invisible from outside? (see http://forums.contribs.org/index.php?topic=36302.0)&lt;br /&gt;
|-&lt;br /&gt;
|db accounts setprop pseudonym Visible internal ; signal-event email-update&lt;br /&gt;
|n/a&lt;br /&gt;
|n/a&lt;br /&gt;
|Make an pseudonym email address invisible from outside&lt;br /&gt;
|-&lt;br /&gt;
|db &amp;lt;database&amp;gt; delprop key &#039;&#039;property&#039;&#039; ; /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
|various&lt;br /&gt;
|various&lt;br /&gt;
|Restore the developers&#039; default value for &#039;&#039;property&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|db &amp;lt;database&amp;gt; delete &#039;&#039;key&#039;&#039; ; /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
|various&lt;br /&gt;
|various&lt;br /&gt;
|Restore the developers&#039; default value for each property belonging to the key &#039;&#039;key&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|config set &#039;&#039;&#039;AdminIsNotRoot&#039;&#039;&#039; enabled&lt;br /&gt;
|n/a&lt;br /&gt;
|n/a&lt;br /&gt;
|In server-manager panel, changing admin password no more change root password. root password is managed through &#039;&#039;&#039;passwd&#039;&#039;&#039; shell command and admin and root passwords can be distinct passwords.&lt;br /&gt;
|-&lt;br /&gt;
|config setprop smtp-auth-proxy PeerPort xxx; signal-event email-update&lt;br /&gt;
|smtp-auth-proxy&lt;br /&gt;
|none - the smtp-auth-proxy executable (//usr/local/sbin/smtp-auth-proxy.pl) reads the config database directly.&lt;br /&gt;
|Used to change the port number used to connect to the upstream mail server (&amp;quot;SMTPSmartHost&amp;quot; or &amp;quot;Address of Internet provider&#039;s mail server&amp;quot;).  Defaults to port 25 if PeerPort is not set; uses SSL if port 465 is selected.&lt;br /&gt;
|-&lt;br /&gt;
|db configuration setprop qpsmtpd tlsCipher &#039;&#039;&#039;XXX&#039;&#039;&#039;; signal-event email-update&lt;br /&gt;
|qpsmtpd&lt;br /&gt;
|/var/service/qpsmtpd/config/tls_ciphers&lt;br /&gt;
|By default qpsmtpd only accepts the stronger SSL 3.0 or TLS 1.0 protocols for securing SMTPS connections. If needed, one can set qpsmtpd to also allow the weaker SSL 2.0 protocol. For &#039;&#039;&#039;XXX&#039;&#039;&#039; one can use:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; &#039;&#039;&#039;&amp;lt;tt&amp;gt;&#039;ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM&#039;&amp;lt;/tt&amp;gt;&#039;&#039;&#039; (SSLv2/SSLv3/TLSv1)&amp;lt;br /&amp;gt;&#039;&#039;&#039;&amp;lt;tt&amp;gt;&#039;HIGH:!SSLv2&#039;&amp;lt;/tt&amp;gt;&#039;&#039;&#039; (=Default: only allow stronger SSLv3/TLSv1 protocols)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;Note: don&#039;t forget to use the quotes!!&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|config setprop pppoe Mlimit &amp;lt;value&amp;gt;&lt;br /&gt;
|pppoe&lt;br /&gt;
|/service/wan/run.pppoe.conf&lt;br /&gt;
|notes.  - &amp;lt;value&amp;gt; cannot be set below 100000000 - &amp;lt;value&amp;gt; can be set above 100000000.&lt;br /&gt;
If pppoe Mlimit is set to a value &#039;&#039;&#039;below the MIN_MEMORY_LIMIT&#039;&#039;&#039;, currently 100000000, this lower value will not be accepted &#039;&#039;&#039;and Mlimit will be set to the default value (100000000)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|command&lt;br /&gt;
|service(s)&lt;br /&gt;
|config file(s)&lt;br /&gt;
|notes.  Copy this block when adding new entries to this table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Port Forwarding ====&lt;br /&gt;
Server manager will create two databases, one for TCP and one for UDP&lt;br /&gt;
&lt;br /&gt;
db portforward_tcp set {port} forward AllowHosts {some.host.ip} Comment {Test} Denyhosts {0.0.0.0/0} DestHost {dest.host.ip} DestPort {port}&lt;br /&gt;
&lt;br /&gt;
 db portforward_udp set {port} forward AllowHosts {some.host.ip} Comment {Test} Denyhosts {0.0.0.0/0} DestHost {dest.host.ip} DestPort {port}&lt;br /&gt;
&lt;br /&gt;
Apply with:&lt;br /&gt;
&lt;br /&gt;
 signal-event portforwarding-update&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Variable&lt;br /&gt;
!Target&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|port&lt;br /&gt;
|Incoming Port for Forwarding&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|DestPort&lt;br /&gt;
|Destination Target Port&lt;br /&gt;
|port&lt;br /&gt;
|-&lt;br /&gt;
|DestHost&lt;br /&gt;
|Destination Host IP&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|AllowHosts&lt;br /&gt;
|Allowed Hosts&lt;br /&gt;
|0.0.0.0/0&lt;br /&gt;
|-&lt;br /&gt;
|DenyHosts&lt;br /&gt;
|Denied Hosts&lt;br /&gt;
|0.0.0.0/0&lt;br /&gt;
|-&lt;br /&gt;
|Comment&lt;br /&gt;
|Notes for this rule&lt;br /&gt;
|none&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Collabora&amp;diff=104</id>
		<title>SMEServer Collabora</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Collabora&amp;diff=104"/>
		<updated>2026-01-14T17:26:51Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Collabora (This page was last edited on 14 November 2025, at 06:40.)  {{Languages}} &amp;lt;!-- here we define the contrib name variable --&amp;gt; &amp;lt;!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want--&amp;gt; {{#vardefine:contribname| {{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }} {{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }} &amp;lt;!-- we defi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Collabora (This page was last edited on 14 November 2025, at 06:40.)&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
&amp;lt;!-- here we define the contrib name variable --&amp;gt;&lt;br /&gt;
&amp;lt;!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want--&amp;gt;&lt;br /&gt;
{{#vardefine:contribname| {{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
&amp;lt;!-- we define the language --&amp;gt;&lt;br /&gt;
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}&lt;br /&gt;
&lt;br /&gt;
{{Infobox contribs&lt;br /&gt;
|name={{#var:contribname}}&lt;br /&gt;
|image=Collabora_Online_primary_logo.svg&lt;br /&gt;
|description_image= {{#var:contribname}} logo&lt;br /&gt;
|maintainer= Unnilennium&lt;br /&gt;
|licence= &lt;br /&gt;
|url= https://www.collaboraoffice.com/code/&lt;br /&gt;
|category= Cloud&lt;br /&gt;
|tags=Nextcloud,Online Office,Document editor,Cloud&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Maintainer===&lt;br /&gt;
&lt;br /&gt;
[[User:Unnilennium|Jean-Philippe Pialasse]]&lt;br /&gt;
&lt;br /&gt;
=== Version ===&lt;br /&gt;
&lt;br /&gt;
{{#smeversion: {{#var:smecontribname}} }}&lt;br /&gt;
=== Description ===&lt;br /&gt;
Collabora Online is a powerful LibreOffice-based online office that supports all major document, spreadsheet and presentation file formats, which you can integrate into your own infrastructure.&lt;br /&gt;
&lt;br /&gt;
Key features are collaborative editing and excellent office file format support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This package offers a configuration of the open source development edition https://www.collaboraoffice.com/code/&lt;br /&gt;
&lt;br /&gt;
A VirtualHost property is to be filled with a domain name so the daemon will be reversed proxy through your apache httpd server. Do not forget to also define this Virtualdomain to your list of domains, enable it for let&#039;s encrypt if you use it, and also define this domain to point to your server at your DNS provider.&lt;br /&gt;
&lt;br /&gt;
Collabora Online requires a dedicated virtual host and it’s only accessible from HTTPS with a valid certificate.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For SME 11&amp;quot;&amp;gt;&lt;br /&gt;
 dnf install smeserver-extrarepositories-collaboraoffice&lt;br /&gt;
 dnf  install {{#var:smecontribname}} collaboraofficebasis-en-US collaboraoffice-dict-en&lt;br /&gt;
&lt;br /&gt;
then you will need to configure let&#039;s say domain collabora.mydomain.com&lt;br /&gt;
&lt;br /&gt;
configuration part for domain + let&#039;s encrypt and nextcloud on the same server, please just change the content of the variable $MYDOMAIN&lt;br /&gt;
 MYDOMAIN=&amp;quot;collabora.mydomain.com&amp;quot;&lt;br /&gt;
 db domains set $MYDOMAIN domain Content Primary Description collabora Nameservers localhost  letsencryptSSLcert enabled TemplatePath Collabora&lt;br /&gt;
 signal-event domain-create $MYDOMAIN&lt;br /&gt;
 expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
 dehydrated -c&lt;br /&gt;
 signal-event smeserver-collabora-update&lt;br /&gt;
&lt;br /&gt;
then all is configured in nextcloud installed on the same server&lt;br /&gt;
if you do want to keep self signed certificate you need to issue&lt;br /&gt;
 occ config:app:set disable_certificate_verification --value &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Reminder configure your domain DNS to point to your server!&lt;br /&gt;
&lt;br /&gt;
We assume you also already have configured correctly [[Letsencrypt]] and [[Nextcloud]] contribs BEFORE.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For SME 10&amp;quot;&amp;gt;&lt;br /&gt;
 yum install smeserver-extrarepositories-collaboraoffice&lt;br /&gt;
 yum --enablerepo=smecontribs install {{#var:smecontribname}} collaboraofficebasis-en-US collaboraoffice-dict-en&lt;br /&gt;
&lt;br /&gt;
then you will need to configure let&#039;s say domain collabora.mydomain.com&lt;br /&gt;
&lt;br /&gt;
configuration part for domain + let&#039;s encrypt and nextcloud on the same server, please just change the content of the variable $MYDOMAIN&lt;br /&gt;
 MYDOMAIN=&amp;quot;collabora.mydomain.com&amp;quot;&lt;br /&gt;
 config setprop coolwsd VirtualHost $MYDOMAIN&lt;br /&gt;
 db domains set $MYDOMAIN domain Content Primary Description collabora Nameservers localhost  letsencryptSSLcert enabled TemplatePath Collabora&lt;br /&gt;
 signal-event domain-create $MYDOMAIN&lt;br /&gt;
 expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
 dehydrated -c&lt;br /&gt;
 signal-event smeserver-collabora-update&lt;br /&gt;
&lt;br /&gt;
then all is configured in nextcloud installed on the same server&lt;br /&gt;
&lt;br /&gt;
Reminder configure your domain DNS to point to your server!&lt;br /&gt;
&lt;br /&gt;
We assume you also already have configured correctly [[Letsencrypt]] and [[Nextcloud]] contribs BEFORE.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add to the yum install line the dictionary you need, or add one later &lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For SME 11&amp;quot;&amp;gt;&lt;br /&gt;
  dnf install collaboraoffice-dict-fr collaboraofficebasis-fr&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For SME 10&amp;quot;&amp;gt;&lt;br /&gt;
  yum install collaboraoffice-dict-fr collaboraofficebasis-fr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tweaking ===&lt;br /&gt;
&lt;br /&gt;
==== language available ====&lt;br /&gt;
Available languages are: ar, bg, br, ca, cs, da, de, el, es, et, fr, gd, gl, gu, he, hi, hr, hu, id, is, it, ko, lt, lv, nl, no, oc, pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, te, tr, uk, vi&lt;br /&gt;
&lt;br /&gt;
In order to use new dictionaries, you may have to change the &amp;quot;allowed_languages&amp;quot; setting in /etc/coolwsd/coolwsd.xml . In the example below the Danish dictionary is added as an &amp;quot;allowed language&amp;quot;:&lt;br /&gt;
 $ diff coolwsd.xml.bak coolwsd.xml&lt;br /&gt;
 10c10&lt;br /&gt;
 &amp;lt;       &amp;lt;allowed_languages default=&amp;quot;de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru&amp;quot; desc=&amp;quot;List of supported languages of Writing Aids (spell checker, grammar checker, thesaurus, hyphenation) on this instance. Allowing too many has negative effect on startup performance.&amp;quot;&amp;gt;de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru&amp;lt;/allowed_languages&amp;gt;&lt;br /&gt;
 ---&lt;br /&gt;
 &amp;gt;       &amp;lt;allowed_languages default=&amp;quot;de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru&amp;quot; desc=&amp;quot;List of supported languages of Writing Aids (spell checker, grammar checker, thesaurus, hyphenation) on this instance. Allowing too many has negative effect on startup performance.&amp;quot;&amp;gt;da en_GB en_US&amp;lt;/allowed_languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== menu display ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To modify look on the toolbar for Compact Biew (as opposed to Tabbed View) in nextcloud config , OR change this to compact : &lt;br /&gt;
&lt;br /&gt;
/etc/coolwsd/&amp;lt;mark&amp;gt;coolwsd.xml&amp;lt;/mark&amp;gt;&lt;br /&gt;
    &amp;lt;code&amp;gt;182		&amp;lt;user_interface&amp;gt;&lt;br /&gt;
    183			&amp;lt;mode default=&amp;quot;default&amp;quot; desc=&amp;quot;Controls the user interface style. The &#039;default&#039; means: Take the value from ui_defaults, or decide for one of compact or tabbed (default|compact|tabbed)&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;compact&amp;lt;/mode&amp;gt;&lt;br /&gt;
    184			&amp;lt;use_integration_theme default=&amp;quot;true&amp;quot; desc=&amp;quot;Use theme from the integrator&amp;quot; type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/use_integration_theme&amp;gt;&lt;br /&gt;
    185		&amp;lt;/user_interface&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
you can list the available configuration with the following command :&lt;br /&gt;
 config show coolwsd&lt;br /&gt;
&lt;br /&gt;
Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!property&lt;br /&gt;
!default&lt;br /&gt;
!values&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|VirtualHost&lt;br /&gt;
|&lt;br /&gt;
|domain&lt;br /&gt;
|you need one domain configured to allow it to work with nextcloud&lt;br /&gt;
|-&lt;br /&gt;
|AllowWopiHost&lt;br /&gt;
|&lt;br /&gt;
|comma separated list of ip or domains&lt;br /&gt;
|list of domains allowed to access collabora, by default empty.  the server itself and nextcloud defined Virtualhost are added to this list&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|&lt;br /&gt;
|private, public,local&lt;br /&gt;
|not defined for localhost use only; please leave it as it&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|&lt;br /&gt;
|port number&lt;br /&gt;
|default is listening on localhost:9980,  but please no SSL configuration keep it this way, and rather use http proxy with VirtualHost property&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Uninstall ===&lt;br /&gt;
 yum remove {{#var:smecontribname}}  CODE-brand collaboraoffice collaboraoffice-* collaboraofficebasis-* coolwsd&lt;br /&gt;
&lt;br /&gt;
=== Sources ===&lt;br /&gt;
# https://help.nextcloud.com/t/start-to-finish-nextcloud-collabora-step-by-step-guide/10602&lt;br /&gt;
# https://help.nextcloud.com/t/collabora-connection-refused/5024&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title= bugzilla}}&lt;br /&gt;
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}&lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}} &lt;br /&gt;
&lt;br /&gt;
===Changelog===&lt;br /&gt;
Only released version in smecontrib are listed here.&lt;br /&gt;
&lt;br /&gt;
{{ #smechangelog: {{#var:smecontribname}} }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- list of category you want to see this page in --&amp;gt;&lt;br /&gt;
[[Category: Contrib]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Please keep there the template revision  number as is --&amp;gt;&lt;br /&gt;
[[contribtemplate::2| ]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Useful&amp;diff=103</id>
		<title>SMEServer Useful</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Useful&amp;diff=103"/>
		<updated>2026-01-14T17:20:32Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Useful_Commands (This page was last modified on 28 July 2025, at 12:05.)&lt;br /&gt;
&lt;br /&gt;
{{usefulnote}}&lt;br /&gt;
==SME Server locale==&lt;br /&gt;
By default the sme server 8 locale is ISO-8859-1ldapsear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ACL==&lt;br /&gt;
&lt;br /&gt;
===See ACL===&lt;br /&gt;
 getfacl /path/2/files/or/folders&lt;br /&gt;
&lt;br /&gt;
===set ACL===&lt;br /&gt;
 setfacl -P -R -m u:apache:rwX,d:u:apache:rwX /path/2/files/or/folders&lt;br /&gt;
&lt;br /&gt;
-R : recursive&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-P : physical, follow symlinks&lt;br /&gt;
&lt;br /&gt;
==Apache Related Commands==&lt;br /&gt;
===Apache options to ibay===&lt;br /&gt;
====Expand &amp;lt;b&amp;gt;httpd.conf&amp;lt;/b&amp;gt; template====&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
 sv h /service/httpd-e-smith&lt;br /&gt;
or&lt;br /&gt;
 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
 /usr/bin/sv h /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
====Restart httpd====&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
or &lt;br /&gt;
 sv t /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
=====SME10=====&lt;br /&gt;
How do I start, restart, stop, reload and check the status of a service (httpd-e-smith.service) with systemd.&lt;br /&gt;
&lt;br /&gt;
 # systemctl start httpd-e-smith.service&lt;br /&gt;
 # systemctl restart httpd-e-smith.service&lt;br /&gt;
 # systemctl stop httpd-e-smith.service&lt;br /&gt;
 # systemctl reload httpd-e-smith.service&lt;br /&gt;
 # systemctl status httpd-e-smith.service&lt;br /&gt;
&lt;br /&gt;
====Enable AllowOverride All/None====&lt;br /&gt;
leave Apache reads the distributed configuration file &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;.htaccess&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; per ibay:&lt;br /&gt;
 db accounts setprop IBAYNAME AllowOverride All&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME AllowOverride&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====enable Symlinks in that iBay====&lt;br /&gt;
 db accounts setprop IBAYNAME FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME FollowSymLinks&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====disable apache directory indexes per ibay====&lt;br /&gt;
 db accounts setprop IBAYNAME Indexes disabled&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME Indexes&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====PHPBaseDir per ibay====&lt;br /&gt;
the phpbasedir is a &amp;quot;php-jail&amp;quot;, if you want that it uses its normal jail and allow it to use also /tmp then :&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop IBAYNAME PHPBaseDir /home/e-smith/files/ibays/IBAYNAME/:/tmp/&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====Allow PHP URL File Open per ibay====&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make custom httpd directory if not exist&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Create the template name &amp;lt;b&amp;gt;99allow_url_fopen&amp;lt;/b&amp;gt; and put the content&lt;br /&gt;
 &amp;lt;Directory /home/e-smith/files/ibays/IBAYNAME/html&amp;gt;&lt;br /&gt;
 php_admin_flag allow_url_fopen on&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
Save the file&lt;br /&gt;
&lt;br /&gt;
Expand&lt;br /&gt;
 expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Restart httpd.&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
&lt;br /&gt;
====Allow PHP URL File Open====&lt;br /&gt;
&lt;br /&gt;
This is set with a db command.&lt;br /&gt;
Use the command here&lt;br /&gt;
 http://wiki.contribs.org/DB_Variables_Configuration#Php&lt;br /&gt;
and replace the variable and value&lt;br /&gt;
eg&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop php AllowUrlFopen On&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
&lt;br /&gt;
====PHP document root====&lt;br /&gt;
 $_SERVER[&#039;DOCUMENT_ROOT&#039;]&lt;br /&gt;
If you set up an application in an ibay you may have some odd results due to the usage of $_SERVER[&#039;DOCUMENT_ROOT&#039;] by the application.&lt;br /&gt;
By default this is set in php.ini to :&lt;br /&gt;
&lt;br /&gt;
 /home/e-smith/files/ibays/Primary/html&lt;br /&gt;
&lt;br /&gt;
How to overcome $_SERVER[&#039;DOCUMENT_ROOT&#039;] issues in ibays see [[PHP_document_root]]&lt;br /&gt;
&lt;br /&gt;
====PHP settings only for SME9====&lt;br /&gt;
{{Tip box|msg=These settings modify only the behaviour of one ibay and not at all the whole php settings for the server. Only for sme9, see [[bugzilla:8239]]}}&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop ibayname variable value&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
&lt;br /&gt;
 AllowUrlFopen : enabled/disabled&lt;br /&gt;
 MemoryLimit : set a M as unit, eg 64M&lt;br /&gt;
 UpMaxFileSize : set a M as unit, eg 64M&lt;br /&gt;
 PostMaxSize : set a M as unit, eg 64M&lt;br /&gt;
 MaxExecTime: unlimited or set time in second without units, eg 60&lt;br /&gt;
&lt;br /&gt;
====PHPinfo====&lt;br /&gt;
PHPinfo will provide an overview of all PHP related settings. A quick way to get an overview or search for a setting, one could use:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; | less&lt;br /&gt;
or to save to a text file:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; &amp;gt; phpinfo.txt&lt;br /&gt;
or to search for specific values and save to a text file:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; | grep mysql &amp;gt; phpmysql.txt&lt;br /&gt;
&lt;br /&gt;
===https forced redirection using custom template===&lt;br /&gt;
see [[Https_redirection]]&lt;br /&gt;
&lt;br /&gt;
If it does not already exist then create the following directory&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts&lt;br /&gt;
&lt;br /&gt;
 cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts&lt;br /&gt;
&lt;br /&gt;
 nano 60redir-ibayname1&lt;br /&gt;
&lt;br /&gt;
Paste or type the following code including the brackets, replacing ibayname with the name of your ibay&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 if ($port ne &amp;quot;443&amp;quot;)&lt;br /&gt;
 {&lt;br /&gt;
 $OUT .= &amp;lt;&amp;lt;&#039;HERE&#039;;&lt;br /&gt;
 ## Redirect Web Address to Secure Address&lt;br /&gt;
 RewriteEngine on&lt;br /&gt;
 RewriteRule ^/ibayname https://%{HTTP_HOST}/ibayname&lt;br /&gt;
 &lt;br /&gt;
 ## End Of Redirect&lt;br /&gt;
 HERE&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Save the file &amp;amp; exit by Ctrl+x&lt;br /&gt;
&lt;br /&gt;
 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/httpd restart&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
===Debug the Mount of a remote workstation Share===&lt;br /&gt;
In the case of you have errors when you mount a remote cifs share (used by the panel &#039;backup or restore&#039;, you can experiment by just running the two commands from the command line (replace $host $share $mountdir appropriately)&lt;br /&gt;
 /bin/mount -t cifs &amp;quot;//$host/$share&amp;quot; $mountdir -o credentials=/etc/dar/CIFScredentials,nounix&lt;br /&gt;
 /bin/mountpoint  $mountdir&lt;br /&gt;
&lt;br /&gt;
For example :&lt;br /&gt;
 /bin/mount -t cifs  &amp;quot;//192.168.xx.xx/backup-sme&amp;quot; /mnt/smb -o credentials=/etc/dar/CIFScredentials,nounix&lt;br /&gt;
 /bin/mountpoint /mnt/smb/&lt;br /&gt;
&lt;br /&gt;
===Launch Manually a backup===&lt;br /&gt;
* only for an usb_backup or a remote_backup&lt;br /&gt;
 /etc/e-smith/events/actions/workstation-backup-dar&lt;br /&gt;
&lt;br /&gt;
==Certificates==&lt;br /&gt;
see http://wiki.contribs.org/Certificates_Concepts&lt;br /&gt;
===How to change your certificate===&lt;br /&gt;
&lt;br /&gt;
Since SME version 7.1.3, the functionality to configure a Common Name in the certificate is included in the main SME packages and can be configured as follows:&lt;br /&gt;
&lt;br /&gt;
 config setprop modSSL CommonName www.domain.com&lt;br /&gt;
 expand-template /home/e-smith/ssl.crt/crt&lt;br /&gt;
 expand-template /home/e-smith/ssl.key/key&lt;br /&gt;
 signal-event domain-modify&lt;br /&gt;
 signal-event email-update &lt;br /&gt;
&lt;br /&gt;
see this forum thread [http://forums.contribs.org/index.php?topic=33109.15] and bug report [http://bugs.contribs.org/show_bug.cgi?id=1689]&lt;br /&gt;
&lt;br /&gt;
===How to set a different expiration time===&lt;br /&gt;
&lt;br /&gt;
The SME self signed certificate is valid for one year, and is automatically renewed on the anniversary of the installation date of the SME server OS.&lt;br /&gt;
To specify how long your SME certificate will last for, do the following: &lt;br /&gt;
&lt;br /&gt;
 cp /etc/e-smith/templates/home/e-smith/ssl.crt /etc/e-smith/templates-custom/home/e-smith/ssl.crt&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/home/e-smith/ssl.crt&lt;br /&gt;
&lt;br /&gt;
change the value for KEYLIFEINDAYS on the first line to the number of days the certificate will remain valid for eg 1826 for 5 years.&lt;br /&gt;
&lt;br /&gt;
Save &amp;amp; exit by pressing the following keys at the same time&lt;br /&gt;
 ctrl o&lt;br /&gt;
 ctrl x&lt;br /&gt;
&lt;br /&gt;
Create a new self signed certificate, with the longer validity period. Replace the filenames below with the correct file/key names applicable to your server.&lt;br /&gt;
 rm /home/e-smith/ssl.crt/servername.domain.com.crt&lt;br /&gt;
 rm /home/e-smith/ssl.key/servername.domain.com.key&lt;br /&gt;
 rm /home/e-smith/ssl.pem/servername.domain.com.pem&lt;br /&gt;
 signal-event post-upgrade&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Install the new certificate into your browser. &lt;br /&gt;
&lt;br /&gt;
Also see http://wiki.contribs.org/Certificates_Concepts&lt;br /&gt;
&lt;br /&gt;
===How to simply recreate the certificate for SME Server===&lt;br /&gt;
&lt;br /&gt;
 rm /home/e-smith/ssl.{crt,key,pem}/*&lt;br /&gt;
 config delprop modSSL CommonName&lt;br /&gt;
 config delprop modSSL crt&lt;br /&gt;
 config delprop modSSL key&lt;br /&gt;
 signal-event post-upgrade&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
alternately&lt;br /&gt;
 config show modSSL&lt;br /&gt;
 config delprop modSSL crt key CertificateChainFile&lt;br /&gt;
 signal-event ssl-update&lt;br /&gt;
&lt;br /&gt;
==Command-Line Quick Reference Guide==&lt;br /&gt;
Below is a list of commands that I use all the time &amp;amp; tend to forget.&lt;br /&gt;
===Generic Linux===&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! COMMAND NAME !! DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| /usr/sbin/smbd -V || samba version&lt;br /&gt;
|-&lt;br /&gt;
| /usr/sbin/httpd -v || apache version&lt;br /&gt;
|-&lt;br /&gt;
| httpd -t || verify the syntax of the configuration file of apache&lt;br /&gt;
|-&lt;br /&gt;
| httpd -tf /path/to/config/file || verify the syntax of the specified configuration file of apache&lt;br /&gt;
|-&lt;br /&gt;
| httpd -t -D DUMP_MODULES || display all loaded modules of apache&lt;br /&gt;
|-&lt;br /&gt;
| mysql -v || mysql version&lt;br /&gt;
|-&lt;br /&gt;
| php -v ||  php version&lt;br /&gt;
|-&lt;br /&gt;
| du -sh /* || shows your folder sizes by directory in the root (you can adapt to your directory path) &lt;br /&gt;
|-&lt;br /&gt;
| df -h || shows disk usage in human readable form&lt;br /&gt;
|-&lt;br /&gt;
| man &amp;lt;commandname&amp;gt; || shows more info about a command&lt;br /&gt;
|-&lt;br /&gt;
| uname -a || kernel release version&lt;br /&gt;
|-&lt;br /&gt;
| mv || moves or renames a file&lt;br /&gt;
|-&lt;br /&gt;
| cp || copies or backup a file&lt;br /&gt;
|-&lt;br /&gt;
| rm || removes or deletes a file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;ps -aux|grep &amp;lt;process&amp;gt;&amp;lt;/nowiki&amp;gt; || outputs processes running &amp;lt;process&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ps -AH || report process status&lt;br /&gt;
|-&lt;br /&gt;
| ps fax || display processes by tree with their pid &lt;br /&gt;
|-&lt;br /&gt;
| top || shows processes&lt;br /&gt;
|-&lt;br /&gt;
| top -i ||  shows only active processes&lt;br /&gt;
|-&lt;br /&gt;
| htop  || shows processes (more versatile than top)&lt;br /&gt;
|-&lt;br /&gt;
| iptraf || shows network info&lt;br /&gt;
|-&lt;br /&gt;
| mc -d  || show midnight commander (cli file browser) to navigate through system easily&lt;br /&gt;
|-&lt;br /&gt;
| host -t mx aol.com || shows the mx records for aol.com&lt;br /&gt;
|-&lt;br /&gt;
| dig any aol.com || show all dns records for aol.com (you can choose the dns server by adding its IP or hostname : &#039;@8.8.4.4&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| net groupmap list || shows samba mappings to nt groups&lt;br /&gt;
|-&lt;br /&gt;
| telinit 1 || changes to single user mode&lt;br /&gt;
|-&lt;br /&gt;
| ifconfig || shows detailed info on ethernet ports&lt;br /&gt;
|-&lt;br /&gt;
| grep -nsr &amp;quot;casesensitivesearch&amp;quot; /path/to/dir || finds all documents containing the criteria in a dir (add &#039;i&#039; to the options for a non sensitive search)&lt;br /&gt;
|-&lt;br /&gt;
| grep -nsri server-manager.jpg  /etc/e-smith/ || search the file server-manager.jpg in the path directory /etc/e-smith&lt;br /&gt;
|-&lt;br /&gt;
| grep -P &#039;^www |apache&#039; /etc/group || search after patterns which start by www and/or apache in /etc/group&lt;br /&gt;
|-&lt;br /&gt;
| tail -f /var/log/&amp;lt;LOGFILE&amp;gt; || realtime viewing of your log file&lt;br /&gt;
|-&lt;br /&gt;
| tar -czvf foo.tar.gz foo || creates a tar/zip file of a directory&lt;br /&gt;
|-&lt;br /&gt;
| tar -xvzf foo.tar.gz || untar/unzip a tar/zip file&lt;br /&gt;
|-&lt;br /&gt;
| scp -P &amp;lt;ssh_portnumber&amp;gt; foo.tar.gz &amp;lt;user&amp;gt;@&amp;lt;other_server_ipaddress&amp;gt;:/opt || transfers file to another server in /opt directory&lt;br /&gt;
|-&lt;br /&gt;
| rsync --progress -te &amp;quot;ssh -p &amp;lt;ssh_portnumber&amp;gt;&amp;quot; foo &amp;lt;other_server_ipaddress&amp;gt;:/opt  || transfers file to another server&lt;br /&gt;
|-&lt;br /&gt;
| sed -i -e &amp;quot;s/foo/fee/g&amp;quot; &amp;lt;FILENAMEORPATHTODIR&amp;gt; || replaces foo with fee&lt;br /&gt;
|-&lt;br /&gt;
| sed &#039;/abba/Id&#039; file.txt || remove all &#039;&#039;&#039;lines&#039;&#039;&#039; with the string &#039;abba&#039; (case sensitive) in the file.txt&lt;br /&gt;
|-&lt;br /&gt;
| sed -n &#039;/^www/p&#039; /etc/group || print all line starting by www in the file /etc/group&lt;br /&gt;
|-&lt;br /&gt;
| watch mysqladmin process || shows the mysql processes running&lt;br /&gt;
|-&lt;br /&gt;
| lslbk &amp;lt;ONLY SME9&amp;gt;|| lsblk lists information about all available or the specified block devices. The lsblk command reads the sysfs filesystem to gather information. The command prints all block devices (except RAM disks) in a tree-like format by default.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;find . -type f | xargs rpm -qf | sort | uniq&amp;lt;/nowiki&amp;gt; || find from which rpm these files come from&lt;br /&gt;
|-&lt;br /&gt;
| who -r || see in which runlevel you are running (7 for sme8, 4 for sme9)&lt;br /&gt;
|-&lt;br /&gt;
| findmnt || findmnt will list all mounted filesytems or search for a filesystem.&lt;br /&gt;
|-&lt;br /&gt;
| pstree || pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted.&lt;br /&gt;
|-&lt;br /&gt;
| clamdtop || clamdtop is a tool to monitor one or multiple clamd(s), that shows the jobs in clamd’s queue, memory usage, and information about the loaded signature database.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Estimate file space usage - drill down into directories&lt;br /&gt;
 cd /&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
 cd /home&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
 cd /home/e-smith&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
&lt;br /&gt;
====UID/GID====&lt;br /&gt;
* see informations of a user&lt;br /&gt;
 id USER&lt;br /&gt;
*change the uid of a user&lt;br /&gt;
 usermod -u &#039;&#039;&#039;UID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
* create a group&lt;br /&gt;
 groupadd -g &#039;&#039;&#039;GID&#039;&#039;&#039; -o GROUPE_NAME&lt;br /&gt;
* modify the GID of a group&lt;br /&gt;
 groupmod -o -g &#039;&#039;&#039;GID&#039;&#039;&#039; GROUPE_NAME&lt;br /&gt;
* add a principal group to a user&lt;br /&gt;
 usermod -g &#039;&#039;&#039;GROUP_NAME_OR_GID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
* add a secondary group to a user&lt;br /&gt;
 usermod -a -G &#039;&#039;&#039;GROUP_NAME_OR_GID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
&lt;br /&gt;
====usermod====&lt;br /&gt;
*change the home directory (-m move files/folders to the new location)&lt;br /&gt;
 usermod -d /var/lib/jdownloader jdownloader&lt;br /&gt;
* change the shell access of a user&lt;br /&gt;
 usermod --shell /bin/bash jdownloader&lt;br /&gt;
&lt;br /&gt;
====Read a TAI64N timestamp in human readable format====&lt;br /&gt;
[http://cr.yp.to/daemontools/tai64nlocal.html tai64nlocal] converts precise TAI64N timestamps to a human-readable format. &lt;br /&gt;
tai64nlocal reads lines from stdin. If a line does not begin with @, tai64nlocal writes it to stdout without change. If a line begins with @, tai64nlocal looks for a timestamp after the @, in the format printed by tai64n, and writes the line to stdout with the timestamp converted to local time in ISO format: YYYY-MM-DD HH:MM:SS.SSSSSSSSS. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg&lt;br /&gt;
 cat  /var/log/qpsmtpd/current |tai64nlocal|less&lt;br /&gt;
Or&lt;br /&gt;
 tailf /var/log/sshd/current | tai64nlocal&lt;br /&gt;
&lt;br /&gt;
====adjust the ntp time====&lt;br /&gt;
if you want to set the correct time via ntpd without restarting the server&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in a root terminal&lt;br /&gt;
 /etc/init.d/ntpd stop&lt;br /&gt;
 ntpdate pool.ntp.org&lt;br /&gt;
 /etc/init.d/ntpd start&lt;br /&gt;
and to verify&lt;br /&gt;
 date&lt;br /&gt;
&lt;br /&gt;
====create missing group and set gid====&lt;br /&gt;
If a specific sme group or linux group is missing, you can create it again. see [[bugzilla:7932#c48]]&lt;br /&gt;
 groupadd -g 102 -o apache&lt;br /&gt;
 rpm --setugids --setperms rpm1 rpm2&lt;br /&gt;
&lt;br /&gt;
where 102 is the correct gid of apache group, adapt it to the right setting&lt;br /&gt;
where rpm1 and rpm2 are valid rpm but broken due to the lack of apache group during installation or upgrade&lt;br /&gt;
&lt;br /&gt;
if the group apache exists but with the wrong gid (example 48) you can set the 102 gid&lt;br /&gt;
&lt;br /&gt;
 groupmod -o -g 102 apache&lt;br /&gt;
&lt;br /&gt;
====display what are your network interfaces====&lt;br /&gt;
 # perl -Mesmith::ethernet -e &amp;quot;print esmith::ethernet::probeAdapters();&amp;quot;&lt;br /&gt;
 EthernetDriver1	e1000	08:00:27:23:85:a6	&amp;quot;Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)&amp;quot;&lt;br /&gt;
alternatively, and only for SME9 or greater, you can use&lt;br /&gt;
 # ip addr&lt;br /&gt;
 1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN &lt;br /&gt;
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;br /&gt;
    inet 127.0.0.1/8 scope host lo&lt;br /&gt;
 2: eth0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000&lt;br /&gt;
    link/ether AA:BB:CC:DD:EE:FF brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 11.22.22.44/XY brd 11.22.33.255 scope global eth0&lt;br /&gt;
 3: dummy0: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN &lt;br /&gt;
    link/ether 10:00:01:02:03:04 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 192.168.45.1/24 brd 192.168.45.255 scope global dummy0&lt;br /&gt;
&lt;br /&gt;
====find files by their size====&lt;br /&gt;
it could be useful to find large file by the command line &lt;br /&gt;
&lt;br /&gt;
 find /home/e-smith -type f -size +200&#039;&#039;&#039;M&#039;&#039;&#039; -exec ls -lh {} \; | awk &#039;{ print $ &amp;quot;:_&amp;quot; $5 }&#039;;&lt;br /&gt;
&lt;br /&gt;
use &lt;br /&gt;
 ‘k’    for Kilobytes (units of 1024 bytes)&lt;br /&gt;
 ‘M’    for Megabytes (units of 1048576 bytes)&lt;br /&gt;
 ‘G’    for Gigabytes (units of 1073741824 bytes)&lt;br /&gt;
&lt;br /&gt;
====reduce root&#039;s user reserved space====&lt;br /&gt;
as a default, 5% of the disk space is allocated to root user&lt;br /&gt;
&lt;br /&gt;
you can reduce the allocated space to 1% with (for LVM)&lt;br /&gt;
&lt;br /&gt;
 tune2fs -m 1 /dev/mapper/main-root&lt;br /&gt;
&lt;br /&gt;
if you&#039;re not using LVM, use &lt;br /&gt;
&lt;br /&gt;
 df -h&lt;br /&gt;
&lt;br /&gt;
to see where / is mounted&lt;br /&gt;
&lt;br /&gt;
====find files by the Name====&lt;br /&gt;
 find ~/smeserver/ -name &#039;e-smith-backup-2.4.0*&#039;&lt;br /&gt;
or use (updatedb is launched every night)&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate e-smith-backup-2.4.0&lt;br /&gt;
&lt;br /&gt;
====how much mail data per user is stored on the server====&lt;br /&gt;
&lt;br /&gt;
You can adapt that command line to your needs, here we can see the used disk spaceof  all emails stored by your users on your SME Server.&lt;br /&gt;
 du -s /home/e-smith/files/users/*/Maildir | sort -rn | cut -f2- | xargs -d &amp;quot;\n&amp;quot; du -sh&lt;br /&gt;
&lt;br /&gt;
====Replace a chain of characters====&lt;br /&gt;
Replace a chain of characters chaine1 by chaine2 in all files of the current directory with &#039;.txt&#039;&lt;br /&gt;
&lt;br /&gt;
 find . -name &amp;quot;*.txt&amp;quot; -type f -exec sed -i &amp;quot;s/chaine1/chaine2/g&amp;quot; {} \;&lt;br /&gt;
&lt;br /&gt;
====Check file system in case of corruption====&lt;br /&gt;
&lt;br /&gt;
If your filesystem is corrupted. That can be a hardware failure, or a software corruption (after a crash). The server won&#039;t boot before you manually run fsck to check/repair the filesystem. Note that this might not be possible if the problem is comming from hardware failure (hope you have backups....).&lt;br /&gt;
&lt;br /&gt;
Try this:&lt;br /&gt;
- when you&#039;re prompted to, enter the root password, you&#039;ll be dropped on a shell&lt;br /&gt;
- manually run fsck&lt;br /&gt;
&lt;br /&gt;
 e2fsck -D -tt -y /dev/main/root&lt;br /&gt;
&lt;br /&gt;
It can take several minutes/hours depending on the size of your drives and their speed. With some luck, the filesystem will be cleaned, and you&#039;ll be able to boot.&lt;br /&gt;
&lt;br /&gt;
====Adding notes/comments to shell commands====&lt;br /&gt;
You can add comments to shell commands without interrupting the functionality of the shell command. The comments will be appear in .bash_history which can be beneficial for later analysis. e.g. Why was the the command given or who entered the command. Examples:&lt;br /&gt;
 cat /etc/redhat-release #johnd What version are we running&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd status disabled #maryc Disable ssh access ticket:#12345&lt;br /&gt;
&lt;br /&gt;
With (complex) grep arguments one would be able to search the bash history on different criteria. e.g. To find all shell commands given entered by mary that have something to do with ssh (example line above):&lt;br /&gt;
 cat /root/.bash_history | grep &amp;quot;#mary&amp;quot; | grep ssh&lt;br /&gt;
will return:&lt;br /&gt;
 config setprop sshd status disabled #maryc Disable ssh access ticket:#12345&lt;br /&gt;
&lt;br /&gt;
====Adding date and time to bash history====&lt;br /&gt;
By default the bash history does not show the date and time of any activity. You can enable this by entering the following command:&lt;br /&gt;
 HISTTIMEFORMAT=&amp;quot;%d/%m/%y %T &amp;quot;&lt;br /&gt;
where %d=day, %m is month, &amp;amp;y is year and %T is time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see the bash history with the date and time added, enter:&lt;br /&gt;
 history&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the history command can be useful in combination with added comments to shell commands for more precise analysis or (automatic) reporting based on a shell script and cron.&lt;br /&gt;
&lt;br /&gt;
====Find open ports====&lt;br /&gt;
&lt;br /&gt;
* netstat&lt;br /&gt;
 # netstat -anp|grep 5232&lt;br /&gt;
 tcp        0      0 192.168.12.233:5232         0.0.0.0:*                   LISTEN      2028/python&lt;br /&gt;
&lt;br /&gt;
* nmap&lt;br /&gt;
nmap can specify if a port is closed or not&lt;br /&gt;
 yum install nmap&lt;br /&gt;
 nmap localhost -p 5232&lt;br /&gt;
&lt;br /&gt;
===Raid===&lt;br /&gt;
You have a lot of interesting tutorial [http://wiki.contribs.org/Category:Administration:Storage concerning the Raid]&lt;br /&gt;
==== shows software raid performance ====&lt;br /&gt;
 hdparm -Tt /dev/mdX &lt;br /&gt;
&lt;br /&gt;
(where X is 0,1,2,etc) 	&lt;br /&gt;
&lt;br /&gt;
==== gives raid info ==== &lt;br /&gt;
 mdadm --detail /dev/mdX &lt;br /&gt;
&lt;br /&gt;
(where X is 0,1,2,etc)&lt;br /&gt;
&lt;br /&gt;
==== shows software raid ==== &lt;br /&gt;
 cat /proc/mdstat 	&lt;br /&gt;
&lt;br /&gt;
==== remove the degraded raid ====&lt;br /&gt;
when you install the smeserver with one drive and in a degraded raid, you will see a &#039;U_&#039; state but without warnings. If you want to leave just one &#039;U&#039;&lt;br /&gt;
 mdadm --grow /dev/md0 --force --raid-devices=1&lt;br /&gt;
 mdadm --grow /dev/md1 --force --raid-devices=1&lt;br /&gt;
&lt;br /&gt;
===RPM&#039;s===&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qa	 || shows all rpms installed&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qa --last || shows all rpms installed &amp;amp; installation date&lt;br /&gt;
|-&lt;br /&gt;
| rpm -q  || asks for rpm info&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qi  || asks for detailed rpm info&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qlv &amp;lt;packagename&amp;gt; || lists all files in a package&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qlvp &amp;lt;packagename.rpm&amp;gt; || List all files in a rpm which is not installed&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qf &amp;lt;filename&amp;gt; || reports what package a file belongs to&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qV &amp;lt;packagename&amp;gt; || reports if permission and ownership are OK&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qRp &amp;lt;packagename.rpm&amp;gt; || Find what dependencies have a  rpm&lt;br /&gt;
|-&lt;br /&gt;
|  rpm -qR &amp;lt;packagename&amp;gt; || Find what dependencies have a package name&lt;br /&gt;
|-&lt;br /&gt;
| rpm -q --whatrequires &amp;lt;packagename&amp;gt; || find what packages have &amp;lt;packagename&amp;gt; as dependancy&lt;br /&gt;
|-&lt;br /&gt;
|rpm -e --test &amp;lt;packagename&amp;gt; || find what packages have &amp;lt;packagename&amp;gt; as dependancy (more verbose as above)&lt;br /&gt;
|-&lt;br /&gt;
| rpm -e --nodeps &amp;lt;packagename&amp;gt; || remove packagename without removing dependencies&lt;br /&gt;
|-&lt;br /&gt;
| rpm --setugids &amp;lt;packagename&amp;gt; || set right ownership to rpm&lt;br /&gt;
|-&lt;br /&gt;
| rpm --setperms &amp;lt;packagename&amp;gt; || set right permissions to rpm&lt;br /&gt;
|-&lt;br /&gt;
| rpm -e --noscripts &amp;lt;packagename&amp;gt; || remove packagename without executing sciptlets (%pre, %post, %preun, %postun)&lt;br /&gt;
|-&lt;br /&gt;
| rpm -Va ||  capture any damaged/incomplete rpms - but will also show lots of configuration files, which you of course expect to be modified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Find upstream rpms patched by contribs.org====&lt;br /&gt;
For the need of the distribution we ought to patch some upstream rpms, this is the list&lt;br /&gt;
 rpm -qa --qf &amp;quot;%{name} %{BuildHost}\n&amp;quot; | grep -P &#039;build64\-1|builder.koozali.org&#039; | awk &#039;{print $1}&#039; | grep -vP &#039;^smeserver|e\-smith&#039; | sort&lt;br /&gt;
&lt;br /&gt;
====Restore all permissions and ownership====&lt;br /&gt;
If you want to restore all permissions and right ownership of rpm, you can do this in a root terminal. See [[bugzilla:6851#c15]]&lt;br /&gt;
 for f in $(rpm -qa); do echo $f; rpm --setugids $f; done&lt;br /&gt;
 for f in $(rpm -qa); do echo $f; rpm --setperms $f; done&lt;br /&gt;
&lt;br /&gt;
===YUM&#039;ing and repositories===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| yum install &amp;lt;packagename&amp;gt; || installs packagename &amp;amp; any package it may need&lt;br /&gt;
|-&lt;br /&gt;
| yum remove &amp;lt;packagename&amp;gt; || removes packagename&lt;br /&gt;
|-&lt;br /&gt;
| yum history package-info &amp;lt;packagename&amp;gt; || Shows the installation/removal history of a package and it&#039;s Transaction ID [http://yum.baseurl.org/wiki/YumHistory see more commands]&lt;br /&gt;
|-&lt;br /&gt;
| yum history undo &amp;lt;Transaction ID&amp;gt; || Removes all packages from a specific Transaction ID [http://yum.baseurl.org/wiki/YumHistory see more commands]&lt;br /&gt;
|-&lt;br /&gt;
| yum list updates || list updates to any installed package&lt;br /&gt;
|-&lt;br /&gt;
| yum list available || list available packages in all repos not already installed&lt;br /&gt;
|-&lt;br /&gt;
| yum list available |grep &amp;lt;reponame&amp;gt; || list available packages -shows only from repo name&lt;br /&gt;
|-&lt;br /&gt;
| yum search &amp;lt;packagename&amp;gt;  || lists all packages in all repos matching packagename&lt;br /&gt;
|-&lt;br /&gt;
| yum clean all --enablerepo=* || Is used to clean up various things which accumulate in the yum cache (includes disabled repos) &lt;br /&gt;
|-&lt;br /&gt;
| yum --enablerepo=&amp;lt;reponame&amp;gt; &amp;lt;command&amp;gt; || enables a repo not normally enabled&lt;br /&gt;
|-&lt;br /&gt;
|  /sbin/e-smith/audittools/newrpms || shows all extra packages installed&lt;br /&gt;
|-&lt;br /&gt;
| /sbin/e-smith/audittools/repositories || show all repositories and if they are activated or not&lt;br /&gt;
|-&lt;br /&gt;
| db yum_repositories show &amp;lt;reponame&amp;gt; || show properties of the repository &amp;lt;reponame&amp;gt; &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Restoring Default Yum Repositories=====&lt;br /&gt;
&lt;br /&gt;
{{note box|If you have problems with your yum setup you may have entered incorrect repository values. Remove the current values and restore the original setting with these commands}}&lt;br /&gt;
&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
Now you have a clean install, you can re-add 3rd party repos as described above&lt;br /&gt;
&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
&lt;br /&gt;
and check if you can update your server&lt;br /&gt;
&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
==LDAP==&lt;br /&gt;
===Show/Debug the state of LDAP===&lt;br /&gt;
about the DB settings&lt;br /&gt;
 db configuration show ldap&lt;br /&gt;
&lt;br /&gt;
about the service (see the pid and the output when manually you start the service)&lt;br /&gt;
 cd /service/ldap&lt;br /&gt;
 sv s .&lt;br /&gt;
 ./run&lt;br /&gt;
&lt;br /&gt;
See the ownership of LDAP database (must be owned ldap:ldap)&lt;br /&gt;
 ll /var/lib/ldap/&lt;br /&gt;
&lt;br /&gt;
===ldif-fix===&lt;br /&gt;
it just prints what changes are needed in the ldap tree. With -u instead of -d, those changes are applied&lt;br /&gt;
 /var/service/ldap/ldif-fix -d&lt;br /&gt;
&lt;br /&gt;
===Parse the ldap catalogue===&lt;br /&gt;
&lt;br /&gt;
you can use this command&lt;br /&gt;
 slapcat&lt;br /&gt;
or if you want to sort&lt;br /&gt;
 slapcat | grep -viP &#039;userPassword|sambaNTPassword|sambaLMPassword&#039;&lt;br /&gt;
&lt;br /&gt;
===namingContexts===&lt;br /&gt;
we can conduct a simple search of the naming context to see our directory information you can display &#039;dn&#039; LDAP parameters, either by the [[SME_Server:Documentation:Administration_Manual:Chapter13#Directory|server-manager]] or by the command line :&lt;br /&gt;
 ldapsearch -x -b &#039;&#039; -s base &#039;(objectclass=*)&#039; namingContexts&#039;&#039;&lt;br /&gt;
or you can do&lt;br /&gt;
 ldapsearch -x -h localhost -s base |grep &#039;dn&#039;&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
&lt;br /&gt;
 [root@sme9 ~]# ldapsearch -x -h localhost -s base |grep &#039;dn&#039;&lt;br /&gt;
 # base &amp;lt;dc=stephane,dc=dtdns,dc=net&amp;gt; (default) with scope baseObject&lt;br /&gt;
 # stephane.dtdns.net&lt;br /&gt;
 &#039;&#039;&#039;dn: dc=mycompany,dc=local&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Retrieve the ldap base====&lt;br /&gt;
in a template you can do&lt;br /&gt;
  baseDN = &amp;quot;ou=Users,{ esmith::util::ldapBase($DomainName); }&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
===request a listing of all entries===&lt;br /&gt;
The following LDAP search is requesting a listing of all entries starting from the base &amp;quot;dc=example,dc=local&amp;quot;. This should return all of the entries&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -x -b &#039;dc=mycompany,dc=local&#039; &#039;(objectclass=*)&#039;&lt;br /&gt;
&lt;br /&gt;
===Bind with a specific user on LDAP===&lt;br /&gt;
Try to connect to ldap with credentials of a specific user and see the LDAP catalogue. Find the &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;dc&#039;&#039;&#039;&#039; by the chapter [[Useful_Commands#namingContexts|above]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -x -D uid=user2,ou=Users,dc=server1,dc=pt -W&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
 [root@sme9 ~]# ldapsearch -x -D uid=stephane,ou=Users,dc=mycompany,dc=local -W&lt;br /&gt;
&lt;br /&gt;
===Check a specific  user in LDAP catalogue===&lt;br /&gt;
display informations on the user requested. Find the &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;dc&#039;&#039;&#039;&#039; by the chapter [[Useful_Commands#namingContexts|above]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;for sme9&#039;&#039;&#039;&lt;br /&gt;
 ldapsearch -x -D cn=root,dc=server1,dc=pt -w $(cat /etc/pam_ldap.secret) -b ou=Users,dc=domain,dc=tld &amp;quot;uid=test2&amp;quot;&lt;br /&gt;
&#039;&#039;&#039;for sme8&#039;&#039;&#039;&lt;br /&gt;
  ldapsearch -x -D cn=root,dc=server1,dc=pt -w $(cat /etc/ldap.secret) -b ou=Users,dc=domain,dc=tld &amp;quot;uid=test2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
&#039;&#039;&#039;for sme9&#039;&#039;&#039;&lt;br /&gt;
 ldapsearch -x -D cn=root,dc=mycompany,dc=local -w $(cat /etc/pam_ldap.secret) -b ou=Users,dc=mycompany,dc=local &amp;quot;uid=stephane&amp;quot;&lt;br /&gt;
&#039;&#039;&#039;for sme8&#039;&#039;&#039;&lt;br /&gt;
  ldapsearch -x -D cn=root,dc=mycompany,dc=local -w $(cat /etc/ldap.secret) -b ou=Users,dc=mycompany,dc=local &amp;quot;uid=stephane&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Retrieve the ldap password===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* directly in a terminal&lt;br /&gt;
 perl -Mesmith::util -e &#039;print esmith::util::LdapPassword();&#039;&lt;br /&gt;
* in a template&lt;br /&gt;
 my $pwd = esmith::util::LdapPassword();&lt;br /&gt;
&lt;br /&gt;
if you need to call the ldap password in a script you can invoke this bash variable&lt;br /&gt;
* for sme8&lt;br /&gt;
 PWD=$(cat /etc/ldap.secret)&lt;br /&gt;
* for sme9&lt;br /&gt;
 PWD=$(cat /etc/pam_ldap.secret)&lt;br /&gt;
&lt;br /&gt;
==Log==&lt;br /&gt;
===Parse Log files to search for errors===&lt;br /&gt;
When you want to test the SME Product it can be useful to see what it occurs.&lt;br /&gt;
This CL can help you, but you should read the entire log&lt;br /&gt;
 grep -iE &amp;quot;uninitialized|WARNING|ERROR&amp;quot; /var/log/messages&lt;br /&gt;
of course this is for the /var/log/messages&lt;br /&gt;
&lt;br /&gt;
or if you want to parse all log&lt;br /&gt;
 grep -iE &amp;quot;uninitialized|WARNING|ERROR&amp;quot; /var/log/*&lt;br /&gt;
&lt;br /&gt;
{{Note box| you have now a tool in your hand to parse logfile : [[Audit_Tools#logcheck]]. You should be aware that tool is here to help to find errors in the development side of the SME Server and thus you could have a lot of false positive}}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Parse log for hack / phishing for missing files&#039;&#039;&#039; ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
EXTIP=`curl -s ifconfig.me/ip`&lt;br /&gt;
grep &amp;quot;File does not exist&amp;quot; /var/log/httpd/error_log | sed -e &#039;s#\: /#\n#&#039; | grep &amp;quot;home&amp;quot; | sort -u | sed -e &amp;quot;s#$EXTIP#\&amp;lt;IP\&amp;gt;#g&amp;quot; &amp;gt; dict_err.txt&lt;br /&gt;
# grep &amp;quot;File does not exist&amp;quot; /var/log/httpd/admin_error_log | sed -e &#039;s#\: /#\n#&#039; | grep &amp;quot;home&amp;quot; | sort -u | sed -e &amp;quot;s#$EXTIP#\&amp;lt;IP\&amp;gt;#g&amp;quot; &amp;gt; dict_admin_err.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* verbose output&lt;br /&gt;
&lt;br /&gt;
 less  /var/log/messages| grep -iE &amp;quot;useless|uninitialized|warn|fail|error|disable|unable|exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* search all logs with verbose output&lt;br /&gt;
 less  /var/log/* | grep -iE &amp;quot;useless|uninitialized|warn|fail|error|disable|unable|exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Mail==&lt;br /&gt;
see [[Email]]&lt;br /&gt;
&lt;br /&gt;
===check blocked email address by the server===&lt;br /&gt;
 grep -i &#039;blocked email address&#039; /var/log/qpsmtpd/current&lt;br /&gt;
&lt;br /&gt;
===maximum email size===&lt;br /&gt;
[[Email#Set_max_email_size]]&lt;br /&gt;
&lt;br /&gt;
===Spam filter with Server-Manager===&lt;br /&gt;
Using the Server-Manager Configuration/E-Mail panel, adjust the settings to these reasonable defaults.&lt;br /&gt;
&lt;br /&gt;
*Virus scanning Enabled&lt;br /&gt;
*Spam filtering Enabled&lt;br /&gt;
*Spam sensitivity Custom&lt;br /&gt;
*Custom spam tagging level 4&lt;br /&gt;
*Custom spam rejection level 12&lt;br /&gt;
*Sort spam into junkmail folder Enabled&lt;br /&gt;
*Modify subject of spam messages Enabled&lt;br /&gt;
&lt;br /&gt;
===spam retention in junk mailbox===&lt;br /&gt;
The server will automatically delete old spam in the junkmail folders after 90 days. You can control the number of days old spam is kept with the following commands. Where 15 is the number of days you want to keep messages, do...&lt;br /&gt;
 db configuration setprop spamassassin MessageRetentionTime 15&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 svc -t /service/qpsmtpd&lt;br /&gt;
then&lt;br /&gt;
config show spamassassin&lt;br /&gt;
&lt;br /&gt;
===Mail Statistics===&lt;br /&gt;
&lt;br /&gt;
See [[Mailstats]] for details on the mailstats package.&lt;br /&gt;
&lt;br /&gt;
 yum install --enablerepo=smecontribs smeserver-mailstats&lt;br /&gt;
&lt;br /&gt;
===Whitelist and Blacklist===&lt;br /&gt;
If mail comes in and it is misclassified as spam by Spamasassin, you can add the sender to the Spamassassin whitelist so that future messages coming in from that sender are not filtered.&lt;br /&gt;
Conversely, you can add a spammer to the Spamassassin blacklist so you never see their spam again.&lt;br /&gt;
Add senders (or their entire domains) to the global whitelist (or blacklist) with commands similar to these (as root):&lt;br /&gt;
&lt;br /&gt;
 db spamassassin setprop wbl.global *@vonage.com White&lt;br /&gt;
 db spamassassin setprop wbl.global *domain2.com White&lt;br /&gt;
 db spamassassin setprop wbl.global user@domain3.com White&lt;br /&gt;
 db spamassassin setprop wbl.global spammer@spamdomain.com Black&lt;br /&gt;
&lt;br /&gt;
expland template and save the configuration to the database&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can view the lists with this command:&lt;br /&gt;
 db spamassassin show&lt;br /&gt;
&lt;br /&gt;
These lists can be also controlled by the server-manager with the wbl contrib http://wiki.contribs.org/Email_Whitelist-Blacklist_Control&lt;br /&gt;
&lt;br /&gt;
==MySQL==&lt;br /&gt;
There appears to be no password set for the MySQL root password, but this is not true.  If you are logged in to the SME Server shell a special mechanism is in place to log you in with MySQL root privileges without prompting you for the password.&lt;br /&gt;
&lt;br /&gt;
The MySQL root password for SME Server is a 72 character random string generated during installation of SME Server. You should never change the MySQL root password as this will break your SME Server configuration. How to login as MySQL root user? describes how to access MySQL with root privileges on SME Server.&lt;br /&gt;
&lt;br /&gt;
For more informations you can see the [[MySQL]] page&lt;br /&gt;
&lt;br /&gt;
===Login as MySQL root user===&lt;br /&gt;
To login as MySQL root user, simply type &#039;mysql&#039; at the SME Server shell, this will log you in with root privileges.&lt;br /&gt;
the mysql admin password is a random password generated which can be find&lt;br /&gt;
&lt;br /&gt;
*/root/.my.cnf&lt;br /&gt;
*/etc/ldap.secret for sme8 and /etc/pam_ldap.secret for sme9&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;do not modify these files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* directly in a terminal&lt;br /&gt;
 perl -Mesmith::util -e &#039;print esmith::util::LdapPassword();&#039;&lt;br /&gt;
* in a template&lt;br /&gt;
 my $pwd = esmith::util::LdapPassword();&lt;br /&gt;
&lt;br /&gt;
if you need to call the mysql password in a script you can invoke this bash variable&lt;br /&gt;
* for sme8&lt;br /&gt;
 PWD=$(cat /etc/ldap.secret)&lt;br /&gt;
* for sme9&lt;br /&gt;
 PWD=$(cat /etc/pam_ldap.secret)&lt;br /&gt;
&lt;br /&gt;
===Create a Database and its User===&lt;br /&gt;
Create a new MySQL database (In this example the database name is databasename. Change &#039;&#039;&#039;databasename&#039;&#039;&#039;, &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; with your own choices as required)&lt;br /&gt;
&lt;br /&gt;
Login as root and issue the following command to enter the MySQL CLI and create the database:&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 create database &#039;&#039;&#039;databasename&#039;&#039;&#039;;&lt;br /&gt;
 grant all privileges on &#039;&#039;&#039;databasename&#039;&#039;&#039;.* to &#039;&#039;&#039;username&#039;&#039;&#039; identified by &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;password&#039;&#039;&#039;&#039;;&lt;br /&gt;
 flush privileges;&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
or directly from the shell or script:&lt;br /&gt;
&lt;br /&gt;
 mysql -e &amp;quot;create database &#039;&#039;&#039;databasename&#039;&#039;&#039;;&amp;quot;&lt;br /&gt;
 mysql -e &amp;quot;grant all privileges on &#039;&#039;&#039;databasename&#039;&#039;&#039;.* to &#039;&#039;&#039;username&#039;&#039;&#039; identified by &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;password&#039;&#039;&#039;&#039;;&amp;quot;&lt;br /&gt;
 mysql -e &amp;quot;flush privileges;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Remove a database===&lt;br /&gt;
Get access to the SME Server shell and MySQL and issue the following command:&lt;br /&gt;
&lt;br /&gt;
 drop database databasename;&lt;br /&gt;
or from the shell. Confirmation will be asked.&lt;br /&gt;
 mysqladmin drop databasename&lt;br /&gt;
Replace databasename with the name of the database.&lt;br /&gt;
&lt;br /&gt;
===Remove a user===&lt;br /&gt;
Get access to the SME Server shell and MySQL and issue the following command:&lt;br /&gt;
&lt;br /&gt;
 USE mysql;&lt;br /&gt;
 DELETE FROM user WHERE user = &#039;username&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
Replace username with the username you wish to delete.&lt;br /&gt;
&lt;br /&gt;
{{Tip box|mysql_setpermission is a command line menu driven utility that can assist in MySQL administration.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show databases directly from CLI===&lt;br /&gt;
&lt;br /&gt;
Directly in your Terminal you can see how much DB mysql you have.&lt;br /&gt;
&lt;br /&gt;
 mysqlshow&lt;br /&gt;
&lt;br /&gt;
 +--------------------+&lt;br /&gt;
 |     Databases      |&lt;br /&gt;
 +--------------------+&lt;br /&gt;
 | information_schema |&lt;br /&gt;
 | egroupware         |&lt;br /&gt;
 | horde              |&lt;br /&gt;
 | mysql              |&lt;br /&gt;
 | roundcube          |&lt;br /&gt;
 | test               |&lt;br /&gt;
 | wordpress          |&lt;br /&gt;
 +--------------------+&lt;br /&gt;
&lt;br /&gt;
===Other useful MySQL commands:===&lt;br /&gt;
* list all available database.&lt;br /&gt;
 show databases;&lt;br /&gt;
*display a list of the MySQL users&lt;br /&gt;
 SELECT user FROM mysql.user;&lt;br /&gt;
*remove the user jeffrey &lt;br /&gt;
 DROP USER &#039;jeffrey&#039;@&#039;localhost&#039;;&lt;br /&gt;
* list the privileges granted to the account user&lt;br /&gt;
 SHOW GRANTS FOR &#039;user&#039;@&#039;localhost&#039;;&lt;br /&gt;
* give all rights on all databases for new_dba user &lt;br /&gt;
 GRANT ALL PRIVILEGES ON *.* TO &#039;new_dba&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039; WITH GRANT OPTION;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
* give all rights on database for new_user &lt;br /&gt;
 GRANT SELECT, UPDATE, INSERT, DELETE ON database.* TO &#039;new_user&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
* will let you destroy a database. Use with care. Use &#039;mysqladmin --help&#039; for all available options.&lt;br /&gt;
 mysqladmin drop &#039;&#039;&#039;databasename&#039;&#039;&#039;;&lt;br /&gt;
* show you all &#039;&#039;&#039;table&#039;&#039;&#039; details of mysql &#039;&#039;&#039;database&#039;&#039;&#039;&lt;br /&gt;
 use database;&lt;br /&gt;
 show table status;&lt;br /&gt;
* let you see all &#039;&#039;&#039;tables&#039;&#039;&#039; of mysql &#039;&#039;&#039;database&#039;&#039;&#039;&lt;br /&gt;
 use database;&lt;br /&gt;
 show table status;&lt;br /&gt;
&lt;br /&gt;
==Password==&lt;br /&gt;
===Password strength===&lt;br /&gt;
&lt;br /&gt;
First a warning - Far too many systems out there have weak passwords and they will be broken into. Educating your users on the necessity of strong passwords is the best option. If that fails, here is how you change the password strength checking from &#039;strong&#039; to &#039;normal&#039;, which was the setting in previous versions of SME. Be careful to use the exact capitalization.&lt;br /&gt;
&lt;br /&gt;
 config setprop passwordstrength Admin normal&lt;br /&gt;
 config setprop passwordstrength Users normal&lt;br /&gt;
 config setprop passwordstrength Ibays normal&lt;br /&gt;
 &lt;br /&gt;
It is also possible, but strongly discouraged, to disable password strength checking by setting to &#039;none&#039; &lt;br /&gt;
&lt;br /&gt;
Password strength options are:&lt;br /&gt;
&lt;br /&gt;
 none         : Only checks if the password meets the minimum length requirement (default - 12 characters).&lt;br /&gt;
 normal       : Requires minimum length plus both uppercase and lowercase characters.&lt;br /&gt;
 intermediate : Requires minimum length, uppercase, lowercase, and passes a dictionary check.&lt;br /&gt;
 strong       : Requires all of intermediate&#039;s checks plus must contain numbers and special characters&lt;br /&gt;
&lt;br /&gt;
And password minimum length (which defaults to 12), can be set:&lt;br /&gt;
&lt;br /&gt;
 config setprop passwordstrength length &amp;lt;whatever&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change Password Users by the command line===&lt;br /&gt;
&lt;br /&gt;
If you want to change password to your users by the command Line instead of the user panel of SME Server you can do it like this.&lt;br /&gt;
&lt;br /&gt;
 perl -e &amp;quot;use esmith::util;esmith::util::setUserPassword( &#039;username&#039;, &#039;password&#039;);&amp;quot;;  /sbin/e-smith/signal-event  password-modify username&lt;br /&gt;
&lt;br /&gt;
run it for each user separately and replace&lt;br /&gt;
 username&lt;br /&gt;
and&lt;br /&gt;
 password&lt;br /&gt;
with the appropriate values for each of your users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For special characters note this bug regarding escaping [[bugzilla:8510]]&lt;br /&gt;
&lt;br /&gt;
Some examples :&lt;br /&gt;
&lt;br /&gt;
 perl -e &#039;use esmith::util;esmith::util::setUserPassword(&amp;quot;username&amp;quot;,&amp;quot;pass!word&amp;quot;);&#039;&lt;br /&gt;
&lt;br /&gt;
Or:&lt;br /&gt;
&lt;br /&gt;
 perl -e &amp;quot;use esmith::util;esmith::util::setUserPassword( &#039;username&#039;,&#039;pass&amp;quot;&#039;!&#039;&amp;quot;word&#039;);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Generating strong random password===&lt;br /&gt;
You can Install &#039;&#039;&#039;[[Random_Strong_Password_Generator|randpw]]&#039;&#039;&#039; else you can use manually the CL below&lt;br /&gt;
 &lt;br /&gt;
Security should not be taken lightly and password for e.g. databases, connections etc. need to be long and strong. One way of generating a strong random password is:&lt;br /&gt;
 &amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50};echo;&lt;br /&gt;
This will generate a 50 character long random password whereby the characters are selected from the above given string _A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?. The number 50 represents the length of the generated password and can be adjusted to fit your needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One could also store the generated password to a file or to a db key:&lt;br /&gt;
 &amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50} &amp;gt; mypassword.txt&lt;br /&gt;
 &lt;br /&gt;
 config set MyStrongPassword `&amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50};echo;`&lt;br /&gt;
Please note the usage of ` (the backtick character) which is not the same as the &#039; (single quote character)&lt;br /&gt;
&lt;br /&gt;
===Signalling events : Signal-event===&lt;br /&gt;
&lt;br /&gt;
The signal-event program takes an event name as an argument, and executes all of the actions in that event, providing the event name as the first parameter and directing all output to the system log. It works by listing the entries in the event directory and executing them in sequence. So for example, the command:&lt;br /&gt;
&lt;br /&gt;
 signal-event console-save&lt;br /&gt;
&lt;br /&gt;
will perform all the actions associated with the console-save event, which is defined by the contents of the /etc/e-smith/events/console-save/ directory. This is exactly what the console user interface does when you select save at the end of the console configuration wizard. &lt;br /&gt;
&lt;br /&gt;
[[SME_Server:Documentation:Developers_Manual:Chapter7#Standard_events_and_their_arguments| see all options]]&lt;br /&gt;
&lt;br /&gt;
==PHP Related Commands==&lt;br /&gt;
===Show current php settings===&lt;br /&gt;
&lt;br /&gt;
 config show php&lt;br /&gt;
&lt;br /&gt;
===Expand &amp;lt;b&amp;gt;php.ini&amp;lt;/b&amp;gt; template===&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Configure &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;PHP Basedir&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; Restriction per ibay===&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop IBAYNAME PHPBaseDir DIR1:DIR2:DIRn&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary:/tmp&lt;br /&gt;
 signal-event ibay-modify Primary&lt;br /&gt;
&lt;br /&gt;
===Execution Time===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php MaxExecutionTime ZZ&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;ZZ&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the time in seconds.&lt;br /&gt;
&lt;br /&gt;
===Memory Limit===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php MemoryLimit XXM&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;XX&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the amount of memory in Mb.&lt;br /&gt;
&lt;br /&gt;
===Upload Max File Size===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php UploadMaxFilesize WW&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WW&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the file size in Mb.&lt;br /&gt;
&lt;br /&gt;
===Post Maximum Size===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php PostMaxSize  WW&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WW&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the file size in Mb.&lt;br /&gt;
&lt;br /&gt;
===Allow URL FOpen===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Not secure. Instead use per ibay or directory.&lt;br /&gt;
&lt;br /&gt;
==SAMBA==&lt;br /&gt;
===shows samba mappings to nt groups===&lt;br /&gt;
   net groupmap list &lt;br /&gt;
===manage the SAM database(Database of Samba Users)=== &lt;br /&gt;
The pdbedit program is used to manage the users accounts stored in the sam database and can only be run by root.&lt;br /&gt;
 pdbedit -u USER -v&lt;br /&gt;
for example&lt;br /&gt;
 pdbedit -u stephane -v&lt;br /&gt;
&lt;br /&gt;
===check an smb.conf configuration===&lt;br /&gt;
testparm - check an smb.conf configuration file for internal correctness&lt;br /&gt;
 testparm -vs&lt;br /&gt;
&lt;br /&gt;
===The Trust Relationship Failure===&lt;br /&gt;
Using Samba 3 sometimes some Windows computers fall off the domain, resulting in a trust relationship failure.&lt;br /&gt;
&lt;br /&gt;
    The trust relationship between this workstation and the primary domain failed.&lt;br /&gt;
&lt;br /&gt;
This is generally caused by mis-matched work-station and domain controller account passwords. To reset this you must un-join/re-join the domain.&lt;br /&gt;
&lt;br /&gt;
===enable samba audit logs for ibays===&lt;br /&gt;
Samba audit logging can be enabled for ibays using db variables.&lt;br /&gt;
&lt;br /&gt;
Samba activity is logged in /var/log/samba/samba_audit&lt;br /&gt;
&lt;br /&gt;
To enable audit logging for an ibay named &amp;quot;fileshare&amp;quot;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;db accounts setprop fileshare Audit enabled&lt;br /&gt;
 signal-event ibay-modify fileshare&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable audit logging for every ibay on your server:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;for ibay in $(db accounts show |grep \=ibay |cut -d= -f1); do db accounts setprop $ibay Audit enabled; done&lt;br /&gt;
 signal-event ibay-modify&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of what gets logged are controlled by /etc/e-smith/templates/etc/smb.conf/ibays/10smbaudit&lt;br /&gt;
&lt;br /&gt;
==SME Server specific==&lt;br /&gt;
=== Command Line===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| signal-event post-upgrade || performs SME Server to go regenerate all templates&lt;br /&gt;
|-&lt;br /&gt;
| signal-event reboot || reboots the server&lt;br /&gt;
|-&lt;br /&gt;
| signal-event &amp;lt;event&amp;gt; || performs SME Server to go regenerate event template &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| signal-event console-save || Expands templates and reconfigures services which can be changed from the text-mode console and which do not require a reboot&lt;br /&gt;
|-&lt;br /&gt;
| signal-event dns-update || refreshes the DNS cache, useful for when you know a domain has changed IP and the TTL is too long to wait&lt;br /&gt;
|-&lt;br /&gt;
| /etc/e-smith/events/actions/navigation-conf || recreates server-manager navigation panel&lt;br /&gt;
|-&lt;br /&gt;
| config show || display the internal configuration of the server&lt;br /&gt;
|-&lt;br /&gt;
| config show &amp;lt;service name&amp;gt; || show the service configuration &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| db || shows the syntax of the db command&lt;br /&gt;
|-&lt;br /&gt;
| db configuration show || shows the entire server configuration&lt;br /&gt;
|-&lt;br /&gt;
| db configuration setprop &amp;lt;record&amp;gt; &amp;lt;property&amp;gt; &amp;lt;value&amp;gt; || sets or changes a property in the configuration database&lt;br /&gt;
|-&lt;br /&gt;
| db accounts show || shows all account details&lt;br /&gt;
|-&lt;br /&gt;
| db accounts show &amp;lt;accountname&amp;gt; || shows the account details&lt;br /&gt;
|-&lt;br /&gt;
| /etc/e-smith/events/actions/initialize-default-databases|| action for initializing the default database values&lt;br /&gt;
|}&lt;br /&gt;
===Refresh DNS cache===&lt;br /&gt;
&lt;br /&gt;
 signal-event dns-update 	&lt;br /&gt;
&lt;br /&gt;
refreshes the DNS cache, useful for when you know a domain has changed IP and the TTL is too long to wait &lt;br /&gt;
&lt;br /&gt;
===Refresh Squid Cache===&lt;br /&gt;
Extracted from: http://forums.contribs.org/index.php?topic=38848.msg176737#msg176737&lt;br /&gt;
&lt;br /&gt;
===Flush and Restart===&lt;br /&gt;
&lt;br /&gt;
 sv d /service/squid&lt;br /&gt;
 echo &amp;quot;&amp;quot; &amp;gt; /var/spool/squid/swap.state&lt;br /&gt;
 sv u /service/squid&lt;br /&gt;
&lt;br /&gt;
&amp;amp; to check it&#039;s running&lt;br /&gt;
 sv s /service/squid&lt;br /&gt;
===SystemConfig===&lt;br /&gt;
Some relative Informations to your system are recorded in the configuration database&lt;br /&gt;
 config show sysconfig&lt;br /&gt;
===db command===&lt;br /&gt;
{{note box|SME Server comes with the most used parameters set as variables in its internal configuration databases. These variables are used to store values to be used in the final configuration files. Please, read the [[SME_Server:Documentation:Developers_Manual:Section2]] to understand the template and database process.}}&lt;br /&gt;
&lt;br /&gt;
you can see this page of the wiki [[DB_Variables_Configuration]] and the [[Db_command_tutorial]]&lt;br /&gt;
&lt;br /&gt;
==== Setting db variables to default values ====&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
&lt;br /&gt;
Any db variable that has a default value can be reset to the default by deleting the variable entirely, then re-initializing the default database values as follows:&lt;br /&gt;
 config delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
==== Delete a property value ====&lt;br /&gt;
To delete the property&lt;br /&gt;
 db accounts delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Reset a property to an empty value ====&lt;br /&gt;
To reset to an empty value&lt;br /&gt;
 db accounts setprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt; &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Create DB key manually by a script====&lt;br /&gt;
&lt;br /&gt;
An example on how create by hand some db with contents in a script. all these db can not be erased because for every &#039;post-upgrade signal-event; signal-event reboot&#039;, the default values set manually below will return.&lt;br /&gt;
&lt;br /&gt;
 mkdir -p          /etc/e-smith/db/accounts/defaults/wordpress&lt;br /&gt;
 echo &amp;quot;reserved&amp;quot; &amp;gt; /etc/e-smith/db/accounts/defaults/wordpress/type&lt;br /&gt;
&lt;br /&gt;
 mkdir -p                  /etc/e-smith/db/configuration/defaults/wordpress&lt;br /&gt;
 echo &amp;quot;configuration&amp;quot;    &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/type&lt;br /&gt;
 echo &amp;quot;Wordpress weblog&amp;quot; &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/Name&lt;br /&gt;
 echo &amp;quot;global&amp;quot;           &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/PublicAccess&lt;br /&gt;
 echo &amp;quot;enabled&amp;quot;          &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/status&lt;br /&gt;
 echo &amp;quot;wordpress&amp;quot;        &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/DbName&lt;br /&gt;
 echo &amp;quot;wordpress&amp;quot;        &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/DbUser&lt;br /&gt;
 echo &amp;quot;en&amp;quot;               &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/WpLang&lt;br /&gt;
&lt;br /&gt;
in order to initialize all db settings&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
====Create DB key manually by &#039;config&#039;====&lt;br /&gt;
If you want to create a key entry manually you can use the &#039;config&#039; command and save properties in the &#039;&#039;&#039;configuration database&#039;&#039;&#039;. For your information, once deleted you cannot retrieve default values as above.&lt;br /&gt;
The generic Command line is :&lt;br /&gt;
 config configuration set key type [prop1 val1] [prop2 val2] ...&lt;br /&gt;
for example you can do&lt;br /&gt;
&lt;br /&gt;
 config set plop configuration Name wordpress PublicAccess private status enabled DbName wordpress DbUser wordpress WpLang en&lt;br /&gt;
&lt;br /&gt;
you can see the result&lt;br /&gt;
&lt;br /&gt;
 config show plop&lt;br /&gt;
  plop=configuration&lt;br /&gt;
    DbName=wordpress&lt;br /&gt;
    DbUser=wordpress&lt;br /&gt;
    Name=wordpress&lt;br /&gt;
    PublicAccess=private&lt;br /&gt;
    WpLang=en&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
===Modify Hidden settings of users===&lt;br /&gt;
====Grant bash access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; Shell /bin/bash&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Grant vpn access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039;  VPNClientAccess yes&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Grant sudo access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; Sudoer yes&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Chroot &amp;quot;user&amp;quot; on FTP usage====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; ChrootDir /home/e-smith/files/users/user/home&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== General Service Handling ===&lt;br /&gt;
====SME9====&lt;br /&gt;
SME Server uses [http://smarden.org/runit/ runit], a UNIX init scheme with service supervision. See the man page of [http://smarden.org/runit/sv.8.html the &#039;sv&#039; command]&lt;br /&gt;
&lt;br /&gt;
All other linux common way to start or stop services are also valuable&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/servicename start/stop/status&lt;br /&gt;
 service servicename start/stop/status&lt;br /&gt;
&lt;br /&gt;
*start&lt;br /&gt;
 sv u /service/servicename&lt;br /&gt;
*stop&lt;br /&gt;
 sv d /service/servicename&lt;br /&gt;
*restart&lt;br /&gt;
 sv t /service/servicename&lt;br /&gt;
* status&lt;br /&gt;
 sv s /service/servicename&lt;br /&gt;
{{tip box|you may use TAB to auto-complete your command line}}&lt;br /&gt;
&lt;br /&gt;
you have some shortcuts&lt;br /&gt;
 down =&amp;gt; &#039;d&#039;,&lt;br /&gt;
 stop =&amp;gt; &#039;d&#039;,&lt;br /&gt;
 up =&amp;gt; &#039;u&#039;,&lt;br /&gt;
 start =&amp;gt; &#039;u&#039;,&lt;br /&gt;
 restart =&amp;gt; &#039;t&#039;,&lt;br /&gt;
 sigterm =&amp;gt; &#039;t&#039;,&lt;br /&gt;
 adjust =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 reload =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 sighup =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 sigusr1 =&amp;gt; &#039;1&#039;,&lt;br /&gt;
 sigusr2 =&amp;gt; &#039;2&#039;,&lt;br /&gt;
 once =&amp;gt; &#039;o&#039;,&lt;br /&gt;
 pause =&amp;gt; &#039;p&#039;,&lt;br /&gt;
 alarm =&amp;gt; &#039;a&#039;,&lt;br /&gt;
 interrupt =&amp;gt; &#039;i&#039;,&lt;br /&gt;
 quit =&amp;gt; &#039;q&#039;,&lt;br /&gt;
 kill =&amp;gt; &#039;k&#039;,&lt;br /&gt;
 exit =&amp;gt; &#039;x&#039;,&lt;br /&gt;
&lt;br /&gt;
Restarting:&lt;br /&gt;
&lt;br /&gt;
 sv t /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
====SME10====&lt;br /&gt;
&#039;&#039;&#039;Systemctl&#039;&#039;&#039; is a &#039;&#039;&#039;systemd&#039;&#039;&#039; utility that is responsible for Controlling the &#039;&#039;&#039;systemd&#039;&#039;&#039; system and service manager. &#039;&#039;&#039;Systemd&#039;&#039;&#039; is a collection of system management daemons, utilities, and libraries which serves as a replacement of &#039;&#039;&#039;System V init&#039;&#039;&#039; daemon. Systemd functions as central management and configuration platform&lt;br /&gt;
&lt;br /&gt;
To list all loaded services on your system (whether active; running, exited or failed, use the &#039;&#039;&#039;list-units&#039;&#039;&#039; subcommand and &amp;lt;code&amp;gt;--type&amp;lt;/code&amp;gt; switch with a value of service.&lt;br /&gt;
 # systemctl list-units --type=service&lt;br /&gt;
 OR&lt;br /&gt;
 # systemctl --type=service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But to get a quick glance of all running services (i.e all loaded and actively running services), run the following command.&lt;br /&gt;
 # systemctl list-units --type=service --state=running &lt;br /&gt;
 OR&lt;br /&gt;
 # systemctl --type=service --state=running&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List all failed units.&lt;br /&gt;
 # systemctl --failed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check whether a Unit or Service is running or not?.&lt;br /&gt;
 # systemctl status httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do I start, restart, stop, reload and check the status of a service (&#039;&#039;&#039;httpd.service&#039;&#039;&#039;) in Linux.&lt;br /&gt;
 # systemctl start httpd-e-smith.service&lt;br /&gt;
 # systemctl restart httpd-e-smith.service&lt;br /&gt;
 # systemctl stop httpd-e-smith.service&lt;br /&gt;
 # systemctl reload httpd-e-smith.service&lt;br /&gt;
 # systemctl status httpd-e-smith.service&lt;br /&gt;
&lt;br /&gt;
===Add a custom service===&lt;br /&gt;
&lt;br /&gt;
see this [[Add_a_custom_service |page]]&lt;br /&gt;
&lt;br /&gt;
==SSL==&lt;br /&gt;
===Test SSL certificate===&lt;br /&gt;
This free online service performs a deep analysis of the configuration of any SSL web server on the public Internet.&lt;br /&gt;
https://www.ssllabs.com/ssltest/&lt;br /&gt;
===SSL diagnostic===&lt;br /&gt;
The s_client command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS. It is a very useful diagnostic tool for SSL servers.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.openssl.org/docs/apps/s_client.html openssl s_client] Documentation&lt;br /&gt;
*on sme&lt;br /&gt;
 openssl s_client -connect localhost:993&lt;br /&gt;
*on a remote host&lt;br /&gt;
 openssl s_client -connect yourdomain:993&lt;br /&gt;
&lt;br /&gt;
===SSL Signature algorithm===&lt;br /&gt;
you can verify the algorithm signature of your certificate&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
 openssl x509 -noout -text -in /home/e-smith/ssl.pem/sme9dev2.mycompany.local.pem&lt;br /&gt;
&lt;br /&gt;
== SSH ==&lt;br /&gt;
&lt;br /&gt;
===Enable SSH===&lt;br /&gt;
* Enable ssh access (the lazy not-so-secure way, but I am assuming for this testing/dev scenario that your external IP is really a local address behind a router)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;&lt;br /&gt;
db configuration setprop sshd status enabled&lt;br /&gt;
db configuration setprop sshd PermitRootLogin yes&lt;br /&gt;
db configuration setprop sshd acccess public&lt;br /&gt;
db configuration setprop sshd PasswordAuthentication yes&lt;br /&gt;
/sbin/e-smith/signal-event remoteaccess-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Allow ssh in public or private mode : &#039;&#039;&#039;public&#039;&#039;&#039;= all internet &#039;&#039;&#039;private&#039;&#039;&#039;= only your network&lt;br /&gt;
&lt;br /&gt;
 db configuration sshd access public&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
===Access to the terminal of your remote sme===&lt;br /&gt;
&lt;br /&gt;
 ssh root@ip-sme-or-remote-hostname&lt;br /&gt;
or&lt;br /&gt;
 ssh -pX root@ip-sme-or-remote-host (X is the port listened by ssh service)&lt;br /&gt;
&lt;br /&gt;
{{Note box| you need to forward in your router the port 22 (or whatever you decide) to your internal sme&#039;s ip and &#039;&#039;&#039;allow ssh in the server-manager with the root login and Password Authentication&#039;&#039;&#039; (Security/Remote Access menu). &#039;&#039;&#039;You can enhance security by disabling the root connection&#039;&#039;&#039; : Allow administrative command line access over secure shell NO&lt;br /&gt;
Keep in mind that you need &#039;&#039;&#039;to set the service to public access (entire internet)&#039;&#039;&#039; if you want to be accessible by ssh outside of you network (see the [[Denyhosts]] contrib for banning hosts which failed too many login attempts to your ssh deamon.)  }}&lt;br /&gt;
&lt;br /&gt;
===Execute or run a command over ssh to a remote server and auto disconnect after quit===&lt;br /&gt;
&lt;br /&gt;
 ssh -t root@ip-sme-or-remote-hostname command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &#039;command&#039; is the program or command to run. An example could be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh -t root@192.168.1.5 top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Access to the server-manager through SSH===&lt;br /&gt;
&lt;br /&gt;
We can access to the server-manager of your remote SME Server by SSH with a tunneling protocol initiated by &amp;quot;ssh -L&amp;quot;. This command has to be done by a superuser in a Terminal like if you want to be connected to your SME Server by SSH. &lt;br /&gt;
{{note box|We assume that ports are forwarded in your router to your sme internal IP (443 and 22) and the root user is allowed to access by ssh to the server.}}&lt;br /&gt;
&lt;br /&gt;
Do this in a root terminal of your Linux computer outside of your network&lt;br /&gt;
&lt;br /&gt;
 ssh -L 443:localhost:443 root@your-static-external-network-IP-or-host.dyndsn.org&lt;br /&gt;
&lt;br /&gt;
host.dyndsn.org could be a free service as [http://dyn.com/dns/ dyndns.org] or [http://www.noip.com/ noip.com]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Keep the terminal open&#039;&#039;&#039;, Then you need to use this specific URL in your WEB Browser to go to the server-manager&lt;br /&gt;
&lt;br /&gt;
 https://localhost/server-manager&lt;br /&gt;
&lt;br /&gt;
{{tip box|msg=It is possible to use putty if you are afraid about some commands in a terminal, you can find a lot of examples by typing this in google [https://www.google.com/search?q=tunneling+by+putty tunneling by putty]}}&lt;br /&gt;
&lt;br /&gt;
====Access with non standard ports====&lt;br /&gt;
In certain cases which you are not root on the local computer, you can not redirect port &amp;lt; 1024, so you have to use port &amp;gt; 1024 as the example below.&lt;br /&gt;
&lt;br /&gt;
 ssh -L 9443:localhost:443 root@your-remote-ip -p 22&lt;br /&gt;
&lt;br /&gt;
 9443 : local port&lt;br /&gt;
 443 : remote https port&lt;br /&gt;
 your-remote-ip : the remote host (could be an ip or a domain name)&lt;br /&gt;
 22 : this is the port where the ssh server is listening, you can change it in accordance with the remote server&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Keep the terminal open&#039;&#039;&#039;, Then you need to use this specific URL in your WEB Browser to go to the server-manager&lt;br /&gt;
&lt;br /&gt;
 https://localhost:9443/server-manager&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Qpsmtpd&amp;diff=102</id>
		<title>SMEServer Qpsmtpd</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Qpsmtpd&amp;diff=102"/>
		<updated>2026-01-14T17:19:35Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Qpsmtpd/sme11 (This page was last modified on 28 April 2024, at 22:45.)&lt;br /&gt;
&lt;br /&gt;
{{WIP box|this is a work in progress for the new SME 11 qpsmtpd configuration}}&lt;br /&gt;
&lt;br /&gt;
TODO: update [[Email#qpsmtpd]] for SME11&lt;br /&gt;
&lt;br /&gt;
=qpsmtpd=&lt;br /&gt;
[[Wikipedia:Qpsmtpd|qpsmtpd]] has been a core component of SME Server since SME 7, providing advanced spam fighting capabilities.&lt;br /&gt;
&lt;br /&gt;
SME Server 9.2 introduced qpsmtpd 0.96 with several new capabilities.  At the same time, smeserver-qpsmtpd has been updated to provide additional SME Server configuration options.&lt;br /&gt;
&lt;br /&gt;
SME Server 10 start moving the services to systemd.&lt;br /&gt;
&lt;br /&gt;
SME Server 11 will upgrade to qpsmtpd 1.0. At the same time, smeserver-qpsmtpd has been updated providing separate configuration for each running deamons and introducing a third running deamon now covering all usual SMTP ports 25 (qpsmtpd), 587 (new uqpsmtpd) and 465 (sqpsmtpd). Also SME11 provides a full systemd implementaiton of the services without runit. Softlimit has been increased from 50MB to 150MB.&lt;br /&gt;
&lt;br /&gt;
==Systemd Configuration ==&lt;br /&gt;
Some of the setting that were previously arranged using runit run script and multiple called script are all now present in systemd unit, with a dropin file to override default. The dropin file is templated&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
# /usr/lib/systemd/system/uqpsmtpd.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=qpsmtpd on submission port&lt;br /&gt;
After=network.target network-online.target qpsmtpd.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=simple&lt;br /&gt;
LimitDATA=150000000&lt;br /&gt;
LimitSTACK=150000000&lt;br /&gt;
LimitMEMLOCK=150000000&lt;br /&gt;
Environment=PORT=587 INSTANCES=40 INSTANCES_PER_IP=5 QPSMTPD_CONFIG=/var/service/uqpsmtpd/config PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=me&lt;br /&gt;
WorkingDirectory=/var/service/qpsmtpd/&lt;br /&gt;
&lt;br /&gt;
ExecStartPre=/sbin/e-smith/service-status uqpsmtpd&lt;br /&gt;
ExecStartPre=/sbin/e-smith/systemd/qpsmtpd-init %N&lt;br /&gt;
ExecStart=/usr/bin/qpsmtpd-forkserver \&lt;br /&gt;
        -u qpsmtpd \&lt;br /&gt;
        -l 0.0.0.0 \&lt;br /&gt;
        -p $PORT \&lt;br /&gt;
        -c $INSTANCES \&lt;br /&gt;
        -m $INSTANCES_PER_IP&lt;br /&gt;
ExecReload=/bin/kill -HUP $MAINPID&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=20s&lt;br /&gt;
SyslogIdentifier=uqpsmtpd&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sme-server.target&lt;br /&gt;
&lt;br /&gt;
# /usr/lib/systemd/system/uqpsmtpd.service.d/50koozali.conf&lt;br /&gt;
#------------------------------------------------------------&lt;br /&gt;
#              !!DO NOT MODIFY THIS FILE!!&lt;br /&gt;
# &lt;br /&gt;
# Manual changes will be lost when this file is regenerated.&lt;br /&gt;
#&lt;br /&gt;
# Please read the developer&#039;s guide, which is available&lt;br /&gt;
# at http://www.contribs.org/development/&lt;br /&gt;
#&lt;br /&gt;
# Copyright (C) 1999-2006 Mitel Networks Corporation&lt;br /&gt;
#------------------------------------------------------------&lt;br /&gt;
[Service]&lt;br /&gt;
LimitDATA=150000000&lt;br /&gt;
LimitSTACK=150000000&lt;br /&gt;
LimitMEMLOCK=150000000&lt;br /&gt;
Environment=&lt;br /&gt;
Environment=QPSMTPD_CONFIG=/var/service/uqpsmtpd/config PORT=587 INSTANCES=10 INSTANCES_PER_IP=5 PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=sme11.example.com&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Services folders==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/service/qpsmtpd&lt;br /&gt;
/var/service/qpsmtpd/config&lt;br /&gt;
/var/service/qpsmtpd/config/dkim&lt;br /&gt;
/var/service/qpsmtpd/config/peers&lt;br /&gt;
/var/service/qpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl&lt;br /&gt;
/var/service/sqpsmtpd&lt;br /&gt;
/var/service/sqpsmtpd/supervise&lt;br /&gt;
/var/service/sqpsmtpd/config&lt;br /&gt;
/var/service/sqpsmtpd/config/dkim -&amp;gt; ../../qpsmtpd/config/dkim&lt;br /&gt;
/var/service/sqpsmtpd/config/peers&lt;br /&gt;
/var/service/sqpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl -&amp;gt; ../qpsmtpd/ssl&lt;br /&gt;
/var/service/uqpsmtpd&lt;br /&gt;
/var/service/uqpsmtpd/config&lt;br /&gt;
/var/service/uqpsmtpd/config/dkim -&amp;gt; ../../qpsmtpd/config/dkim&lt;br /&gt;
/var/service/uqpsmtpd/config/peers&lt;br /&gt;
/var/service/uqpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl -&amp;gt; ../qpsmtpd/ssl&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Properties in configuration db==&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
x: use the value of qpsmtpd key property for this key too.&lt;br /&gt;
!property&lt;br /&gt;
!qpsmtpd&lt;br /&gt;
! sqpsmtpd&lt;br /&gt;
!uqpsmtpd&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|Authentication&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Bcc&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BccMode&lt;br /&gt;
|cc&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BccUser&lt;br /&gt;
|maillog&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DNSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Instances&lt;br /&gt;
|40&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|InstancesPerIP&lt;br /&gt;
|5&lt;br /&gt;
|5&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LogLevel&lt;br /&gt;
|6&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxScannerSize&lt;br /&gt;
|25000000&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|0&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PatternsScan&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Proxy&lt;br /&gt;
|blocked&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RBLList&lt;br /&gt;
|bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RHSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RelayRequiresAuth&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SoftLimit&lt;br /&gt;
|150000000&lt;br /&gt;
|150000000&lt;br /&gt;
|150000000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SBLList&lt;br /&gt;
|multi.surbl.org,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|25&lt;br /&gt;
|465&lt;br /&gt;
|587&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TCPProxyPort&lt;br /&gt;
|25&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TlsBeforeAuth&lt;br /&gt;
|1&lt;br /&gt;
|1 (hardcoded)&lt;br /&gt;
|1 (hardcoded)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|UBLList&lt;br /&gt;
|multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|URIBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|VirusScan&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|public&lt;br /&gt;
|public&lt;br /&gt;
|public&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|qplogsumm&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|KarmaNegative&lt;br /&gt;
|(2)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|KarmaStrikes&lt;br /&gt;
|(3)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HeloPolicy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(lenient)[lenient | rfc | strict]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|(0)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxLoad&lt;br /&gt;
|(7)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SPFRejectPolicy&lt;br /&gt;
|(0)[0-4]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DMARCReject&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(disabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DMARCReporting&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(enabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|disclaimer&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(disabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Config files==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+template: is templated individually ; metadata: use another template via a metadata file.&lt;br /&gt;
!config file&lt;br /&gt;
!qpsmtpd&lt;br /&gt;
!sqpsmtpd&lt;br /&gt;
!uqpsmtpd&lt;br /&gt;
!plugin&lt;br /&gt;
!related properties&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|badhelo&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|helo&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|badmailfrom&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badmailfrom&lt;br /&gt;
badmailfromto&lt;br /&gt;
&lt;br /&gt;
badrcptto&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|badrcptto&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badrcptto&lt;br /&gt;
check_goodrcptto&lt;br /&gt;
|&lt;br /&gt;
|fixed output&lt;br /&gt;
|-&lt;br /&gt;
|badrcptto_ext&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badrcptto&lt;br /&gt;
|&lt;br /&gt;
|hide emails  when db accounts setprop ACCOUNT Visible internal&lt;br /&gt;
|-&lt;br /&gt;
|dkim&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|not in use&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl_allow&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|dnsbl&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|dnsbl&lt;br /&gt;
per_user_config&lt;br /&gt;
|$qpsmtpd{RBLList}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|forcespamcheck&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|forcespamcheck&lt;br /&gt;
|&lt;br /&gt;
|empty file, plugin set in peers&lt;br /&gt;
|-&lt;br /&gt;
|goodrcptto&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|check_goodrcptto&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|invalid_resolvable_fromhost&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|resolvable_fromhost&lt;br /&gt;
|&lt;br /&gt;
|fixed output&lt;br /&gt;
|-&lt;br /&gt;
|IP&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|IP for tcpserver to bind to , 0 for all, fixed to 0&lt;br /&gt;
|-&lt;br /&gt;
|loglevel&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|logterse (...)&lt;br /&gt;
|$qpsmtpd{LogLevel}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|memory_threshold&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed to 1&lt;br /&gt;
|-&lt;br /&gt;
|norelayclients&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|relay&lt;br /&gt;
|&lt;br /&gt;
|$GatewayIP if set&lt;br /&gt;
|-&lt;br /&gt;
|peers&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|peers&lt;br /&gt;
|&lt;br /&gt;
|see peers section&lt;br /&gt;
|-&lt;br /&gt;
|plugin_dirs&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed output /usr/share/qpsmtpd/plugins&lt;br /&gt;
|-&lt;br /&gt;
|plugins&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|has a copy of peers fragments, hidden by metadata&lt;br /&gt;
|-&lt;br /&gt;
|relayclients&lt;br /&gt;
|template&lt;br /&gt;
|&#039;&#039;&#039;metadata : to remove?&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;metadata: to remove?&#039;&#039;&#039;&lt;br /&gt;
|greylisting&lt;br /&gt;
relay&lt;br /&gt;
&lt;br /&gt;
spamassassin&lt;br /&gt;
|&lt;br /&gt;
|IP allowed for relay without auth&lt;br /&gt;
|-&lt;br /&gt;
|rhsbl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|rhsbl&lt;br /&gt;
|$qpsmtpd{SBLList}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|signatures_patterns&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|uses db mailpatterns&lt;br /&gt;
|-&lt;br /&gt;
|smtpgreeting&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{Greeting}&lt;br /&gt;
|default to host.domain&lt;br /&gt;
|-&lt;br /&gt;
|spool_dir&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed output /var/spool/qpsmtpd&lt;br /&gt;
|-&lt;br /&gt;
|spool_perms&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|file, do not alter&lt;br /&gt;
|-&lt;br /&gt;
|subject_prefix&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$spamassassin{Subject}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|timeout&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{timeout}&lt;br /&gt;
|120 as default&lt;br /&gt;
|-&lt;br /&gt;
|timeoutsmtpd&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{timeoutsmtpd}&lt;br /&gt;
|120 as default&lt;br /&gt;
|-&lt;br /&gt;
|tls_before_auth&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{TlsBeforeAuth}&lt;br /&gt;
|hardcoded for uqpsmtpd and sqpsmtpd&lt;br /&gt;
|-&lt;br /&gt;
|tls_ciphers&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|tls&lt;br /&gt;
|$qpsmtpd{TlsBeforeAuth}&lt;br /&gt;
$sqpsmtpd{TlsBeforeAuth}&lt;br /&gt;
&lt;br /&gt;
$uqpsmtpd{TlsBeforeAuth}&lt;br /&gt;
|sqpsmtpd default to uqpsmtpd&lt;br /&gt;
global default is $modSSL{CipherSuite} &lt;br /&gt;
|-&lt;br /&gt;
|tls_protocols&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|tls&lt;br /&gt;
|SSLv2, SLv3, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3&lt;br /&gt;
|TLS1.2 minimum for uqpsmtpd and sqpsmtpd&lt;br /&gt;
TLS1.1 minimum for qpsmtpd&lt;br /&gt;
&lt;br /&gt;
properties are set individually for each service&lt;br /&gt;
|-&lt;br /&gt;
|uribl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{UBLList}&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Peer plugin configuration==&lt;br /&gt;
SME Server uses a plugin call peers, that set the plugins used depending on the client IP, i.e. 2 configurations are presents one for LAN and another for WAN.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
X for not present/overriden&lt;br /&gt;
!plugin&lt;br /&gt;
!config&lt;br /&gt;
!qp local&lt;br /&gt;
!qp 0&lt;br /&gt;
!sqp /uqp&lt;br /&gt;
local&lt;br /&gt;
!sqp/uqp&lt;br /&gt;
0&lt;br /&gt;
!TODO&lt;br /&gt;
|-&lt;br /&gt;
|00setup&lt;br /&gt;
|set bounce_unknown_user&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|02logterse&lt;br /&gt;
|logging/logterse&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|04tls&lt;br /&gt;
|tls ssl/cert.pem ssl/cert.pem ssl/cert.pem ssl/dhparam.pem&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|05auth_cvm_unix_local&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|To remove&lt;br /&gt;
|-&lt;br /&gt;
|06auth_imap&lt;br /&gt;
|auth/auth_imap 127.0.0.1 143&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|09karma&lt;br /&gt;
|karma negative $negative strikes $strikes reject naughty db_dir /var/lib/qpsmtpd/karma&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|enabled by default ?&lt;br /&gt;
|-&lt;br /&gt;
|10earlytalker&lt;br /&gt;
|earlytalker&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;add wait and check-at [ CONNECT | DATA ] options&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11bogus_bounce&lt;br /&gt;
|bogus_bounce&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|12count_unrecognized_commands&lt;br /&gt;
|count_unrecognized_commands 4&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|13bcc&lt;br /&gt;
|bcc mode $qpsmtpd{BccMode}  all $user&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|add possibility to set direction (all/incoming/outgoing)&lt;br /&gt;
|-&lt;br /&gt;
|14relay&lt;br /&gt;
|relay&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|should we remove from  465 and 581 or set RELAY ONLY ? &lt;br /&gt;
|-&lt;br /&gt;
|15helo&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;helo policy { $qpsmtpd{HeloPolicy} || &#039;lenient&#039; } reject naughty&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|16resolvable_fromhost&lt;br /&gt;
|resolvable_fromhost&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|17headers&lt;br /&gt;
|headers future $days past $days&amp;quot; if ($days)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|19loadcheck&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;loadcheck max_load { $qpsmtpd{MaxLoad} || &#039;7&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|20rhsbl&lt;br /&gt;
|rhsbl&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|221spf&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;sender_permitted_from reject 1 no_dmarc_policy { $qpsmtpd{SPFRejectPolicy} || &#039;0&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|change default to 1&lt;br /&gt;
|-&lt;br /&gt;
|222dkim&lt;br /&gt;
|dkim reject 0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|223dmarc&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;marc reject { (( $qpsmtpd{DMARCReject} || &#039;disabled&#039; ) =~ m/^1|on|enabled|yes$/) ? &#039;1&#039; : &#039;0&#039; } reporting { (( $qpsmtpd{DMARCReporting} || &#039;enabled&#039; ) =~ m/^1|on|enabled|yes$/) ? &#039;1&#039; : &#039;0&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|22dnsbl&lt;br /&gt;
|dnsbl reject naughty&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|23naughty&lt;br /&gt;
|naughty reject mail&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|24uribl&lt;br /&gt;
|uribl action deny&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|30badmailfrom&lt;br /&gt;
|badmailfrom&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|34badrcptto&lt;br /&gt;
|badrcptto&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|34badrcptto_ext&lt;br /&gt;
|badrcptto more_badrcptto badrcptto_ext&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|37check_smtp_forward&lt;br /&gt;
|check_smtp_forward&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|needed for submission ?&lt;br /&gt;
|-&lt;br /&gt;
|38check_goodrcptto&lt;br /&gt;
|check_goodrcptto extn -&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|39rcpt_ok&lt;br /&gt;
|rcpt_ok&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|62pattern_filter&lt;br /&gt;
|virus/pattern_filter check=patterns action=deny&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|62tnef2mime&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|65disclaimer&lt;br /&gt;
|disclaimer&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|missing disclaimer_file definition?&lt;br /&gt;
|-&lt;br /&gt;
|70spamassassin&lt;br /&gt;
|spamassassin reject $spamassassin{RejectLevel} munge_subject_threshold $spamassassin{TagLevel} size_limit $spamassassin{MaxMessageSize}&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|71forcespamcheck&lt;br /&gt;
|forcespamcheck reject $spamassassin{RejectLevel} munge_subject_threshold $spamassassin{TagLevel} size_limit $spamassassin{MaxMessageSize}&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|80clamav&lt;br /&gt;
|virus/clamdscan scan_all yes clamd_socket /run/clamd/clamd.socket defer_on_error yes max_size $max_size&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|90queue-qmail-queue&lt;br /&gt;
|queue/qmail-queue&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|also content commented to remove ?&lt;br /&gt;
|-&lt;br /&gt;
|90queue-smtp-forward&lt;br /&gt;
|# commented out&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Upgrade Considerations==&lt;br /&gt;
we used check_badcountries for a while, but could we switch back to ident/geoip ?&lt;br /&gt;
&lt;br /&gt;
whitelist plugin :  adding the ip-range whitelist; add login of ip &lt;br /&gt;
&lt;br /&gt;
===A-Record DNSBL Services===&lt;br /&gt;
:Some DNSBL services - notably b.barracudacentral.org - provide their results using a DNS &amp;quot;A&amp;quot; record instead of a DNS TXT record.  The dnsbl plugin requires these services to include a colon (&amp;quot;:&amp;quot;) in dnsbl_zones - however, SME used to use a colon the server separator in the configuration database.  In order to support these A-Record DNSBL services, the separator for RBLList, SBLList, and the new UBLList is now a comma.&lt;br /&gt;
&lt;br /&gt;
:You can now configure b.barracudacentral.org using (note the single quotes):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;config setprop qpsmtpd RBLList server1,server2,&#039;b.barracudacentral.org:Blocked - see &amp;lt;http://bbl.barracudacentral.com/q.cgi?ip=%IP%&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DKIM &amp;amp; DMARC===&lt;br /&gt;
:DKIM &amp;amp; DMARC are now supported natively by SME Server.  To enable these you will need to configure appropriate DNS records in your public DNS server.&lt;br /&gt;
:There are forum reports of problems for users who had DKIM enabled using the DKIM contrib.&lt;br /&gt;
===URIBL===&lt;br /&gt;
:qpsmtpd now supports URIBL - the ability to block emails that contain known malicious URLs within the body of the email.  This service is disabled by default.&lt;br /&gt;
&lt;br /&gt;
:Enable URIBL with the default services using:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;config setprop qpsmtpd URIBL enabled&lt;br /&gt;
  signal-event email-update&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Note:&#039;&#039;&#039; If your SME server is using high traffic external DNS forwarders like [https://developers.google.com/speed/public-dns/ google] (8.8.8.8 / 8.8.4.4), [https://www.opendns.com/setupguide/ opendns] (208.67.222.222 / 208.67.220.220), or any large ISP&#039;s (Cox, Comcast, Verizon), enabling URIBL may block all incoming email.  This will only affect you if you have configured a DNS forwarder in server-manager -- a default SME server installation does its own direct DNS lookups and would not be affected unless you receive over 250,000 emails per day.&lt;br /&gt;
&lt;br /&gt;
:Read more at http://uribl.com/refused.shtml&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Naughty&amp;quot; plugin===&lt;br /&gt;
:SME Server is now using the &#039;naughty&#039; plugin which allows early plugins like dnsbl, earlytalker, etc to indicate that the email should be rejected at a later point in the interaction.  This allows the server to log extra information for denied emails.  Specifically, emails denied by dnsbl will now show the sender and recipient email addresses in the qpsmtpd log&lt;br /&gt;
&lt;br /&gt;
==Plugins==&lt;br /&gt;
&lt;br /&gt;
Below is a list of all the plugins from /usr/share/qpsmtpd/plugins on a freshly updated SME 9.2 server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2; border:1px solid grey;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;+  New in SME 11&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*  Improved or changed in SME 9.2&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;U  Unused (by default) in SME Server&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;E  Extra / External Configuration Required&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;CW  Contrib or Wiki page exists that uses this plugin&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;SM Can be configured using server-manager&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;DB Can be configured using db variables&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X Provided by a contrib, not in qpsmtpd git&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;AC Auto-configured by SME Server&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
*[[Qpsmtpd:auth/auth_checkpassword|auth/auth_checkpassword]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_cvm_unix_local|auth/auth_cvm_unix_local]] (AC)&lt;br /&gt;
*[[Qpsmtpd:auth/authdeny|auth/authdeny]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_flat_file|auth/auth_flat_file]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_imap|auth/auth_imap]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_ldap_bind|auth/auth_ldap_bind]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmail|auth/auth_vpopmail]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmaild|auth/auth_vpopmaild]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmail_sql|auth/auth_vpopmail_sql]] (U)&lt;br /&gt;
*[[Qpsmtpd:autowhitelist_relayrcpt|autowhitelist_relayrcpt]] (U)&lt;br /&gt;
*[[Qpsmtpd:badmailfrom|badmailfrom]]&lt;br /&gt;
*[[Qpsmtpd:badmailfromto|badmailfromto]] (U)&lt;br /&gt;
*[[Qpsmtpd:badrcptto|badrcptto]] (AC)&lt;br /&gt;
*[[Qpsmtpd:bcc|bcc]] (U DB)&lt;br /&gt;
*[[Qpsmtpd:bogus_bounce|bogus_bounce]] (DB)&lt;br /&gt;
*check_badcountries (X [[GeoIP|CW]])&lt;br /&gt;
*[[Qpsmtpd:check_goodrcptto|check_goodrcptto]] (AC)&lt;br /&gt;
*[[Qpsmtpd:check_smtp_forward|check_smtp_forward]] (AC)&lt;br /&gt;
*[[Qpsmtpd_connection_time|connection_time]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:content_log|content_log]] (U)&lt;br /&gt;
*[[Qpsmtpd:count_unrecognized_commands|count_unrecognized_commands]] (DB)&lt;br /&gt;
*[[Qpsmtpd:denysoft_multi_rcpt|denysoft_multi_rcpt]] (U)&lt;br /&gt;
*[[Email#How_do_I_enable_and_configure_a_disclaimer_in_email_messages|disclaimer]] (U DB CW)&lt;br /&gt;
*[[Qpsmtpd:dkim|dkim]] (+ DB E)&lt;br /&gt;
*[[Qpsmtpd:dkim_sign|dkim_sign]] (+ DB E)&lt;br /&gt;
*[[Qpsmtpd:dmarc|dmarc]] (DB E)&lt;br /&gt;
*[[Email#Real-time_Blackhole_List_.28RBL.29|dnsbl]] (* DB CW)&lt;br /&gt;
*[[Qpsmtpd:dns_whitelist_soft|dns_whitelist_soft]] (U)&lt;br /&gt;
*[[Qpsmtpd:domainkeys|domainkeys]]&lt;br /&gt;
*[[Qpsmtpd:dont_require_anglebrackets|dont_require_anglebrackets]] (U)&lt;br /&gt;
*[[Qpsmtpd:dspam|dspam]] (U)&lt;br /&gt;
*[[Qpsmtpd_check_earlytalker|earlytalker]] (AC [[Qpsmtpd check earlytalker|CW]])&lt;br /&gt;
*[[Qpsmtpd:exe_filter|exe_filter]] (U AC)&lt;br /&gt;
*[[Qpsmtpd:fcrdns|fcrdns]] (U)&lt;br /&gt;
*[[Qpsmtpd:fix_headers_case|fix_headers_case]] (U CW)&lt;br /&gt;
*[[greylisting]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:handler|handler]] (U)&lt;br /&gt;
*[[Qpsmtpd:headers|headers]] (*)&lt;br /&gt;
*[[Qpsmtpd:helo|helo]] (AC)&lt;br /&gt;
*[[Qpsmtpd:help|help]] (U)&lt;br /&gt;
*[[Qpsmtpd:hosts_allow|hosts_allow]] (AC)&lt;br /&gt;
*[[Qpsmtpd:http_config|http_config]] (U)&lt;br /&gt;
*[[Qpsmtpd:ident/geoip|ident/geoip]] (U)&lt;br /&gt;
*[[Qpsmtpd:ident/p0f|ident/p0f]] (U)&lt;br /&gt;
*[[Qpsmtpd:karma|karma]] (+ U DB)&lt;br /&gt;
*[[Qpsmtpd:karma_tool|karma_tool]]&lt;br /&gt;
*[[Qpsmtpd:loadcheck|loadcheck]] (+)&lt;br /&gt;
*[[Qpsmtpd:logging|logging]] (AC)&lt;br /&gt;
*[[Qpsmtpd:loop|loop]] (U)&lt;br /&gt;
*[[Qpsmtpd:milter|milter]] (U)&lt;br /&gt;
*[[Qpsmtpd:naughty|naughty]] ()&lt;br /&gt;
*[[Qpsmtpd:noop_counter|noop_counter]] (U)&lt;br /&gt;
*[[Qpsmtpd:parse_addr_withhelo|parse_addr_withhelo]] (U)&lt;br /&gt;
*[[Qpsmtpd:peers|peers]] (AC)&lt;br /&gt;
*[[Qpsmtpd:per_user_config|per_user_config]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:qmail_deliverable|qmail_deliverable]] (U)&lt;br /&gt;
*[[Qpsmtpd:queue|queue]] (AC)&lt;br /&gt;
*[[Qpsmtpd:quit_fortune|quit_fortune]] (U)&lt;br /&gt;
*[[Qpsmtpd:random_error|random_error]] (U)&lt;br /&gt;
*[[Qpsmtpd:rcpt_map|rcpt_map]] (U)&lt;br /&gt;
*[[Qpsmtpd:rcpt_ok|rcpt_ok]] (AC)&lt;br /&gt;
*[[Qpsmtpd:rcpt_regexp|rcpt_regexp]] (U)&lt;br /&gt;
*[[Qpsmtpd:registry.txt|registry.txt]] (U)&lt;br /&gt;
*[[Qpsmtpd:relay|relay]] (AC)&lt;br /&gt;
*[[Qpsmtpd:resolvable_fromhost|resolvable_fromhost]] (AC)&lt;br /&gt;
*[[Email#Real-time_Blackhole_List_.28RBL.29|rhsbl]] (* DB CW)&lt;br /&gt;
*[[Qpsmtpd:sender_permitted_from|sender_permitted_from]] (?)&lt;br /&gt;
*[[Email#Spamassassin|spamassassin]] (DB SM AC CW)&lt;br /&gt;
*[[Qpsmtpd:stunnel|stunnel]] (U)&lt;br /&gt;
*[[Qpsmtpd:tls|tls]] (AC)&lt;br /&gt;
*[[Qpsmtpd:tls_cert|tls_cert]]&lt;br /&gt;
*[[Qpsmtpd:tnef2mime|tnef2mime]] (AC)&lt;br /&gt;
*[[Qpsmtpd:uribl|uribl]] (DB)&lt;br /&gt;
*[[Qpsmtpd:user_config|user_config]] (U)&lt;br /&gt;
*[[Virus:Email_Attachment_Blocking|virus]] (DB SM CW)&lt;br /&gt;
*[[Qpsmtpd:whitelist|whitelist]] (U?)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Qpsmtpd]]&lt;br /&gt;
[[Category:SME11-Development]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_PHP&amp;diff=101</id>
		<title>SMEServer PHP</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_PHP&amp;diff=101"/>
		<updated>2026-01-14T17:18:47Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/PHP (This page was last modified on 17 July 2024, at 14:50.)&lt;br /&gt;
&lt;br /&gt;
{{Languages|PHP}}&lt;br /&gt;
Starting with SME 10, the &#039;&#039;&#039;php&#039;&#039;&#039; module is no longer used for httpd. Instead we rely on &#039;&#039;&#039;php-fpm&#039;&#039;&#039; which can enable every available version of php. &lt;br /&gt;
&lt;br /&gt;
By default we provide the following versions: &lt;br /&gt;
&lt;br /&gt;
*54 (maintained by Red-Hat up to CentOS 7 EOL: 30 Jun 2024).&lt;br /&gt;
*55,56,70,71,72 (Note: unsupported!).&lt;br /&gt;
*73 (supported up to 6 Dec 2021).&lt;br /&gt;
*74 (supported up to 28 Nov 2022).&lt;br /&gt;
*80 (supported up to 26 Nov 2023).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===db keys available to control php configuration and services===&lt;br /&gt;
First you need to decide if you want to alter the php behaviour for an ibay or for a specific php version, of for all php versions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+db configuration properties&lt;br /&gt;
!keys&lt;br /&gt;
!role&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|php&lt;br /&gt;
|customization of /etc/php.ini&lt;br /&gt;
|for php54&lt;br /&gt;
|-&lt;br /&gt;
|php55&lt;br /&gt;
|customization of /opt/remi/php55/root/etc/php.ini&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; |if no properties defined, will use php keys properties&lt;br /&gt;
|-&lt;br /&gt;
|php56&lt;br /&gt;
|customization of /opt/remi/php56/root/etc/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php70&lt;br /&gt;
|customization of /etc/opt/remi/php70/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php71&lt;br /&gt;
|customization of /etc/opt/remi/php71/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php72&lt;br /&gt;
|customization of /etc/opt/remi/php72/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php73&lt;br /&gt;
|customization of /etc/opt/remi/php73/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php74&lt;br /&gt;
|customization of /etc/opt/remi/php74/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php80&lt;br /&gt;
|customization of /etc/opt/remi/php80/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php81&lt;br /&gt;
|customization of /etc/opt/remi/php81/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php82&lt;br /&gt;
|customization of /etc/opt/remi/php82/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php83&lt;br /&gt;
|customization of /etc/opt/remi/php83/php.ini&lt;br /&gt;
|}&lt;br /&gt;
Every version of php has its own php-fpm service running, the related configuration db entry is (as shown in the Table above) php-fpm for php (ie php54), php55-php-fpm for php55 and so on.&lt;br /&gt;
&lt;br /&gt;
If you really want to disable one version of php, shown below is what you need to do for php55, as an example:&lt;br /&gt;
 config setprop php55-php-fpm status disabled&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
===Available properties===&lt;br /&gt;
Here is a list of available properties to configure php. You have to choose at which level you want to handle the change. &lt;br /&gt;
&lt;br /&gt;
*Do you want the change for the whole server? -- then probably choose to change it for key php): db configuration setprop php ...&lt;br /&gt;
*Do you want the change for a specific version of php? -- then you should probably do it against a specific php key e.g. : db configuration setprop php74 ...&lt;br /&gt;
*Do you want to apply the change for a specific ibay? -- this is what we suggest you to do in most cases: db accounts setprop myibay ..&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!php setting&lt;br /&gt;
!ibay property&lt;br /&gt;
!php.ini property&lt;br /&gt;
!default&lt;br /&gt;
!note&lt;br /&gt;
|-&lt;br /&gt;
| -&lt;br /&gt;
|PHPVersion&lt;br /&gt;
| -&lt;br /&gt;
|74&lt;br /&gt;
|can vary upon update if left empty&lt;br /&gt;
|-&lt;br /&gt;
|allow_url_fopen&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|off&lt;br /&gt;
|unsecure keep to off&lt;br /&gt;
|-&lt;br /&gt;
|allow_url_include&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|auto_prepend_file&lt;br /&gt;
|AutoPrependFile&lt;br /&gt;
| -&lt;br /&gt;
|enabled&lt;br /&gt;
|/usr/share/php/auth_translation.php unless disabled&lt;br /&gt;
|-&lt;br /&gt;
|disable_functions&lt;br /&gt;
|DisableFunctions&lt;br /&gt;
| -&lt;br /&gt;
|system,show_source, symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|display_errors&lt;br /&gt;
|DisplayErrors&lt;br /&gt;
| -&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|error_log&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|/var/log/php/$key/error.log&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|error_reporting&lt;br /&gt;
|ErrorReporting&lt;br /&gt;
| -&lt;br /&gt;
|E_ALL &amp;amp; ~E_NOTICE &amp;amp; ~E_DEPRECATED &amp;amp; ~E_STRICT&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|expose_php&lt;br /&gt;
| -&lt;br /&gt;
|ExposePHP&lt;br /&gt;
|Off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|file_upload&lt;br /&gt;
|FileUpload&lt;br /&gt;
| -&lt;br /&gt;
|Off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mail.add_x_header&lt;br /&gt;
| -&lt;br /&gt;
|MailAddXHeader&lt;br /&gt;
|disabled&lt;br /&gt;
|only global, not per php version&lt;br /&gt;
|-&lt;br /&gt;
|mail.force_extra_parameters&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|root@$DomainName&lt;br /&gt;
|ibayname@$DomainName for ibays&lt;br /&gt;
|-&lt;br /&gt;
|mail.log&lt;br /&gt;
| -&lt;br /&gt;
|MailLog&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_execution_time&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|30&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_file_uploads&lt;br /&gt;
| -&lt;br /&gt;
|MaxFileUpload&lt;br /&gt;
|20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_input_time&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|memory_limit&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|128M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|open_basedir&lt;br /&gt;
|PHPBaseDir&lt;br /&gt;
| -&lt;br /&gt;
|/home/e-smith/files/ibays/IBAYNAME/:/var/lib/php/IBAYNAME/:/usr/share/php/:/usr/share/pear/:/opt/remi/php$version/root/usr/share/pear/:/opt/remi/php$version/root/usr/share/php/&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|post_max_size&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|20M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|security.limit_extensions&lt;br /&gt;
|AllowPHTML&lt;br /&gt;
|&lt;br /&gt;
|disabled&lt;br /&gt;
|allow php to interprete more file (.php .htm .html .phar .phtml .xml)&lt;br /&gt;
|-&lt;br /&gt;
|sendmail_from&lt;br /&gt;
| -&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|root@$DomainName&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendmail_path&lt;br /&gt;
| -&lt;br /&gt;
|SendmailPath&lt;br /&gt;
|/usr/sbin/sendmail -t -i&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|short_open_tag&lt;br /&gt;
| -&lt;br /&gt;
|ShortOpenTag&lt;br /&gt;
|On&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|upload_max_filesize&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
if you want to set a specific value for an ibay, here we show how to use php80 for ibay MYIBAY and avoid having any disabled function:&lt;br /&gt;
 db accounts setprop MYIBAY disable_functions none PHPVersion 80&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
{{Note box|It is strongly suggested that you install the smeserver-webhosting contrib enabling you to set your ibay php values from the server-manager. Everything is available and it prevents you from making a mistake in the settings.}}&lt;br /&gt;
&lt;br /&gt;
===Display Error Messages===&lt;br /&gt;
&lt;br /&gt;
By default PHP does not display error messages on screen. Sometimes you get a blank page when executing PHP scripts. Usually some sort of error has occurred, but this error text will &#039;&#039;&#039;not&#039;&#039;&#039; be displayed as SME Server is configured to not display them. Instead the error messages are reported to the log files of the webserver and the general logfile of the server. &lt;br /&gt;
&lt;br /&gt;
Try to analyze your logfiles:&lt;br /&gt;
/var/log/httpd/error_log and /var/log/httpd/access_log and perhaps also /var/log/messages.&lt;br /&gt;
&lt;br /&gt;
{{Warning box|It is strongly advised that you disable &amp;quot;display errors&amp;quot; after you have tracked and solved the problem, as the displayed error message might provide information (like filesystem layout) that only should be known to the system administrators and not to users, let alone people with bad intentions. Thus it is a potential SECURITY RISK. After debugging, disable it again.}}&lt;br /&gt;
&lt;br /&gt;
====Enable changes for all php versions====&lt;br /&gt;
If you (for debugging purposes for instance) would like to enable it you can do it with the instructions found below:&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/php.ini&lt;br /&gt;
 cp /etc/e-smith/templates/etc/php.ini/30ErrorHandling /etc/e-smith/templates-custom/etc/php.ini&lt;br /&gt;
&lt;br /&gt;
After that:&lt;br /&gt;
&lt;br /&gt;
 sed -i /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling -e &#039;s/display_errors.*/display_errors          = On/g&#039; &lt;br /&gt;
&lt;br /&gt;
After that issue the following commands:&lt;br /&gt;
&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now access your page again and see what the error is. &lt;br /&gt;
&lt;br /&gt;
====Undo Changes====&lt;br /&gt;
If everything works you remove the 30ErrorHandling file from the /etc/e-smith/templates-custom/etc/php.ini folder and issue the last two lines again:&lt;br /&gt;
&lt;br /&gt;
 signal-event webapps-update &lt;br /&gt;
&lt;br /&gt;
====Enable changes for a specific ibay====&lt;br /&gt;
Starting SME10 and smeserver-php-3.0.0-39&lt;br /&gt;
 db accounts setprop MYIBAY DisplayErrors enabled &lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
===Open basedir restriction===&lt;br /&gt;
SME Server has a security measure in place which is called &#039;open basedir restriction&#039;. This measure prevents PHP from executing or invoking other PHP scripts outside the scope of its own tree; in other words it creates a &#039;sandbox&#039; or &#039;jail&#039;.&lt;br /&gt;
&lt;br /&gt;
Overall configuration is defined in the php.ini file but you can add an override on a per ibay basis.&lt;br /&gt;
&lt;br /&gt;
====Error message====&lt;br /&gt;
The PHP open basedir restriction is usually presented to the user like this in the /var/log/messages file:&lt;br /&gt;
&lt;br /&gt;
 Aug 12 17:27:42 homer httpd: PHP Warning:  main(): open_basedir restriction in effect. File(/tmp/test.php) is not within the allowed path(s): (/home/e-smith/files/ibays/Primary/html/) in /home/e-smith/files/ibays/Primary/html/test.php on line 2&lt;br /&gt;
&lt;br /&gt;
In general you will find this message in the log files only as by default PHP is configured to prevent the display of error messages to the end users. This can be changed as per [[PHP#Display_Error_Messages|this HowTo]].&lt;br /&gt;
&lt;br /&gt;
====Modifying the PHPBaseDir setting for an ibay====&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
(Please also see: [http://wiki.contribs.org/Useful_Commands#PHP_Related_Commands these] instructions on the [http://wiki.contribs.org/Useful_Commands Useful_Commands] page.)&lt;br /&gt;
&amp;lt;!--Please do not remove the following closing tag as a fromatting/rendering bug will kick in, for more details see: http://bugzilla.wikimedia.org/show_bug.cgi?id=10893--&amp;gt;&amp;lt;li&amp;gt;Open a SME Server shell as root user and document the current setting of the PHPBaseDir directive by writing down the output of the following command:&lt;br /&gt;
 db accounts getprop ibayname PHPBaseDir &lt;br /&gt;
Be careful to write it down to the letter as we need it in the next step.&lt;br /&gt;
For the Primary ibay the ouptut of above command would normally look like this:&lt;br /&gt;
 /home/e-smith/files/ibays/Primary/html/&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Decide on what directory you would like to add and issue the following:&lt;br /&gt;
 db accounts setprop ibayname PHPBaseDir value&lt;br /&gt;
Replace ibayname with the name of the ibay and value with the old value for the PHPBaseDir directive you have written down and a colon (:) followed by the full path to the directory you would like to add with a tailing slash (/), e.g.&lt;br /&gt;
 db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/&lt;br /&gt;
Above command would allow for invocation of scripts in the /opt/gallery2 path from the Primary ibay html folder by PHP.&lt;br /&gt;
To allow uploading of files to via http to a ibay name wiki:&lt;br /&gt;
 db accounts setprop wiki PHPBaseDir /home/e-smith/files/ibays/wiki/:/tmp/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;After defining the new setting we need to reflect the change in the configuration file of the web server and have the web server reload it&#039;s configuration file. This is done by issuing the following command:&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
&lt;br /&gt;
Be sure to replace ibayname with the name of the ibay you have just modified.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Upload_tmp_dir===&lt;br /&gt;
upload_tmp_dir&lt;br /&gt;
&lt;br /&gt;
From SME Server V8 up to and including SME Server V9, you could sometimes have an error thrown by PHP and would then need to specify a temporary directory (e.g. upload_tmp_dir) which is not set in php.ini. see [[bugzilla:6650]] and [[bugzilla:7652]]. Many php applications need this setting, the best-known culprits are Wordpress, Roundcube, eGroupWare, and there are others. The symptoms observed are that you can&#039;t upload contents to the PHP application.&lt;br /&gt;
&lt;br /&gt;
An easy resolution is to make a Custom Template to resolve this issue. See [[Uploadtmpdir]].&lt;br /&gt;
&lt;br /&gt;
=== Advanced use of the php-fpm pools ===&lt;br /&gt;
&lt;br /&gt;
==== For the ibays with php-fpm.d/ibays.conf ====&lt;br /&gt;
For the ibays better option is to simply use the contrib [[Webhosting]].&lt;br /&gt;
&lt;br /&gt;
==== For the contrib sharefolders with php-fpm.d/shares.conf ====&lt;br /&gt;
Similar to ibays.&lt;br /&gt;
&lt;br /&gt;
==== For the contribs with php-fpm.d/www.conf ====&lt;br /&gt;
Please read [[Building Your Contrib]].&lt;br /&gt;
&lt;br /&gt;
==== For your custom needs with php-fpm.d/custom.conf ====&lt;br /&gt;
You can build your own pool to use in any place on your server, even in a subfolder of an ibay or in place of the regular ibay php-pool (property PHPCustomPool).&lt;br /&gt;
&lt;br /&gt;
There are two ways in doing that:&lt;br /&gt;
&lt;br /&gt;
===== using db php =====&lt;br /&gt;
Using the default template : /etc/e-smith/templates/etc/php-fpm.d/custom.conf , you can set your own pool doing:&lt;br /&gt;
 db php set MYPOOLNAME pool Version 81 status enabled&lt;br /&gt;
here are the accepted supplementary properties, as always missing or empty means using default.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!property&lt;br /&gt;
!default&lt;br /&gt;
!values&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|php version to use eg 80 for php 8.0&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|128M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|30&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxChildren&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FileUpload&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BaseDir&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DisabledFunctions&lt;br /&gt;
|system,show_source,symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|User&lt;br /&gt;
|www&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Group&lt;br /&gt;
|www&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DisplayErrors&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LogErrors&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxChildren&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AutoPrependFile&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|will use the autoprepend file&lt;br /&gt;
|-&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|php\@$DomainName&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
You will then need two httpd.conf custom template fragment to use your pool. You will need to change   &#039;&#039;&#039;MYPOOL&#039;&#039;&#039; to what you want&lt;br /&gt;
 mkdir -p  /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/&lt;br /&gt;
 vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98mypoolusage&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /home/e-smith/files/ibays/test/html/mysubfolder&amp;gt;&lt;br /&gt;
     SSLRequireSSL&lt;br /&gt;
     Options None&lt;br /&gt;
     Options +Indexes&lt;br /&gt;
     Options +FollowSymLinks&lt;br /&gt;
     DirectoryIndex index.php index.shtml index.htm index.html&lt;br /&gt;
     &amp;lt;FilesMatch \.php$&amp;gt;&lt;br /&gt;
          SetHandler &amp;quot;proxy:unix:/var/run/php-fpm/php80-MYPOOLNAME.sock|fcgi://localhost&amp;quot;&lt;br /&gt;
     &amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
     AllowOverride All&lt;br /&gt;
     order deny,allow&lt;br /&gt;
     deny from all&lt;br /&gt;
     allow from all&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
Then just do:&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
===== using a templates-custom =====&lt;br /&gt;
You can write your own fragment in /etc/e-smith/templates-custom/etc/php-fpm.d/custom.conf/ e.g. /etc/e-smith/templates-custom/etc/php-fpm.d/custom.conf/15mypool&lt;br /&gt;
&lt;br /&gt;
You will also need to write a httpd fragment similarly to what shown just above.&lt;br /&gt;
&lt;br /&gt;
Here is an example if you want a custom pool for your ibay,  in /etc/e-smith/templates-custom/etc/php-fpm.d/ibays.conf/15MYIBAY&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
use esmith::AccountsDB;&lt;br /&gt;
use esmith::php;&lt;br /&gt;
my $a = esmith::AccountsDB-&amp;gt;open_ro || die &amp;quot;Couldn&#039;t open the accounts database&amp;quot;;&lt;br /&gt;
my $ibay = $a-&amp;gt;get(&amp;quot;MYIBAY&amp;quot;);&lt;br /&gt;
  my $version             = PhpFpmVersionToUse($ibay);&lt;br /&gt;
  my $dynamic             = $ibay-&amp;gt;prop(&#039;CgiBin&#039;) || &#039;disabled&#039;;&lt;br /&gt;
  my $custom              = $ibay-&amp;gt;prop(&#039;CustomPool&#039;) || undef;&lt;br /&gt;
  next unless ($dynamic eq &#039;enabled&#039; &amp;amp;&amp;amp; $version eq $PHP_VERSION &amp;amp;&amp;amp; $custom);&lt;br /&gt;
  my $key                 = $ibay-&amp;gt;key;&lt;br /&gt;
  my $name                = lc $key;&lt;br /&gt;
  my $pool_name           = &#039;php&#039; . $version . &#039;-&#039; . $name;&lt;br /&gt;
  $OUT .=&amp;lt;&amp;lt;&amp;quot;_EOF&amp;quot; if ($version eq $PHP_VERSION);&lt;br /&gt;
&lt;br /&gt;
[$pool_name]&lt;br /&gt;
user = www&lt;br /&gt;
group = www&lt;br /&gt;
listen.owner = root&lt;br /&gt;
listen.group = www&lt;br /&gt;
listen.mode = 0660&lt;br /&gt;
listen = /var/run/php-fpm/$pool_name.sock&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;put whatever you need there&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
_EOF&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have then to force the ibay to use it by doing :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db accounts MYIBAY setprop CustomPool enabled&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will prevent the generation of the default ibay pool in  ibays.conf , and let you use /var/run/php-fpm/php$version-$name.sock socket from your template-custom... or from the db php using the same key as the name of the ibay.&lt;br /&gt;
&lt;br /&gt;
===Installation of Composer===&lt;br /&gt;
&lt;br /&gt;
This is made tricky as we do not have the PHP CLI configured.&lt;br /&gt;
&lt;br /&gt;
But we can install it as follows with command line arguments. This is using php7. Check the latest hash file as this changes.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
 php74 -d allow_url_fopen=on -r &amp;quot;copy(&#039;https://getcomposer.org/installer&#039;, &#039;composer-setup.php&#039;);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Hash check:&lt;br /&gt;
 php74 -r &amp;quot;if (hash_file(&#039;sha384&#039;, &#039;composer-setup.php&#039;) === &#039;e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02&#039;) { echo &#039;Installer verified&#039;; } else { echo &#039;Installer corrupt&#039;; unlink(&#039;composer-setup.php&#039;); } echo PHP_EOL;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 php74 -d allow_url_fopen=on  ./composer-setup.php&lt;br /&gt;
&lt;br /&gt;
=== Bash script===&lt;br /&gt;
&lt;br /&gt;
Add the code:&lt;br /&gt;
&lt;br /&gt;
 nano composer.install&lt;br /&gt;
&lt;br /&gt;
Paste this:&lt;br /&gt;
&lt;br /&gt;
 if [ ! -d &#039;/tmp/compose&#039; ]; then&lt;br /&gt;
    /usr/bin/mkdir -p /tmp/compose&lt;br /&gt;
    cd /tmp/compose&lt;br /&gt;
 else&lt;br /&gt;
    cd /tmp/compose&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Get the setup file&lt;br /&gt;
 /usr/bin/php74 -d allow_url_fopen=on -r &amp;quot;copy(&#039;https://getcomposer.org/installer&#039;, &#039;/tmp/compose/composer-setup.php&#039;);&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Hash check&lt;br /&gt;
 /usr/bin/php74 -r &amp;quot;if (hash_file(&#039;sha384&#039;, &#039;/tmp/compose/composer-setup.php&#039;) === &#039;dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6&#039;) { echo &#039;Installer verified&#039;; } else { echo &#039;Installer corrupt&#039;; unlink(&#039;/tmp/compose/composer-setup.php&#039;); } echo  PHP_EOL;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Install&lt;br /&gt;
 /usr/bin/php74 -d allow_url_fopen=on  /tmp/compose/composer-setup.php&lt;br /&gt;
 mv /tmp/compose/composer.phar /usr/local/bin/composer&lt;br /&gt;
&lt;br /&gt;
 # Tidy&lt;br /&gt;
 rm -rf /tmp/compose&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
&lt;br /&gt;
 chmod 0700 composer.install&lt;br /&gt;
 ./composer.install&lt;br /&gt;
&lt;br /&gt;
Check ths file is there:&lt;br /&gt;
&lt;br /&gt;
 ll /usr/local/bin/composer&lt;br /&gt;
&lt;br /&gt;
Use with &lt;br /&gt;
&lt;br /&gt;
 php74 composer &amp;lt;blah&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
Please raise bugs under the SME-Server 10.X section in [http://bugs.contribs.org/enter_bug.cgi Bugzilla] and select the smeserver-php component or use {{BugzillaFileBug|product=SME%20Server%2010.X|component=e-smith-*%20and%20smeserver-*&amp;amp;20packages|title=this link}}.&lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this package:&lt;br /&gt;
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-php|noresultsmessage=&amp;quot;No open bugs found.&amp;quot;}}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Howto]]&lt;br /&gt;
[[Category: Webapps]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Nextcloud&amp;diff=100</id>
		<title>SMEServer Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Nextcloud&amp;diff=100"/>
		<updated>2026-01-14T17:18:01Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Nextcloud (This page was last modified on 13 November 2025, at 07:32.)&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
&amp;lt;!-- here we define the contrib name variable --&amp;gt;&lt;br /&gt;
&amp;lt;!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want--&amp;gt;&lt;br /&gt;
{{#vardefine:contribname| {{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
&amp;lt;!-- we define the language --&amp;gt;&lt;br /&gt;
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}&lt;br /&gt;
{{Infobox contribs&lt;br /&gt;
|name={{#var:contribname}}&lt;br /&gt;
|image=Nextcloud_Logo.svg&lt;br /&gt;
|description_image= {{#var:contribname}} logo&lt;br /&gt;
|maintainer= Unnilennium&lt;br /&gt;
|licence= AGPLv3&lt;br /&gt;
|url= https://nextcloud.com&lt;br /&gt;
|category= Cloud&lt;br /&gt;
|tags=cloud,files,dropbox,seafile,pydio,ajaxplorer,owncloud&lt;br /&gt;
}}&lt;br /&gt;
===Maintainer===&lt;br /&gt;
&amp;lt;!-- here you need to file your username and name --&amp;gt;&lt;br /&gt;
[[User:Unnilennium|Jean-Philippe Pialasse]] &lt;br /&gt;
&lt;br /&gt;
=== Version ===&lt;br /&gt;
&amp;lt;!-- keep this first element as is, you can add some if needed --&amp;gt;&lt;br /&gt;
{{#smeversion: {{#var:smecontribname}} }}&lt;br /&gt;
{{#smeversion: nextcloud-src  }}&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
Nextcloud is a suite of client-server software for creating and using file hosting services. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server.&lt;br /&gt;
&lt;br /&gt;
As per SME Server Keep It Simple, all your ibays and home folders will be accessible through the nextcloud interface using the &amp;quot;external files&amp;quot; app. You will also have your main user user Nextcloud folder saved under /home/e-smith/files/owncloud/data which is in the default backup path. So you can now enjoy both your own cloud repository with access to the very same files on your samba share!&lt;br /&gt;
&lt;br /&gt;
How do I add my SME users ? They are already there ! Just tell them to connect to https://mydomain/nextcloud. You can also add external users or allow them to register with a nextcloud app.&lt;br /&gt;
&lt;br /&gt;
What are the admin ? By default you have a nextcloudadmin user and the regular SME admin user. First one use the password you can see with &amp;quot;config getprop nextcloud AdminPassword&amp;quot;, and second one, well, just use your regular admin password. Then you can manage apps, external files repos and admin group membership.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
you might need a second event or sometime ibays folder is not visible&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme9&amp;quot;&amp;gt;&lt;br /&gt;
You do not need to  follow the Repo pages of [https://wiki.contribs.org/Fws fws] and [https://wiki.contribs.org/Remi-safe remi-safe] to install those two needed repos, instead use the packages to install them followed by a yum-modify event. Then run the main installation.&lt;br /&gt;
 yum install smeserver-extrarepositories-remi-safe smeserver-extrarepositories-fws smeserver-extrarepositories-epel&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs,epel,fws&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
 service php-fpm start&lt;br /&gt;
 service php71-php-fpm start&lt;br /&gt;
 service php72-php-fpm start&lt;br /&gt;
 service php73-php-fpm start&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
you can skip the service php-fpm* commands if it was already installed and running before the installation of nextcloud&lt;br /&gt;
&lt;br /&gt;
then you can do the following and you can safely ignore the signal-event post-upgrade reboot if prompted, unless you also installed other packages that needs to do so.&lt;br /&gt;
 config set UnsavedChanges no&lt;br /&gt;
&lt;br /&gt;
or do &lt;br /&gt;
 signal-event post-upgrade &lt;br /&gt;
 signal-event reboot&lt;br /&gt;
then&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
if you want to add SME user admin as administrator of nextcloud do&lt;br /&gt;
  OCC group:adduser admin admin&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might want to set your default phone region (use your country 2 letter code - low case)&lt;br /&gt;
 occ config:system:set default_phone_region --value=&amp;quot;us&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you might want to have nextcloud accessible to the Internet&lt;br /&gt;
 config setprop nextcloud access public&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
if you want to keep access only to &amp;lt;nowiki&amp;gt;https://YOURDOMAIN/nextcloud&amp;lt;/nowiki&amp;gt;, you might want to use pretty URL (without index.php in it)&lt;br /&gt;
 occ config:system:set htaccess.RewriteBase --type string --value &amp;quot;/nextcloud&amp;quot;&lt;br /&gt;
 occ maintenance:update:htaccess&lt;br /&gt;
&lt;br /&gt;
=== Use a dedicated domain to connect to Nextcloud ===&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
first change the first line variable content with you nextcloud domain as defined with your DNS provider.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
NEXTCLOUDDOMAIN=&amp;quot;cloud.mydomain.com&amp;quot;&lt;br /&gt;
db domains set $NEXTCLOUDDOMAIN domain Description &amp;quot;Nextcloud&amp;quot; Content Primary Nameservers internet TemplatePath NextcloudVirtualHost letsencryptSSLcert enabled&lt;br /&gt;
signal-event domain-create $NEXTCLOUDDOMAIN&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# this one to let nextcloud DAV be redirect correctly and to have collabora and notify_push recognize the domain ### IN PROGRESS###&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
config setprop nextcloud VirtualHost $NEXTCLOUDDOMAIN&lt;br /&gt;
signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# only if you use a Let&#039;s Encrypt certificate&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
dehydrated -c&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if you want to use only your dedicated domain and no subdir access, you can enable pretty URL this way&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 occ config:system:set htaccess.RewriteBase --type string --value &amp;quot;/&amp;quot;&lt;br /&gt;
 occ maintenance:update:htaccess&lt;br /&gt;
 config setprop nextcloud AliasOnPrimary disabled&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
to restore without pretty url and dual access&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 occ config:system:delete htaccess.RewriteBase &lt;br /&gt;
 occ maintenance:update:htaccess &lt;br /&gt;
 config delprop nextcloud AliasOnPrimary &lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
first change the first line variable content with you nextcloud domain as defined with your DNS provider.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
NEXTCLOUDDOMAIN=&amp;quot;cloud.mydomain.com&amp;quot;&lt;br /&gt;
db domains set $NEXTCLOUDDOMAIN domain Description &amp;quot;Nextcloud&amp;quot; Content Primary Nameservers internet TemplatePath WebAppVirtualHost DocumentRoot /usr/share/nextcloud RequireSSL enabled letsencryptSSLcert enabled&lt;br /&gt;
signal-event domain-create $NEXTCLOUDDOMAIN&lt;br /&gt;
&lt;br /&gt;
# this one to let nextcloud DAV be redirect correctly and to have collabora recognize the domain&lt;br /&gt;
config setprop nextcloud VirtualHost $NEXTCLOUDDOMAIN&lt;br /&gt;
signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
# only if you use a Let&#039;s Encrypt certificate&lt;br /&gt;
expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
dehydrated -c&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!property&lt;br /&gt;
!default&lt;br /&gt;
!values&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|AdminPassword&lt;br /&gt;
|GENERATED&lt;br /&gt;
|string&lt;br /&gt;
|password for your main admin user for nextcloud (*)&lt;br /&gt;
|-&lt;br /&gt;
|AdminUser&lt;br /&gt;
|nextcloudadmin&lt;br /&gt;
|string&lt;br /&gt;
|main admin user for your installation (*)&lt;br /&gt;
|-&lt;br /&gt;
|cliurl&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|force overwrite.cli.url to https://domain/nextcloud or https://domain if virtualhost is set; disable it if you have specific needs and then use occ command to set your value&lt;br /&gt;
|-&lt;br /&gt;
|DbName&lt;br /&gt;
|nextcloud&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|DbPassword&lt;br /&gt;
|GENERATED&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|DbUser&lt;br /&gt;
|nextcloud&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|TrustedDomains&lt;br /&gt;
|empty&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|add domain or ip that are in need to be added to default access to nextcloud&lt;br /&gt;
|-&lt;br /&gt;
|VirtualHost&lt;br /&gt;
|empty&lt;br /&gt;
|domain name&lt;br /&gt;
|domain dedicated to nextcloud, needs to also be defined as domain on the server&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|private&lt;br /&gt;
|private, public&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxUploadSize&lt;br /&gt;
|4096M&lt;br /&gt;
|number&lt;br /&gt;
|if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|528M&lt;br /&gt;
|number&lt;br /&gt;
|webinterface : if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|memory_limit&lt;br /&gt;
|1024M&lt;br /&gt;
|number&lt;br /&gt;
|for cli like occ command or cron: if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|Shares&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|add the samba shares from the shared-folders contrib in the nextcloud ibays folder along with regular ibays&lt;br /&gt;
|-&lt;br /&gt;
|IncludeIbay&lt;br /&gt;
|empty&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|add ibays names that need to be include. If not empty, only the name present here will be accessible via nextcloud. Take precedence over ExcludeIbay. You set it with a random string to exclude all ibays and shares from automatic inclusion.&lt;br /&gt;
|-&lt;br /&gt;
|ExcludeIbay&lt;br /&gt;
|Primary&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|will exclude from nexcloud access any ibay via nextcloud. Default excludes Primary ibay. If you want to include Primary set it with a random string.&lt;br /&gt;
|-&lt;br /&gt;
|opcache.memory_consumption&lt;br /&gt;
|32&lt;br /&gt;
|number&lt;br /&gt;
|update this value if Nextcloud says that it should be&lt;br /&gt;
|-&lt;br /&gt;
|opcache.interned_strings_buffer&lt;br /&gt;
|128&lt;br /&gt;
|number&lt;br /&gt;
|update this value if Nextcloud says that it should be&lt;br /&gt;
|-&lt;br /&gt;
|PHPBaseDir&lt;br /&gt;
|&lt;br /&gt;
|colon separated string&lt;br /&gt;
|php base dir you want to add to the default example /home/e-smith/files/ibays/musique/files:/usr/share/GeoIP/GeoLite2-Country.mmdb:/proc/cpuinfo&lt;br /&gt;
|-&lt;br /&gt;
|UseSMB&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|allow you to set ibay access via samba share or via Local driver in nextcloud. Enabled is for samba, this allow you to access as your user and have your quota accounted. It might be a little slower, and need you to have your password loaded in the session. Local driver if disabled, will let you access only what apache user (www) has right to access as member of a group.&lt;br /&gt;
|}&lt;br /&gt;
(*) the SME admin user is also an admin of your nextcloud installation. You have two admin account as per default installation on SME Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
example of setting :&lt;br /&gt;
  config setprop nextcloud ExcludeIbay ibay1,ibay2&lt;br /&gt;
  signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
=== LDAP/AD Integration Settings ===&lt;br /&gt;
Do not change the LDAP/AD integration settings for &amp;quot;1. Server: Localhost&amp;quot; or you will break the Nextcloud install.  If you want to add a second LDAP/AD server, click the &amp;quot;+&amp;quot; symbol to add another configuration and then add the appropriate LDAP/AD settings. &lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
if you happen to need tweaking your installation, here is how to access the command line for Nextcloud on SME, we made it easier for you, just log as root and use the OCC command (using capitals), This command will execute for you what you need as the www user, using the needed version of php. Here two examples: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
occ maintenance:repair&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;to seek for additional command consult Nextcloud documentation : https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html&lt;br /&gt;
&lt;br /&gt;
=== Upgrade ===&lt;br /&gt;
 yum  update {{#var:smecontribname}} {{#var:contribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
=== CLI upgrade of Nextcloud software ===&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 /usr/bin/nc_upgrade&lt;br /&gt;
 /usr/bin/nc_dbupdate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php83 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecont&lt;br /&gt;
You should rather prefer the online updater, but in case:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php74 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar --no-interaction&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In case of a huge db, you can choose the online updater and then only issue the db update doing&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starting 25 to upgrace to 26, you should do &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php81 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar --no-interaction&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In case of a huge db, you can choose the online updater and then only issue the db update doing&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restore info loglevel ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ config:system:set loglevel --value=3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Migration  ===&lt;br /&gt;
&lt;br /&gt;
==== from SME 10 to SME 11 ====&lt;br /&gt;
&lt;br /&gt;
# before migrate to SME11&lt;br /&gt;
## upgrade to NC 29 or NC 30 (this might require you to migrate mariadb database from 5.5 to contrib mariadb 10.5, see below in this page)&lt;br /&gt;
## make sure you have a nextcloud database in mariadb 10.5 (mysqlshow105)&lt;br /&gt;
## make sure you have some backup /home/e-smith/db/mariadb105/nextcloud.dump&lt;br /&gt;
## delete nextcloud database from mariadb 5.5 &lt;br /&gt;
## make sure you do not have any /home/e-smith/db/mysql/nextcloud.dump&lt;br /&gt;
## migrate using either migratehelper, console backup or workstation backup&lt;br /&gt;
# Install SME 11&lt;br /&gt;
## restore backup when you are asked for&lt;br /&gt;
## check you have:&lt;br /&gt;
### a mariadb nextcloud db ( mariadb-show)&lt;br /&gt;
### your data folder : ll /home/e-smith/files/nextcloud&lt;br /&gt;
### your current config and software : ll /usr/share/nextcloud/&lt;br /&gt;
### configuration key nextcloud : config show nextcloud&lt;br /&gt;
### install smeserver-nextcloud &lt;br /&gt;
&lt;br /&gt;
enjoy!&lt;br /&gt;
&lt;br /&gt;
=== Uninstall ===&lt;br /&gt;
&lt;br /&gt;
{{Warning box| if you plan to reinstall and had the nextcloud rpm installed do not yum remove it or rpm -e it as it would put you in a situation where you will not be able to reinstall and restore your old data. nextcloud-src rpm if present do not create such situation and can be removed safely.}}&lt;br /&gt;
&lt;br /&gt;
Uninstalling the rpms&lt;br /&gt;
 yum remove {{#var:smecontribname}}  {{#var:contribname}}-src&lt;br /&gt;
 rpm -e --justdb nextcloud&lt;br /&gt;
&lt;br /&gt;
those folders will then remain&lt;br /&gt;
* /usr/share/nextcloud : software and config &lt;br /&gt;
* /home/e-smith/files/nextcloud : user data&lt;br /&gt;
&lt;br /&gt;
also you will have mariadb or mariadb105 with nextcloud db and user.&lt;br /&gt;
&lt;br /&gt;
And finally, db configuration with entry for nextcloud. &lt;br /&gt;
&lt;br /&gt;
If all of those remains as is, a simple reinstall of the contrib will bring back nextcloud running. If you uninstalled it because your install was non functional or want a complete removal, there are extra steps. &lt;br /&gt;
&lt;br /&gt;
In case of deleting either the db or part of the software folder, whenever you will try to reinstall the contrib, process will fail as db and files are not in sync.  &lt;br /&gt;
&lt;br /&gt;
In case you need to reinstall from scratch, &#039;&#039;&#039;first, backup what you might want to restore latter&#039;&#039;&#039;:&lt;br /&gt;
 cd /home/e-smith/files/nextcloud/data&lt;br /&gt;
 mysqldump nextcloud &amp;gt; nextcloud55.sql&lt;br /&gt;
 mysqldump105 nextcloud &amp;gt; nextcloud105.sql&lt;br /&gt;
 config print nextcloud /root/nextcloud.config&lt;br /&gt;
 tar -czf   /root/nextcloud.tar.gz /home/e-smith/files/nextcloud/data /usr/share/nextcloud&lt;br /&gt;
then erase all what is remaining: &lt;br /&gt;
 mysql -e &amp;quot;DROP DATABASE `config getprop nextcloud DbName`;DROP USER IF EXISTS `config getprop nextcloud DbUser`;&amp;quot;&lt;br /&gt;
 mysql105 -e &amp;quot;DROP DATABASE `config getprop nextcloud DbName`;DROP USER IF EXISTS `config getprop nextcloud DbUser`;&amp;quot;&lt;br /&gt;
 rm -rf /usr/share/nextcloud&lt;br /&gt;
 rm -rf /home/e-smith/files/nextcloud&lt;br /&gt;
 #this one is optional, and should not cause issue if still there&lt;br /&gt;
 config delete nextcloud&lt;br /&gt;
&lt;br /&gt;
and you should be able to start a new install from scratch&lt;br /&gt;
&lt;br /&gt;
=== Release schedule ===&lt;br /&gt;
see https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule&lt;br /&gt;
&lt;br /&gt;
as per 2025/11:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Version&lt;br /&gt;
!Name&lt;br /&gt;
!Release date&lt;br /&gt;
!End of life&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Hub 26 Winter&lt;br /&gt;
|TBD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
|Hub 25 Autumn&lt;br /&gt;
|2025-09-27&lt;br /&gt;
|2026-09&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
|Hub 10&lt;br /&gt;
|2025-02-25&lt;br /&gt;
|2026-02&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;30&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 9&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-09-14&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2025-09&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;29&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 8&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-04-24&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2025-04&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;28&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 7&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-12-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;27&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 6&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-06-13&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;26&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 4&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-03-21&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;25&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 3&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-10-19&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-10&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;24&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 3&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-05-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-05&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;23&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 2&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-11-30&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;22&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-07-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-07&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;21&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-02-22&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-02&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;20&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-10-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-11&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;19&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-06-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;18&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-01-16&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-01&amp;lt;/s&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Migrate Database from core mariadb 5.5 to mariadb 10.5 on SME10===&lt;br /&gt;
If you are in the situation your are unable to update your nextcloud because of database requirements, you might need to install a newer and then migrate your db.&lt;br /&gt;
&lt;br /&gt;
Here a simple procedure, after having the new db working as a sclo [[Mariadb105]] for SME10 as example.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
mysqldump `config getprop nextcloud DbName` &amp;gt; nextcloud.sql&lt;br /&gt;
echo &amp;quot;CREATE DATABASE IF NOT EXISTS `config getprop nextcloud DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;&amp;quot;| mysql105&lt;br /&gt;
mysql105 `config getprop nextcloud DbName`&amp;lt; nextcloud.sql&lt;br /&gt;
echo &amp;quot;CREATE USER IF NOT EXISTS `config getprop nextcloud DbUser`@localhost IDENTIFIED BY &#039;`config getprop nextcloud DbPassword`&#039;;&amp;quot;| mysql105&lt;br /&gt;
echo &amp;quot;GRANT ALL PRIVILEGES ON `config getprop nextcloud DbName`.* TO `config getprop nextcloud DbUser`@localhost; FLUSH PRIVILEGES;&amp;quot; | mysql105&lt;br /&gt;
occ config:system:set dbhost --value localhost:/var/lib/mysql/mariadb105.sock --type string&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After checking that all is working you can then delete yourself the old db from the previous mysql server, or keep it as a backup for a while.&lt;br /&gt;
If it fails and just want to go back to previous state:&lt;br /&gt;
 occ maintenance --on&lt;br /&gt;
 occ config:system:set host --value localhost --type string&lt;br /&gt;
 occ maintenance --off&lt;br /&gt;
&lt;br /&gt;
=== File Scan ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# scan all, could take hours if you have a lot of files&lt;br /&gt;
occ files:scan -v --all&lt;br /&gt;
# scan all that is inside a username path (including external storages mounted there)&lt;br /&gt;
occ files:scan -v myusername&lt;br /&gt;
#scan only a subfolder of a user (path needs a heading / and is relative to /home/e-smith/files/nextcloud/data)&lt;br /&gt;
occ files:scan -v --path=&amp;quot;/myusername/files/myfolder/mysubfolder&amp;quot; myusername&lt;br /&gt;
#For external storage one has to use a user and the mount point in the user space, e.g. admin&lt;br /&gt;
occ files:scan -v --path=&amp;quot;/admin/files/name_of_external_storage&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If you use groupgfolders app, then you might consider, to list the golders id&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ groupfolders:list&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;then for folder group with id 1&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ groupfolders:scan 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
==== Issue importing files in db &amp;quot;Entry path/to/file will not be accessible due to incompatible encoding&amp;quot; ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install convmv --enablerepo=epel&lt;br /&gt;
#first test to see the changes&lt;br /&gt;
convmv -f utf-8 -t utf-8 --nfc -r /home/e-smith/files/nextcloud/data/username&lt;br /&gt;
#check, then with --notest&lt;br /&gt;
convmv -f utf-8 -t utf-8 --nfc -r --notest /home/e-smith/files/nextcloud/data/username&lt;br /&gt;
#then rescan &lt;br /&gt;
occ files:scan -p /username/files/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;this might also occurs on ibays / home folders and their files not all visibles from nextcloud, simply adapt the path for convmv /home/e-smith/files/ibays/ibayname/files/ or /home/e-smith/files/users/userame/home/&lt;br /&gt;
&lt;br /&gt;
==== Remove legacy nextcloud rpm without deleting /usr/share/nextcloud content ====&lt;br /&gt;
for installs done before smeserver-nextcloud 1.2.0-16, the rppm nextcloud was required and was conflicting with web update. Since 1.2.0-16 it is not required anymroe and we use a nextcloud-src rpm which updates itself in /usr/share/nextcloud-src and is only used if you install the first time or restart from scratch your install.&lt;br /&gt;
To remove the nextcloud rpm which is not needed and save your files:&lt;br /&gt;
 rpm -e --justdb nextcloud&lt;br /&gt;
&lt;br /&gt;
source https://unix.stackexchange.com/questions/208722/how-to-remove-an-rpm-package-while-keeping-certain-files&lt;br /&gt;
===Reset Database===&lt;br /&gt;
&lt;br /&gt;
For reference, whilst looking at resetting file caches I found this.&lt;br /&gt;
&lt;br /&gt;
It is probably extremely dangerous but wanted to make a note.&lt;br /&gt;
&lt;br /&gt;
https://github.com/nextcloud/server/issues/8113#issuecomment-565876798&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]&lt;br /&gt;
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}&lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}} &lt;br /&gt;
&lt;br /&gt;
===Changelog===&lt;br /&gt;
Only released version in smecontrib are listed here.&lt;br /&gt;
&lt;br /&gt;
{{#smechangelog: {{#var:smecontribname}} }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- list of category you want to see this page in --&amp;gt;&lt;br /&gt;
[[Category: Contrib]]&lt;br /&gt;
&amp;lt;!-- Please keep there the template revision  number as is --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html&lt;br /&gt;
# https://help.nextcloud.com/t/migration-from-mysql-to-mariadb/6816/3&lt;br /&gt;
# https://help.nextcloud.com/t/changing-mariadb-socket-when-hosting-multiple-db-ubuntu/68294&lt;br /&gt;
# https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/&lt;br /&gt;
# https://www.ullright.org/ullWiki/show/nextcloud-cheatsheet&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Fail2ban&amp;diff=99</id>
		<title>SMEServer Fail2ban</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Fail2ban&amp;diff=99"/>
		<updated>2026-01-14T17:17:22Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Fail2ban (This page was last modified on 30 July 2022, at 20:25.)&lt;br /&gt;
&lt;br /&gt;
{{Languages|Fail2ban}}&lt;br /&gt;
&lt;br /&gt;
== Fail2ban for SME Server ==&lt;br /&gt;
{{Level|Easy|The instructions on this page can be followed by a beginner.}}&lt;br /&gt;
&lt;br /&gt;
== Maintainer ==&lt;br /&gt;
[[User:VIP-ire|Daniel B.]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.firewall-services.com Firewall Services]&amp;lt;br&amp;gt;&lt;br /&gt;
mailto:daniel@firewall-services.com&lt;br /&gt;
&lt;br /&gt;
Please discuss, provide feedback and share experiences on the forums [http://forums.contribs.org/index.php/topic,51127.0.html &#039;&#039;&#039;here&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Fail2ban operates by monitoring log files (e.g. /var/log/pwdfail, /var/log/auth.log, etc.) for selected entries and running scripts based on them. Most commonly this is used to block selected IP addresses that may belong to hosts that are trying to breach the system&#039;s security. It can ban any host IP that makes too many login attempts or performs any other unwanted action within a time frame defined by the administrator. &lt;br /&gt;
Fail2ban is typically set up to unban a blocked host within a certain period, so as to not &amp;quot;lock out&amp;quot; any genuine connections that may have been temporarily misconfigured. However, an unban time of several minutes is usually enough to stop a network connection being flooded by malicious connections, as well as reducing the likelihood of a successful dictionary attack.&lt;br /&gt;
&lt;br /&gt;
After installation the most important core services (and some additional ones) are monitored by default without the need for manual configuration (see: [[#Services|Services]]).&lt;br /&gt;
&lt;br /&gt;
{{Tip box|fail2ban is not only a tool against brute force attack on ssh but it can be a tool useful against http protocol attacks or [http://forums.contribs.org/index.php/topic,50162.msg252195.html#msg252195 spam attacks] on your server. See the [[Fail2ban#Jail.conf |jail section]]}}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
This contrib has been developed and tested on SME Server 8 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note box|The SME feature [http://wiki.contribs.org/AutoBlock AutoBlock SSH] should be disabled to ensure that fail2ban controls SSH traffic and not the SME build-in firewall.}}&lt;br /&gt;
&lt;br /&gt;
==Koozali SME v9/v10==&lt;br /&gt;
&lt;br /&gt;
{{#smeversion: smeserver-fail2ban}}&lt;br /&gt;
&lt;br /&gt;
== Installation Koozali SME==&lt;br /&gt;
&amp;lt;tabs container&amp;gt;&amp;lt;tab name=&amp;quot;For SME 10&amp;quot;&amp;gt;&lt;br /&gt;
 yum --enablerepo=smecontribs install smeserver-fail2ban&lt;br /&gt;
&amp;lt;/tab&amp;gt;&amp;lt;tab name=&amp;quot;For SME 9&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* install the rpms&lt;br /&gt;
&lt;br /&gt;
 yum --enablerepo=smecontribs install smeserver-fail2ban&lt;br /&gt;
&lt;br /&gt;
* Apply the needed configuration:&lt;br /&gt;
Use care to execute these three commands precisely. Failure to do so may prevent remote login via ssh. &lt;br /&gt;
&lt;br /&gt;
 db configuration setprop masq status enabled&lt;br /&gt;
 expand-template /etc/rc.d/init.d/masq&lt;br /&gt;
 /etc/init.d/masq restart&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
or, as an alternative, use the following commands. They will have the same effect after rebooting.&lt;br /&gt;
 db configuration setprop masq status enabled&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
&lt;br /&gt;
{{warning box| Failing to run either of these command will completely lock network access next time iptables rules are reloaded}}&lt;br /&gt;
{{warning box| The masq service must be enabled for fail2Ban to work correctly. If you disable it, Fail2ban won&#039;t ban anything}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
{{warning box| Starting SME10 and smeserver-fail2ban 0.1.18-29, manual change of configuration is included in core backup, if you use .local files in  the folders action.d/                fail2ban.d/        filter.d/         jail.d/. Any change to rpm owned .conf file is not added in core backup. Use the .local files to override the conf file instead and it will be in the backup. See http://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Configuration.}}&lt;br /&gt;
&lt;br /&gt;
== Disable SME Feature AutoBlock SME 9 or greater ==&lt;br /&gt;
It&#039;s been noted that one of the features of fail2ban overlaps the built-in ssh AutoBlock feature of SME (https://wiki.contribs.org/AutoBlock). &lt;br /&gt;
It is possible to disable the AutoBlock feature using the following optional steps.&lt;br /&gt;
&lt;br /&gt;
1. View what your current settings are for the built in SME AutoBlock feature by entering the following at the cli.&lt;br /&gt;
 # config show sshd&lt;br /&gt;
2. If AutoBlock is disabled no action is required. If AutoBlock is enabled, set it to disabled with the following commands:&lt;br /&gt;
 # config setprop sshd AutoBlock disabled&lt;br /&gt;
 # signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
==DB command==&lt;br /&gt;
While there is a panel in the server-manager, you can also manage the contrib by the db configuration, it is quite simple&lt;br /&gt;
&lt;br /&gt;
 # config show fail2ban &lt;br /&gt;
 fail2ban=service&lt;br /&gt;
    Mail=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Available options are below:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IgnoreIP&#039;&#039;&#039;: a comma separated list of IP or CIDR networks which will never be blocked by fail2ban. Example: 12.15.22.4,17.20.0.0/16. All your local networks and networks allowed to access the server-manager are already automatically whitelisted&lt;br /&gt;
* &#039;&#039;&#039;FilterLocalNetworks&#039;&#039;&#039; can be enabled or disabled (default is disabled). If set to enabled, local networks won&#039;t be whitelisted, and fail2ban can also ban hosts from the internal networks. Note that networks allowed to access the server-manager are not affected (they will never be blocked)&lt;br /&gt;
* &#039;&#039;&#039;BanTime&#039;&#039;&#039;: Duration (in seconds) of a ban. Default to 1800 (about 30 minutes)&lt;br /&gt;
* &#039;&#039;&#039;FindTime&#039;&#039;&#039;: The time window fail2ban will check, in seconds. Default is 900. So, this means fail2ban will only check for the number of failed login attempts in the last 15 minutes&lt;br /&gt;
* &#039;&#039;&#039;MaxRetry&#039;&#039;&#039;: Number of failed attempts in the last &#039;&#039;&#039;FindTime&#039;&#039;&#039; seconds to trigger a ban. Default is 3&lt;br /&gt;
* &#039;&#039;&#039;Mail&#039;&#039;&#039;: can be enabled or disabled (default is enabled). If enabled, each ban will notify the admin by email&lt;br /&gt;
* &#039;&#039;&#039;MailRecipient&#039;&#039;&#039;: if &#039;&#039;&#039;Mail&#039;&#039;&#039; is enabled, the email address which should receive ban notifications. Default is root (the admin account will receive)&lt;br /&gt;
&lt;br /&gt;
After changing one of these settings, you need to apply it:&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
for example :&lt;br /&gt;
&lt;br /&gt;
 config setprop fail2ban IgnoreIP 12.15.22.4,17.20.0.0/16&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
{{Note box|&amp;lt;code&amp;gt;signal-event fail2ban-conf&amp;lt;/code&amp;gt; effectively restarts the service and clears existing bans, but a suitable &#039;findtime&#039; results in a reban. Be aware that the restart delay can be unexpectedly lengthy due to the resource intensive process of scanning the logs  to reban offending addresses.}}&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
The following services are monitored out of the box, and fail2ban will ban client IP for &#039;&#039;&#039;BanTime&#039;&#039;&#039; if more than &#039;&#039;&#039;MaxRetry&#039;&#039;&#039; authentication failure occure in less than &#039;&#039;&#039;FindTime&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*ssh&lt;br /&gt;
*dovecot (only on SME9, or if you run [https://wikit.firewall-services.com/doku.php/smedev/dovecot smeserver-dovecot])&lt;br /&gt;
*qpsmtpd. If a remote server send you too many mails which qpsmtpd rejects, it&#039;s probably spammer, so Fail2ban will blacklist it. MaxRetry is x3 for this service, so with the default config, a remote server will be blacklisted if 9 mails are rejected in less than 15 minutes&lt;br /&gt;
*httpd-e-smith. The standard http server. 3 different filters check apache logs:&lt;br /&gt;
** noscripts: check client which ask for scripts which are not available on your server. It&#039;s usually script-kiddies trying to exploit security vulerabilities&lt;br /&gt;
** scan: another set of filter for popular scans (phpMyAdmin, wp-login, admin area etc...)&lt;br /&gt;
** auth: will check for standard authentication failure&lt;br /&gt;
*pam. This will check a generic authentication failure. Everything which uses pam should work&lt;br /&gt;
*[[Sogo|SOGo]]. Check SOGo logs for failed authentications&lt;br /&gt;
*[[LemonLDAP-NG]]. Check system logs for auth failure on LemonLDAP::NG portal&lt;br /&gt;
*ftp. Check auth failure on your FTP daemon&lt;br /&gt;
*[[Ejabberd]]. Check auth failure against EJabberd&lt;br /&gt;
&lt;br /&gt;
Each filters will disable itself if the corresponding service is disabled. You can also disable specific filter if you want. For example, if you want to disable Apache filters:&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop httpd-e-smith Fail2Ban disabled&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
== Selective bans ==&lt;br /&gt;
Fail2Ban will do its best to do a selective ban. For example, if 3 auth failure against ssh are detected, only tcp port 22 (or any other port you choosed for SSH) will be blocked. Same for httpd-e-smith, SOGO, LemonLDAP::NG which will only blacklist tcp ports 80 and 443, qpsmtpd will block tcp ports 25 and 465, dovecot will block 143 and 993 etc...&lt;br /&gt;
&lt;br /&gt;
There&#039;s only two ways to be completly locked (all port/protocol):&lt;br /&gt;
* pam. As this is a generic file, it&#039;s not possible to check which service was used when an auth failure occured, so the entire client IP will be blacklisted&lt;br /&gt;
* recidive. This is a special filter. It monitors fail2Ban logs, and blacklist client IP which gets locked several time. If a client is locked out 5 times in 24 hours, it&#039;ll be completly blacklisted for one full week&lt;br /&gt;
&lt;br /&gt;
== Use Fail2ban ==&lt;br /&gt;
=== List all jails ===&lt;br /&gt;
 [root@sme8 ~]# fail2ban-client status &lt;br /&gt;
 Status&lt;br /&gt;
 |- Number of jail:	10&lt;br /&gt;
 `- Jail list:		http-overflows, http-noscript, http-auth, sogo, pam-generic, ssh-ddos, http-scan, ssh, qpsmtpd, recidive&lt;br /&gt;
&lt;br /&gt;
=== List IP banned from a specific jail ===&lt;br /&gt;
 [root@sme8 ~]# fail2ban-client status ssh&lt;br /&gt;
choose the specific jail with the command above which lists the Jail-list.&lt;br /&gt;
&lt;br /&gt;
=== Example script which list How many ip are banned from all jails ===&lt;br /&gt;
&lt;br /&gt;
 nano /root/checklist_ban&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #lancer le script en sudo &lt;br /&gt;
 JAILS=$(fail2ban-client status | grep &amp;quot; Jail list:&amp;quot; | sed &#039;s/`- Jail list://g&#039; | sed &#039;s/,//g&#039;)&lt;br /&gt;
 for j in $JAILS&lt;br /&gt;
 do&lt;br /&gt;
 echo &amp;quot;$j $(fail2ban-client status $j | grep &amp;quot; Currently banned:&amp;quot; | sed &#039;s/   |- Currently banned:\t//g&#039;)&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 chmod 700 /root/checklist_ban&lt;br /&gt;
&lt;br /&gt;
to launch the script, do the following command:&lt;br /&gt;
 /root/checklist_ban&lt;br /&gt;
&lt;br /&gt;
=== Unban an IP ===&lt;br /&gt;
In certain case you would to unban an IP immediately because you don&#039;t want waste time to wait the  automatic IP unban process of fail2ban.&lt;br /&gt;
In first you you have to find the specific jail which has blocked you IP, you can refer to the mail that the admin user has received or you can list a specific jail.&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client status qpsmtpd&lt;br /&gt;
&lt;br /&gt;
 Status for the jail: qpsmtpd&lt;br /&gt;
 |- filter&lt;br /&gt;
 |  |- File list:	/var/log/qpsmtpd/current /var/log/sqpsmtpd/current &lt;br /&gt;
 |  |- Currently failed:	5&lt;br /&gt;
 |  `- Total failed:	119&lt;br /&gt;
 `- action&lt;br /&gt;
    |- Currently banned:	1&lt;br /&gt;
    |  `- IP list:	93.17.128.20 &lt;br /&gt;
    `- Total banned:	1&lt;br /&gt;
&lt;br /&gt;
If you want to know all you active jail, then do :&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client status&lt;br /&gt;
&lt;br /&gt;
Therefore you have to play with this command to unban your IP&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client set qpsmtpd unbanip 93.17.128.20 &lt;br /&gt;
&lt;br /&gt;
the generic command is :&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client set JAIL unbanip MYIP&lt;br /&gt;
&lt;br /&gt;
===Jail.conf===&lt;br /&gt;
The jail.conf is templated (/etc/e-smith/templates/etc/fail2ban/jail.conf) and the default file contains the configuration as below. You can add your own template of jail.conf at &lt;br /&gt;
 /etc/e-smith/templates-custom/etc/fail2ban/jail.conf&lt;br /&gt;
if first time you need to create the folder for your custom template&lt;br /&gt;
 mkdir -p  /etc/e-smith/templates-custom/etc/fail2ban/jail.conf&lt;br /&gt;
&lt;br /&gt;
and do this to expland templates&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/rc.d/init.d/masq&lt;br /&gt;
 /etc/init.d/masq restart&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====default jail.conf====&lt;br /&gt;
 [DEFAULT]&lt;br /&gt;
 ignoreip = 127.0.0.0/8 192.168.XXX.XXX 192.168.XXX.0/24&lt;br /&gt;
 bantime  = 1800&lt;br /&gt;
 findtime  = 900&lt;br /&gt;
 maxretry = 3&lt;br /&gt;
 usedns = yes&lt;br /&gt;
 backend = auto&lt;br /&gt;
&lt;br /&gt;
{{Note box|msg=Your network and your server are in the list of ignored IP  by fail2ban (see IgnoreIP)}}&lt;br /&gt;
&lt;br /&gt;
 [ssh]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = sshd&lt;br /&gt;
 logpath  = /var/log/sshd/current&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;22&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;SSH&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [ssh-ddos]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = sshd-ddos&lt;br /&gt;
 logpath  = /var/log/sshd/current&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;22&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;SSH&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [qpsmtpd]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = qpsmtpd&lt;br /&gt;
 logpath  = /var/log/*qpsmtpd/current&lt;br /&gt;
 maxretry = 9&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;25,465&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Qpsmtpd&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-overflows]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-overflows&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (overflows)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-noscript]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-noscript&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (noscript)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-scan]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-scan&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (scan)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-auth]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-auth&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (auth)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [pam-generic]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = pam-generic&lt;br /&gt;
 logpath  = /var/log/secure&lt;br /&gt;
 maxretry = 6&lt;br /&gt;
 action   = smeserver-iptables[bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;PAM generic&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [recidive]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = recidive&lt;br /&gt;
 logpath  = /var/log/fail2ban/daemon.log&lt;br /&gt;
 bantime  = 604800&lt;br /&gt;
 findtime = 86400&lt;br /&gt;
 maxretry = 5&lt;br /&gt;
 backend  = polling&lt;br /&gt;
 action   = smeserver-iptables[bantime=604800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Recidive&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
====Custom local filters====&lt;br /&gt;
&lt;br /&gt;
You can add your custom rules by adding a filtername.local file in /etc/fail2ban/filters.d/&lt;br /&gt;
 wget https://bugs.koozali.org/attachment.cgi?id=6229 -O /etc/fail2ban/filters.d/apache-badbots.local&lt;br /&gt;
&lt;br /&gt;
would be an example of local bad bots rules, be careful to test for your personal case. Some advanced rules could create a lot of false positive and lock out your users.&lt;br /&gt;
&lt;br /&gt;
== Uninstall ==&lt;br /&gt;
 yum remove smeserver-fail2ban fail2ban&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==User contributions==&lt;br /&gt;
=== Testing new regex ===&lt;br /&gt;
You can test new regex - notes from here http://bugs.contribs.org/show_bug.cgi?id=8955&lt;br /&gt;
&lt;br /&gt;
 fail2ban-regex [LOG] [REGEX]&lt;br /&gt;
&lt;br /&gt;
You can also test the actual conf files as follows&lt;br /&gt;
&lt;br /&gt;
 fail2ban-regex /var/log/qpsmtpd/current /etc/fail2ban/filter.d/qpsmtpd.conf&lt;br /&gt;
&lt;br /&gt;
Note that some characters such as ` may need escaping on the command line like this \` but do not need escaping in the conf files&lt;br /&gt;
&lt;br /&gt;
e.g From qpsmptd.conf file this works in the conf file&lt;br /&gt;
&lt;br /&gt;
 ^\s*\d+\s*logging::logterse plugin \(deny\): ` &amp;lt;HOST&amp;gt;\s*.*90\d.*msg denied before queued$&lt;br /&gt;
&lt;br /&gt;
However, on the command line it needs writing like this&lt;br /&gt;
&lt;br /&gt;
 ^\s*\d+\s*logging::logterse plugin \(deny\): \` &amp;lt;HOST&amp;gt;\s*.*90\d.*msg denied before queued$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show IPs banned by service===&lt;br /&gt;
====Check the fail2ban log====&lt;br /&gt;
Here is another quick script that shows you the most recent IPs banned in the logs. Note that they may have been unbanned but there is no check for this.&lt;br /&gt;
 mkdir /root/bin&lt;br /&gt;
 nano -w /root/bin/IP_list.sh&lt;br /&gt;
&lt;br /&gt;
and copy and paste the below code into the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # Set CLI vars to something we can read&lt;br /&gt;
 TYPE=$1&lt;br /&gt;
 LOG=$2&lt;br /&gt;
 &lt;br /&gt;
 # Set main grep string&lt;br /&gt;
 SEARCH=&amp;quot;Ban ((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Add the search term&lt;br /&gt;
 SEARCH=&amp;quot;\[$TYPE]\ $SEARCH&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Now search the log&lt;br /&gt;
 grep -oE &amp;quot;\[$TYPE\] Ban ((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])&amp;quot; $LOG&lt;br /&gt;
&lt;br /&gt;
Save the file and make it executable:&lt;br /&gt;
 chmod 755 /root/bin/IP_list.sh&lt;br /&gt;
&lt;br /&gt;
Usage : &lt;br /&gt;
 IP_list.sh [service] [log]&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
 IP_list.sh qpsmtpd /var/log/fail2ban/daemon.log&lt;br /&gt;
====Check the fail2ban banned IP for all active jails ====&lt;br /&gt;
by [[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]])&lt;br /&gt;
 mkdir /root/bin&lt;br /&gt;
 vim /root/bin/sfail2ban&lt;br /&gt;
&lt;br /&gt;
paste this in it:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 for SERVI in $(fail2ban-client status|grep &#039;Jail list&#039;|cut -d&#039;:&#039; -f2|sed &#039;s/, / /g&#039;| sed -e &#039;s/^[ \t]*//&#039;)&lt;br /&gt;
 do&lt;br /&gt;
 fail2ban-client status $SERVI |grep -E &#039;IP list|Status for the jail&#039;|sed &#039;N;s/\n/:/&#039;|cut -d: -f2,4&lt;br /&gt;
 done&lt;br /&gt;
then do &lt;br /&gt;
 chmod 755 /root/bin/sfail2ban&lt;br /&gt;
&lt;br /&gt;
Usage :&lt;br /&gt;
 sfail2ban&lt;br /&gt;
output:&lt;br /&gt;
 # sfail2ban&lt;br /&gt;
 ftp:	 &lt;br /&gt;
 imap:	 &lt;br /&gt;
 pam-generic:	 &lt;br /&gt;
 qpsmtpd:	 &lt;br /&gt;
 recidive:	141.98.80.15&lt;br /&gt;
 ssh:	&lt;br /&gt;
 ssh-ddos:	&lt;br /&gt;
 wordpress:	&lt;br /&gt;
&lt;br /&gt;
====Print a summary of the fail2ban db====&lt;br /&gt;
 mkdir -p /root/bin&lt;br /&gt;
 vi /root/bin/bansummary.sh&lt;br /&gt;
&lt;br /&gt;
Paste this&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
      echo -e \&lt;br /&gt;
      &amp;quot;IP             \t&amp;quot;\&lt;br /&gt;
      &amp;quot;BanTime             \t&amp;quot;\&lt;br /&gt;
      &amp;quot;UnbanTime           \t&amp;quot;\&lt;br /&gt;
      &amp;quot;Jail&amp;quot;&lt;br /&gt;
      &lt;br /&gt;
      for ban in $(db fail2ban show |awk -F\= &#039; $2==&amp;quot;ban&amp;quot; {print $1}&#039;); &lt;br /&gt;
        do&lt;br /&gt;
          IP=$(db fail2ban getprop $ban Host)&lt;br /&gt;
          Bantime=$(date +&amp;quot;%F %T&amp;quot; -d @$(db fail2ban getprop $ban BanTimestamp))&lt;br /&gt;
          UnBanTime=$(date +&amp;quot;%F %T&amp;quot; -d @$(db fail2ban getprop $ban UnbanTimestamp))&lt;br /&gt;
          LastJail=$(zgrep -H &amp;quot;Ban $IP&amp;quot; $(find /var/log/fail2ban -type f -ctime -7) |tail -1 |awk &#039;{print $6}&#039;) &lt;br /&gt;
      &lt;br /&gt;
          printf &amp;quot;%-15s&amp;quot; &amp;quot;$IP&amp;quot;&lt;br /&gt;
          echo -e &amp;quot;\t$Bantime\t$UnBanTime\t$LastJail&amp;quot;&lt;br /&gt;
        done&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
save, then make executable&lt;br /&gt;
 chmod 755 /root/bin/bansummary.sh&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 bansummary.sh&lt;br /&gt;
Output:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;IP             	BanTime             	UnbanTime           	Jail&lt;br /&gt;
      46.246.39.228  	2017-09-09 18:45:00	2017-09-10 18:45:00	[http-scan]&lt;br /&gt;
      124.239.180.102	2017-09-09 12:07:32	2017-09-10 12:07:32	[http-scan]&lt;br /&gt;
      212.237.54.93  	2017-09-09 19:27:32	2017-09-10 19:27:32	[http-scan]&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===WordPress===&lt;br /&gt;
Fail2Ban works with WordPress but needs some extra configuration. Please review the WordPress page, https://wiki.contribs.org/Wordpress#Fail2Ban&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]&lt;br /&gt;
and select the smeserver-fail2ban component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-fail2ban|title=this link}}. &lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component=smeserver-fail2ban|noresultsmessage=No open bugs found.}} &lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
Only released version in smecontrib are listed here.&lt;br /&gt;
&lt;br /&gt;
{{#smechangelog: smeserver-fail2ban}}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Contrib]]&lt;br /&gt;
[[Category: Security]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_FTP&amp;diff=98</id>
		<title>SMEServer FTP</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_FTP&amp;diff=98"/>
		<updated>2026-01-14T17:16:34Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Ftp (This page was last modified on 26 September 2025, at 18:18.)&lt;br /&gt;
&lt;br /&gt;
In short SME uses port 21 for FTP. Default mode used is passive. To use it you will need a custom template and enabling ports (PassivePort  https://bugs.koozali.org/show_bug.cgi?id=12454). &lt;br /&gt;
&lt;br /&gt;
Starting SME10, ftp default  is to use explicit TLS over ftp (FTPs explicite) &#039;&#039;&#039;Easy filezilla connexion to SME would use url with FTPES://.&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+disambiguation&lt;br /&gt;
!term / protocol&lt;br /&gt;
!port&lt;br /&gt;
!deamon&lt;br /&gt;
!explanation&lt;br /&gt;
|-&lt;br /&gt;
|ftp ftp://&lt;br /&gt;
|21&lt;br /&gt;
|proftpd&lt;br /&gt;
|unencrypted file transfer protocol, all is clear text, no encryption. disabled on SME&amp;gt;=10&lt;br /&gt;
|-&lt;br /&gt;
|ftps ftpes://&lt;br /&gt;
|21&lt;br /&gt;
|proftpd&lt;br /&gt;
|explicit TLS encrypted file transfer protocol, password exchange and files are encrypted&lt;br /&gt;
|-&lt;br /&gt;
|ftps ftps://&lt;br /&gt;
|900&lt;br /&gt;
|proftpd&lt;br /&gt;
|implicit TLS, not available on SME&lt;br /&gt;
|-&lt;br /&gt;
|sftp&lt;br /&gt;
|22&lt;br /&gt;
|sshd&lt;br /&gt;
|secured file transfer protocol over ssh. this needs a RSA or EC key  on SME Server&lt;br /&gt;
|}&lt;br /&gt;
SME Server offers a ftp server, which is Proftpd. If enabled it  allows you to access to the Primary ibay files folder with anonymous access, and to any content your user is allowed, if authenticated, inside /home/e-smith/files.&lt;br /&gt;
&lt;br /&gt;
Prior to SME 10 ftp was using cleat text communication (&#039;&#039;&#039;FTP&#039;&#039;&#039;), allowing one to listen to your password and files exchanged on the network. Now TLS is enforced by default (&#039;&#039;&#039;FTPs&#039;&#039;&#039;), and it is suggested that you keep it enabled.&lt;br /&gt;
&lt;br /&gt;
While you may be used to the traditional port 21 for file transfer protocol (&#039;&#039;&#039;FTP&#039;&#039;&#039;), this page is here to help you have steady access to your ftp server, by understanding it, and enabling the extra needed ports.&lt;br /&gt;
&lt;br /&gt;
Your server is using &lt;br /&gt;
&lt;br /&gt;
Do not confuse &#039;&#039;&#039;sFTP&#039;&#039;&#039;, which is part of ssh protocol and uses port 22, with &#039;&#039;&#039;FTPs&#039;&#039;&#039; which is the regular ftp protocol over port 21 using a layer of SSL/TLS encryption.&lt;br /&gt;
&lt;br /&gt;
== FTP connection modes : active versus passive ==&lt;br /&gt;
SME by default offers both active and passive mode when you are on LAN. However, as soon as you try to access from a  remote location you will have some difficulties depending on the situation.&lt;br /&gt;
&lt;br /&gt;
By default, for passive connection,  Proftpd will use ports from 1024 and up, which means that you must forward &#039;&#039;all&#039;&#039; ports 1024-65535 from the NAT to the FTP server!  And you have to allow many (possibly) dangerous ports in your fire-walling rules!  Not a good situation.&lt;br /&gt;
&lt;br /&gt;
==== The Modes ====&lt;br /&gt;
&lt;br /&gt;
===== active =====&lt;br /&gt;
From the server-side firewall&#039;s standpoint, to support active mode FTP the following communication channels need to be opened (http://slacksite.com/other/ftp.html):&lt;br /&gt;
&lt;br /&gt;
* FTP server&#039;s port 21 from anywhere (Client initiates connection)&lt;br /&gt;
* FTP server&#039;s port 21 to ports &amp;gt; 1024 (Server responds to client&#039;s control port)&lt;br /&gt;
* FTP server&#039;s port 20 to ports &amp;gt; 1024 (Server initiates data connection to client&#039;s data port)&lt;br /&gt;
* FTP server&#039;s port 20 from ports &amp;gt; 1024 (Client sends ACKs to server&#039;s data port)&lt;br /&gt;
&lt;br /&gt;
===== passive =====&lt;br /&gt;
From the server-side firewall&#039;s standpoint, to support passive mode FTP the following communication channels need to be opened (http://slacksite.com/other/ftp.html):&lt;br /&gt;
&lt;br /&gt;
* FTP server&#039;s port 21 from anywhere (Client initiates connection)&lt;br /&gt;
* FTP server&#039;s port 21 to ports &amp;gt; 1024 (Server responds to client&#039;s control port)&lt;br /&gt;
* FTP server&#039;s ports &amp;gt; 1024 from anywhere (Client initiates data connection to random port specified by server)&lt;br /&gt;
* FTP server&#039;s ports &amp;gt; 1024 to remote ports &amp;gt; 1024 (Server sends ACKs (and data) to client&#039;s data port)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note port 20 does not need to be open inward on SME, as it is only used to send from SME, however if you have a restrictive firewall between Internet and SME limiting outgoing connection you need to open port 20 to be able to do active ftp. http://www.proftpd.org/docs/howto/AWS.html&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway connected to Internet - Client is remote behind a NAT =====&lt;br /&gt;
Active mode will not work because the NAT will mostly hide the client port.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall.&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway behind a firewall / NAT  to Internet - Client is remote behind a NAT =====&lt;br /&gt;
Active mode will not work because the NAT will mostly hide the client port.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall and in your firewall between you SME and Internet. You might also need a template custom to add MasqueradeAddress (http://www.proftpd.org/docs/modules/mod_core.html#MasqueradeAddress).&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway connected to Internet - Client is remote directly connected to the Internet =====&lt;br /&gt;
Active mode will work.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall.&lt;br /&gt;
&lt;br /&gt;
== SSL mode: Explicit SSL versus Implicit SSL ==&lt;br /&gt;
&#039;&#039;&#039;SME 10 and above uses explicit SSL mode for FTPs&#039;&#039;&#039; over port 21 only and does not need port 990. &amp;lt;u&amp;gt;The client must explicitly request for SSL/TLS to be able to go on&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
FTPS (FTP over TLS) is served up in two incompatible modes. If using explicit FTPS, the client connects to the normal FTP port and explicitly switches into secure (TLS) mode with &amp;quot;AUTH TLS&amp;quot;, whereas implicit FTPS is an older style service that assumes TLS mode right from the start of the connection (and normally listens on TCP port 990, rather than 21). &lt;br /&gt;
&lt;br /&gt;
In a FileZilla client this means prefixing the host with &amp;quot;FTPES://&amp;quot; to connect an  &amp;quot;explicit&amp;quot; FTPS server, or &amp;quot;FTPS://&amp;quot; for the legacy &amp;quot;implicit&amp;quot; server (for which you will likely also need to set the port to 990).&lt;br /&gt;
&lt;br /&gt;
== Filezilla config ==&lt;br /&gt;
[[File:Filezilla-ftpes.png|left|thumb]]&lt;br /&gt;
If you use a client such a filezilla, starting SME 10, you will need to select the options&lt;br /&gt;
&lt;br /&gt;
* encryption: TLS/SSL explicit encription &lt;br /&gt;
* port: 21&lt;br /&gt;
* hostname : you ip or domain name&lt;br /&gt;
* user name: your user name &lt;br /&gt;
* password : your password user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
== SME enabling from smanager ==&lt;br /&gt;
[[File:Smanager2-ftp.png|none|thumb|898x898px]]&lt;br /&gt;
&lt;br /&gt;
== FTP configuration options in SME ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+configuration db&lt;br /&gt;
!key&lt;br /&gt;
!Property&lt;br /&gt;
!default&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; |ftp&lt;br /&gt;
|access&lt;br /&gt;
|private&lt;br /&gt;
|-&lt;br /&gt;
|TcpPorts&lt;br /&gt;
|49200:49999&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|ChrootDir&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TLSEnable&lt;br /&gt;
|on&lt;br /&gt;
|-&lt;br /&gt;
|TLSRequired&lt;br /&gt;
|on&lt;br /&gt;
|-&lt;br /&gt;
|TLSVerifyClient&lt;br /&gt;
|off&lt;br /&gt;
|-&lt;br /&gt;
|LoginAccess&lt;br /&gt;
|private&lt;br /&gt;
|-&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|disabled&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+account db for ibay type&lt;br /&gt;
!Property&lt;br /&gt;
!default&lt;br /&gt;
|-&lt;br /&gt;
|PublicAccess&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
*http://www.proftpd.org/docs/modules/mod_core.html#MasqueradeAddress Virtualhost vs Class see http://www.proftpd.org/docs/howto/NAT.html&lt;br /&gt;
* http://www.proftpd.org/docs/howto/FXP.html&lt;br /&gt;
&lt;br /&gt;
===Bug report===&lt;br /&gt;
Proftpd is listed in the [https://bugs.koozali.org/enter_bug.cgi?product=SME%20Server%2010.X bugtracker server] section.&lt;br /&gt;
&lt;br /&gt;
Please report all bugs, new feature requests and documentation issues there.&lt;br /&gt;
&lt;br /&gt;
Current bugs:&lt;br /&gt;
&lt;br /&gt;
https://bugs.koozali.org/buglist.cgi?bug_status=UNCONFIRMED&amp;amp;bug_status=CONFIRMED&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=IN_PROGRESS&amp;amp;bug_status=RESOLVED&amp;amp;f1=cf_package&amp;amp;list_id=102854&amp;amp;o1=equals&amp;amp;query_format=advanced&amp;amp;resolution=---&amp;amp;v1=e-smith-proftpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.filezilla-project.org/FTP_over_TLS#Explicit_vs_Implicit_FTPS&lt;br /&gt;
* http://www.proftpd.org/docs/howto/TLS.html&lt;br /&gt;
* https://hstechdocs.helpsystems.com/manuals/globalscape/archive/secureserver3/Explicit_versus_Implicit_SSL.htm&lt;br /&gt;
* https://winscp.net/eng/docs/ftp_modes&lt;br /&gt;
* http://www.proftpd.org/docs/howto/NAT.html&lt;br /&gt;
* http://slacksite.com/other/ftp.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Email&amp;diff=97</id>
		<title>SMEServer Email</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Email&amp;diff=97"/>
		<updated>2026-01-14T17:15:29Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Email (This page was last modified on 10 June 2023, at 09:56.)&lt;br /&gt;
&lt;br /&gt;
{{usefulnote}}&lt;br /&gt;
{{Languages}}&lt;br /&gt;
Information on the email subsystem used in SME Server covering sending/recieving, spam filtering, virus checking, webmail, domains and users. &lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
I am having trouble getting sme to send and receive email.&lt;br /&gt;
&lt;br /&gt;
Sending and receiving email are separate functions. You need to investigate each individually.&lt;br /&gt;
&lt;br /&gt;
===Sending===&lt;br /&gt;
If SME server does not send mail, you need to examine the /var/log/qmail/current logs to see what happens when it tries. Most commonly problems can be solved by sending via your ISP&#039;s mail server, possibly using encryption and/or authentication. Read the manual.&lt;br /&gt;
&lt;br /&gt;
===Receiving===&lt;br /&gt;
If SME server does not receive mail, then you need to ensure that SMTP connections reach your SME server (DNS settings, router configuration, ISP port blocks) and then you need to examine /var/log/qpsmtpd/current logs to determine what SME server does with the incoming connections. Most problems are DNS, router or ISP issues, and have nothing to do with SME server operation or configuration.&lt;br /&gt;
&lt;br /&gt;
====qpsmtpd &amp;quot;Connection Timed Out&amp;quot; errors====&lt;br /&gt;
See [[Bugzilla:6888]] and [[Bugzilla:2360]]&lt;br /&gt;
&lt;br /&gt;
A qpsmtpd timeout error may arise, this is not an issue that is caused by SME server directly, however it can become an issue depending on hardware and configuration settings that are contained in and around other enviroments. &lt;br /&gt;
&lt;br /&gt;
It is discussed under various names &lt;br /&gt;
&lt;br /&gt;
*Path MTU Discovery Blackhole http://www.phildev.net/mss/mss-talk.pdf&lt;br /&gt;
*Path MTU Discovery Failures http://www.wand.net.nz/~mluckie/pubs/debugging-pmtud.imc2005.pdf&lt;br /&gt;
*TCP Problems with Path MTU Discovery http://www.ietf.org/rfc/rfc2923.txt&lt;br /&gt;
&lt;br /&gt;
As discussed in [[Bugzilla:6888]] a workaround was found that may help in mitigating the issue.&lt;br /&gt;
&lt;br /&gt;
The [http://linux.die.net/man/8/tracepath tracepath] utility (included with SME 8.0 and SME 7.6) can be used to locate non-standard MTU values between your SME server and any remote host.&lt;br /&gt;
&lt;br /&gt;
You can discover the smallest MTU between you and google.com (for example) by running this command, then locating the smallest value of &amp;quot;pmtu&amp;quot; in the results:&lt;br /&gt;
 tracepath google.com&lt;br /&gt;
&lt;br /&gt;
If tracepath returns any value below 1500 between your SME server and a mail server that you need to receive email from, you may need to reset the MTU on the SME server to match the smallest value returned.&lt;br /&gt;
&lt;br /&gt;
For example, if tracepath returns 1492 (typical for internet connections using PPPoE), you would need to set the MTU on your SME server to the same value (1492) using the following:&lt;br /&gt;
&lt;br /&gt;
 config setprop InternalInterface MTU 1492&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
&lt;br /&gt;
===Webmail broken after upgrade===&lt;br /&gt;
After the usual post-upgrade and reboot, webmail is broken with messages like the following in the messages log:&lt;br /&gt;
&lt;br /&gt;
 Apr 20 17:29:53 mail [4614]: PHP Fatal error:  Call to a member function on a non-object in /home/httpd/html/horde/imp/lib/Block/tree_folders.php on line 65&lt;br /&gt;
 Apr 20 17:29:53 mail [4614]: PHP Warning:  Unknown(): Unable to call () - function does not exist in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
As workaround, logout of Horde, close the browser, reopen, log in to Horde, Webmail should now be fully functional. (Based on suggested fix in [[Bugzilla:5177]])&lt;br /&gt;
&lt;br /&gt;
==Spam==&lt;br /&gt;
===Spamassassin===&lt;br /&gt;
====Spam filter with Server-Manager====&lt;br /&gt;
Using the Server-Manager Configuration/E-Mail panel, adjust the settings to these reasonable defaults.&lt;br /&gt;
&lt;br /&gt;
*Virus scanning Enabled&lt;br /&gt;
*Spam filtering Enabled&lt;br /&gt;
*Spam sensitivity Custom&lt;br /&gt;
*Custom spam tagging level 4&lt;br /&gt;
*Custom spam rejection level 12&lt;br /&gt;
*Sort spam into junkmail folder Enabled&lt;br /&gt;
*Modify subject of spam messages Enabled&lt;br /&gt;
&lt;br /&gt;
I would also recommend blocking all executable content. To do so, select (highlight) all of the attachment types other than zip files (the last two).&lt;br /&gt;
&lt;br /&gt;
Click Save.&lt;br /&gt;
====How It Works====&lt;br /&gt;
&lt;br /&gt;
When receiving an incoming message, the server first tests for RBL and DNSBL listings, if enabled.  If the sender is blacklisted, the messages are blocked outright and Spamassassin never sees it.&lt;br /&gt;
&lt;br /&gt;
With this configuration, the spammiest messages, those marked as 12 or above, will be rejected at the SMTP level. Those spam messages marked between 4 and 12, will be routed to the users&#039; (IMAP) junkmail folder. This is done so the users can check for false-positives...valid messages that were classified as spam by SpamAssassin.&lt;br /&gt;
&lt;br /&gt;
Users may check their junkmail folders for false-positives via webmail, or, if they are using an IMAP mail client, by simply checking the junkmail folder exposed by their mail client.&lt;br /&gt;
&lt;br /&gt;
 https://servername/webmail&lt;br /&gt;
&lt;br /&gt;
====Enable/Disable Filtering Per-User====&lt;br /&gt;
&lt;br /&gt;
This procedure doesn&#039;t really disable the spam filtering, it just stopps the spam from being routed to the &#039;junkmail&#039; folder.&lt;br /&gt;
&lt;br /&gt;
Per-user filtering is enabled by default.  Disable filtering with the following command, as root:&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop USERNAME SortSpam disabled&lt;br /&gt;
 db accounts show USERNAME                                   # only displays settings&lt;br /&gt;
 signal-event user-modify USERNAME&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Use the Junkmail folder====&lt;br /&gt;
The Default spamassassin behaviour put spams in the inbox which is very convenient for users in case of false positive, but it is not practical for learning, and especially it does not facilitate the life of the user (setting is available via the manager). If you want to put directly spams in the junkmail folder issue the command above.&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin SortSpam enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Message Retention Time====&lt;br /&gt;
Set spamassassin for automatically delete junkmail.&lt;br /&gt;
You can change the &amp;quot;days&amp;quot; that spamassassin sets to automatically delete junkmail, to delete after two months &lt;br /&gt;
&lt;br /&gt;
 db configuration setprop spamassassin MessageRetentionTime 60  &lt;br /&gt;
 signal-event email-update &lt;br /&gt;
&lt;br /&gt;
====Spam score Level and Spam score rejection====&lt;br /&gt;
The &amp;quot;Custom spam rejection level&amp;quot; will only work when &amp;quot;Spam sensitivity&amp;quot; is set to custom.&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Open server-manager.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Click e-mail in the navigation pane (left-hand side).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Click Change e-mail filtering settings.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Change &amp;quot;Spam sensitivity&amp;quot; to custom and adjust the settings to your liking.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This happens because by default, no mail (except for viruses) gets rejected without the admin doing something first.&lt;br /&gt;
&lt;br /&gt;
As a reference, the following setting will have the following behaviours :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Sensitivity!!Spam tagging level!!Spam rejection level&lt;br /&gt;
|-&lt;br /&gt;
|Custom||TagLevel value &amp;lt;br&amp;gt;(Custom spam tagging level)||RejectLevel value &amp;lt;br&amp;gt;(Custom spam rejection level)&lt;br /&gt;
|-&lt;br /&gt;
|veryhigh||2||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|high||3||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|medium||5||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|low||7||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|verylow||9||No rejection&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====X-Spam-Level Header in Email Messages====&lt;br /&gt;
SME does not create an X-Spam-Level header in processed email messages by default.&lt;br /&gt;
&lt;br /&gt;
To enable this capability:&lt;br /&gt;
 /usr/bin/yum install --enablerepo=smecontribs smeserver-qpsmtpd-spamassassinlevelstars&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
(Based on [[Bugzilla:3505]])&lt;br /&gt;
{{note box| as SME8 this functionality seems to be included --[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 09:05, 3 February 2014 (MST)}}&lt;br /&gt;
&lt;br /&gt;
====spamassassin qpsmtpd&#039;s plugins email size limit====&lt;br /&gt;
This db configuration setting sets the maximum email size above which spamassassin will not apply the spam filtering rules as have been set.&lt;br /&gt;
&lt;br /&gt;
The default setting is 500kb, to increase the maximum size, apply the following commands from a root terminal&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop spamassassin MaxMessageSize 2000000 &lt;br /&gt;
increases message size to 2mb, apply the change with &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
(Based on [[Bugzilla:7606]])&lt;br /&gt;
&lt;br /&gt;
====Custom Rule Scores====&lt;br /&gt;
You can customize the score assigned by a specific Spamassassin rule (SARE_ADULT2 in this case) as follows:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf&lt;br /&gt;
 cd /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf&lt;br /&gt;
 echo &amp;quot;score SARE_ADULT2 20.000&amp;quot; &amp;gt;&amp;gt; 20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can now add additional tests and custom scores by editing the newly-created template fragment &#039;&#039;20localscores&#039;&#039; and adding new custom scores using:&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
Each custom score goes on its own line.  If you enter a score surrounded by parentheses, the &amp;quot;custom&amp;quot; score will be added to the default score for the specified test (use &#039;&#039;score TEST_NAME (-1)&#039;&#039; to reduce the score for &#039;TEST_NAME&#039; by 1) &lt;br /&gt;
&lt;br /&gt;
You can remove these customizations using: &lt;br /&gt;
 rm -f /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;br /&gt;
*http://spamassassin.apache.org/full/3.1.x/dist/doc/Mail_SpamAssassin_Conf.html#scoring_options&lt;br /&gt;
*http://spamassassin.apache.org/tests_3_2_x.html&lt;br /&gt;
*http://www.rulesemporium.com/&lt;br /&gt;
&lt;br /&gt;
====SPF mail rejection/flagging policy====&lt;br /&gt;
{{Warning box|Please note that these instructions do not apply to SME9.2 where the version of qpsmtpd (0.96) does all this out of the box. Indeed if &lt;br /&gt;
the custom template below is applied (or left in?) to an SME9.2 system, then you may find that emails are denied when they ought to be accepted!}}&lt;br /&gt;
&lt;br /&gt;
SME server can protect based of SPF records using spamassassin and the &#039;sender_permitted_from&#039; plugin. The following lines will enable the plugin.&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 echo sender_permitted_from spf_deny 1 &amp;gt; 30spf&lt;br /&gt;
 /sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0&lt;br /&gt;
&lt;br /&gt;
Then set your custom rule scores using the [[#Custom_Rule_Scores|Custom Rule Scores]] section of this page. You should base these scores on your settings in server-manager &amp;gt; Configuration &amp;gt; Email &amp;gt; Change e-mail filtering settings  or via db config commands for those with that skillset&lt;br /&gt;
 echo &amp;quot;score SPF_SOFTFAIL 6.000&amp;quot; &amp;gt;&amp;gt; 20localscores &lt;br /&gt;
 echo &amp;quot;score SPF_FAIL 14.000&amp;quot; &amp;gt;&amp;gt; 20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
In our testing an email that doesn&#039;t match SPF records and the sender domain owner has defined a soft fail, if is attributed 6 points and sorted to junkmail folder. If the sender domain owner has defined a hard fail the email attibuted 14 points and is subsequently rejected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
References (but instructions changed to meet new qmail structure):&lt;br /&gt;
&lt;br /&gt;
*http://forums.contribs.org/index.php?topic=21631.0&lt;br /&gt;
&lt;br /&gt;
====Pyzor Timeout====&lt;br /&gt;
&lt;br /&gt;
See [[Bugzilla: 5973]]&lt;br /&gt;
{{Warning box|SME server 7.# users be aware of an issue that can appear in the /var/log/spamd/current logs&lt;br /&gt;
&amp;quot; pyzor: [5281] error: TERMINATED, signal 15 (000f)&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
This can be mitigated by the adding of a template fragment.&lt;br /&gt;
&lt;br /&gt;
Template fragment to set a pyzor_timeout based on a value in the config db.&lt;br /&gt;
If no value is set, there is no output (so pyzor uses it&#039;s internal default).&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates/etc/mail/spamassassin/local.cf/50pyzor_timeout&lt;br /&gt;
 cd /etc/e-smith/templates/etc/mail/spamassassin/local.cf/50pyzor_timeout&lt;br /&gt;
 nano 50pyzor_timeout&lt;br /&gt;
&lt;br /&gt;
Contents of 50pyzor_timeout&lt;br /&gt;
 &lt;br /&gt;
 {&lt;br /&gt;
   my $pyzor_timeout = ($spamassassin{PyzorTimeout} || 0);&lt;br /&gt;
   if ($pyzor_timeout ne &#039;0&#039;)&lt;br /&gt;
   {&lt;br /&gt;
      return &amp;quot;pyzor_timeout &amp;quot; . ($pyzor_timeout);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Then a value can be set using:&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin PyzorTimeout 15&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Whitelist and Blacklist====&lt;br /&gt;
If mail comes in and it is misclassified as spam by Spamasassin, you can add the sender to the Spamassassin whitelist so that future messages coming in from that sender are not filtered.&lt;br /&gt;
Conversely, you can add a spammer to the Spamassassin blacklist so you never see their spam again.&lt;br /&gt;
Add senders (or their entire domains) to the global whitelist (or blacklist) with commands similar to these (as root):&lt;br /&gt;
&lt;br /&gt;
 db spamassassin setprop wbl.global *@vonage.com White&lt;br /&gt;
 db spamassassin setprop wbl.global *domain2.com White&lt;br /&gt;
 db spamassassin setprop wbl.global user@domain3.com White&lt;br /&gt;
 db spamassassin setprop wbl.global spammer@spamdomain.com Black&lt;br /&gt;
&lt;br /&gt;
you can block an entire TLD but please be aware that you might be denying a legitimate email in the future.&lt;br /&gt;
 db spamassassin setprop wbl.global *@*.xyz Black&lt;br /&gt;
 db spamassassin setprop wbl.global *@*.link Black&lt;br /&gt;
&lt;br /&gt;
expland template and save the configuration to the database&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can view the lists with this command:&lt;br /&gt;
 db spamassassin show&lt;br /&gt;
&lt;br /&gt;
These lists can be also controlled by the server-manager with the wbl contrib http://wiki.contribs.org/Email_Whitelist-Blacklist_Control&lt;br /&gt;
&lt;br /&gt;
====Testing====&lt;br /&gt;
&lt;br /&gt;
You can check the auto-learning statistics with this command. You will be able to note the accumulation of the spam tokens (or not). Note that the Bayesian filtering must receive 200 spam messages before it starts to function, so don&#039;t expect instantaneous results.&lt;br /&gt;
&lt;br /&gt;
 sa-learn --dump magic&lt;br /&gt;
&lt;br /&gt;
You can check the spam filter log with this command:&lt;br /&gt;
&lt;br /&gt;
 tail -50 /var/log/spamd/current | tai64nlocal&lt;br /&gt;
&lt;br /&gt;
Check spamassassin configuration like this:&lt;br /&gt;
&lt;br /&gt;
 spamassassin -D --lint&lt;br /&gt;
&lt;br /&gt;
If you ever see an error such as:&lt;br /&gt;
&lt;br /&gt;
 warn: bayes: cannot open bayes databases /etc/mail/spamassassin/bayes_* R/W: tie failed: Permission denied&lt;br /&gt;
&lt;br /&gt;
Try adjusting some permissions with these commands:&lt;br /&gt;
&lt;br /&gt;
 chown :spamd /var/spool/spamd/.spamassassin/*&lt;br /&gt;
 chmod g+rw /var/spool/spamd/.spamassassin/*&lt;br /&gt;
&lt;br /&gt;
===Real-time Blackhole List (RBL)===&lt;br /&gt;
Enabling RBL&#039;s &amp;lt;br&amp;gt;&lt;br /&gt;
RBL&#039;s are disabled by default to allow maximum accommodation (your ISP may be on a RBL &amp;amp; you may not know it). You can enable RBL&#039;s by:&lt;br /&gt;
 config setprop qpsmtpd DNSBL enabled RHSBL enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can see your RBL&#039;s by:&lt;br /&gt;
 config show qpsmtpd&lt;br /&gt;
&lt;br /&gt;
You can add to your RBL&#039;s by:&lt;br /&gt;
 config setprop qpsmtpd RBLList &amp;lt;rbl-list-name&amp;gt;&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Many will argue what&#039;s best, some say the SME defaults are too aggressive and affect some popular free webmail accounts, but most would agree that you can set stable, conservative and non aggressive settings by:&lt;br /&gt;
 config setprop qpsmtpd RBLList zen.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
A conservative setting for the associated DNSBL SBLList is:&lt;br /&gt;
 config setprop qpsmtpd SBLList dbl.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: More information on this topic can be found here:&lt;br /&gt;
[http://wiki.contribs.org/Updating_to_SME_7.2#RHSBL_Servers]&lt;br /&gt;
[http://wiki.contribs.org/Updating_to_SME_7.2#DNSBL_Servers]&lt;br /&gt;
&lt;br /&gt;
====Possible issues with RBL====&lt;br /&gt;
When an external dns provider is set in the console menu, it may interfere with some blacklists activated here (RHSBL and DNSBL). The black.uribl.com is know to bounce all emails in this case with a rejection message delivered to the sender. You can in this case&lt;br /&gt;
&lt;br /&gt;
*Remove the black.uribl.com of your SBLList&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd SBLList multi.surbl.org:rhsbl.sorbs.net:dbl.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
*Let the SME Server being the only dns resolver by removing the dns provider/forwarder in the console menu.&lt;br /&gt;
&lt;br /&gt;
See http://uribl.com/about.shtml#abuse for more information about this issue with black.uribl.com&lt;br /&gt;
&lt;br /&gt;
====Obsolete lists====&lt;br /&gt;
These lists can not be used with smeserver. A migrate fragment will remove them from your settings each time you reconfigure your server.&lt;br /&gt;
&lt;br /&gt;
*RBLList&lt;br /&gt;
&lt;br /&gt;
       combined.njabl.org&lt;br /&gt;
       list.dsbl.org&lt;br /&gt;
       multihop.dsbl.org&lt;br /&gt;
       dnsbl.ahbl.org&lt;br /&gt;
&lt;br /&gt;
*SBLLIST&lt;br /&gt;
&lt;br /&gt;
       blackhole.securitysage.com&lt;br /&gt;
       bulk.rhs.mailpolice.com&lt;br /&gt;
       fraud.rhs.mailpolice.com&lt;br /&gt;
       porn.rhs.mailpolice.com&lt;br /&gt;
       adult.rhs.mailpolice.com&lt;br /&gt;
       bogusmx.rfc-ignorant.org&lt;br /&gt;
       ex.dnsbl.org&lt;br /&gt;
&lt;br /&gt;
===Server Only===&lt;br /&gt;
Some of the spam filter rules cannot work unless the SMESERVER knows the external IP of the box. If you put a SMESERVER in server-only mode behind other firewalls, it will lose some of the anti-spam rules.  For example, the rule that blocks attempts where spammers try &amp;quot;HELO a.b.c.d&amp;quot; where a.b.c.d is your external IP address.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, many admins believe that port-forwarding SMTP provides additional security. It doesn&#039;t, it limits the SMESERVER&#039;s ability to apply some rules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===I want to enable GreyListing===&lt;br /&gt;
GreyListing support is under the covers and can easily be enabled for those who know what they are doing. However, many experienced users found that they spent more time looking after the greylisting configuration than they received in benefit.&lt;br /&gt;
see [[Greylisting]]&lt;br /&gt;
&lt;br /&gt;
===Bayesian Filtering===&lt;br /&gt;
From [[wikipedia:Naive_Bayes_spam_filtering|Wikipedia]]:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Naive Bayes classifiers work by correlating the use of tokens (typically words, or sometimes other things), with spam and non-spam e-mails and then using Bayes&#039; theorem to calculate a probability that an email is or is not spam.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SME server supports bayesian filtering, but does not have it enabled by default.&lt;br /&gt;
&lt;br /&gt;
Enabling bayesian filtering, autolearning, and spam/ham training allows spamassassin to learn from received email and improve spam filter performance. [[Bugzilla: 6822]]&lt;br /&gt;
&lt;br /&gt;
====Bayesian Autolearning====&lt;br /&gt;
The following command will enable the bayesian learning filter and set thresholds for the bayesian filter.&lt;br /&gt;
 config setprop spamassassin UseBayes 1&lt;br /&gt;
 config setprop spamassassin BayesAutoLearnThresholdSpam 6.00&lt;br /&gt;
 config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10&lt;br /&gt;
 config setprop spamassassin UseBayesAutoLearn 1&lt;br /&gt;
 expand-template /etc/mail/spamassassin/local.cf&lt;br /&gt;
 sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex&lt;br /&gt;
 chmod 640 /var/spool/spamd/.spamassassin/bayes_* &lt;br /&gt;
 config setprop spamassassin status enabled&lt;br /&gt;
 config setprop spamassassin RejectLevel 12&lt;br /&gt;
 config setprop spamassassin TagLevel 4&lt;br /&gt;
 config setprop spamassassin Sensitivity custom&lt;br /&gt;
 config setprop spamd SpamLearning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
These commands will:&lt;br /&gt;
&lt;br /&gt;
*enable spamassassin&lt;br /&gt;
*configure spamassassin to reject any email with a score above 12&lt;br /&gt;
*tag spam scored between 4 and 12 in the email header&lt;br /&gt;
*enable bayesian filter&lt;br /&gt;
*&#039;autolearn&#039; as SPAM any email with a score above 6.00&lt;br /&gt;
&lt;br /&gt;
 Note: SpamAssassin requires at least 3 points from the header, and 3 points from the body&lt;br /&gt;
 to auto-learn as spam.&lt;br /&gt;
 Therefore, the minimum working value for this option is 6, to be changed in increments of 3,&lt;br /&gt;
 12 considered to be a good working value..&lt;br /&gt;
&lt;br /&gt;
*&#039;autolearn&#039; as HAM any email with a score below 0.10&lt;br /&gt;
&lt;br /&gt;
Check the bayes stats with the command:&lt;br /&gt;
 sa-learn --dump magic&lt;br /&gt;
&lt;br /&gt;
The database is located in /var/spool/spamd/.spamassassin/bayes&lt;br /&gt;
&lt;br /&gt;
====LearnAsSpam / LearnAsHam (spam/ham training)====&lt;br /&gt;
&lt;br /&gt;
LearnAsSpam &amp;amp; LearnAsHam are scripts that can be installed on your server to allow users to manually &amp;quot;train&amp;quot; the bayes database.  Training is done by users moving Spam from their Inbox to the &amp;quot;LearnAsSpam&amp;quot; folder, and by COPYING real email that was delivered to junkmail into the &amp;quot;LearnAsHam&amp;quot; folder.  All messages in both LearnAsSpam and LearnAsHam are deleted once they have been processed and their tokens have been added to the bayes database.&lt;br /&gt;
&lt;br /&gt;
To install:&lt;br /&gt;
&lt;br /&gt;
* Enable bayes database as described in [[Email#Bayesian_Autolearning | Bayesian Autolearning]] (not the best approach, prefer manual learn by user), or&lt;br /&gt;
* Install smeserver-learn as per wiki page [[Learn]](and keep auto-learning off), then &lt;br /&gt;
* Instruct your users to move any SPAM they find from their Inbox to their LearnAsSpam folder, and to COPY any non-spam (ham) they find in their junkmail folder into their LearnAsHam folder.&lt;br /&gt;
&lt;br /&gt;
This is a really efficient way to reduce impact of SPAM to your particular installation. Do not fear to run again files that are tagged as SPAM, as they will either get ignored if all their patterns are known, or the Bayes might catch one more pattern that could help you to get ride of the next incoming SPAM to even get accepted.&lt;br /&gt;
&lt;br /&gt;
If you want, the code below counts how many e-mail are in LearnAsSpam and LearnAsHam directories (of all users). It&#039;s useful to know if your users are using those folders. However Learn will send you a report after each pass. If you are interested on the number of emails lefts in the junkmail directory without any attention, you could install [[mailstats | smeserver-mailstats]] and activate the option to account for them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#  ContaLearn.sh&lt;br /&gt;
&lt;br /&gt;
#for compatibility with older versions without rpm, testing&lt;br /&gt;
[  `/sbin/e-smith/db configuration getprop LearnAsSpam dir` ] &amp;amp;&amp;amp;&lt;br /&gt;
LearnAsSpam=`/sbin/e-smith/db configuration getprop LearnAsSpam dir` || LearnAsSpam=&#039;LearnAsSpam&#039;;&lt;br /&gt;
[  `/sbin/e-smith/db configuration getprop LearnAsHam dir` ] &amp;amp;&amp;amp;&lt;br /&gt;
LearnAsHam=`/sbin/e-smith/db configuration getprop LearnAsHam dir` || LearnAsHam=&#039;LearnAsSpam&#039;;&lt;br /&gt;
JunkMail=&#039;junkmail&#039;;&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
date&lt;br /&gt;
declare -i tspam&lt;br /&gt;
declare -i tham&lt;br /&gt;
declare -i tleft&lt;br /&gt;
declare -i tnseen&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;%-25s %-11s %-11s %-11s %-11s \n&amp;quot; &amp;quot;User&amp;quot; &amp;quot;LearnAsSpam&amp;quot; &amp;quot;LearnAsHam&amp;quot; &amp;quot;JunkMail&amp;quot; &amp;quot;NotSeen&amp;quot;&lt;br /&gt;
pushd /home/e-smith/files/users/ &amp;gt;&amp;gt;/dev/nul&lt;br /&gt;
for u in `ls ` #| grep -v admin`&lt;br /&gt;
do&lt;br /&gt;
[ &amp;quot;$u&amp;quot; = &amp;quot;admin&amp;quot; ] &amp;amp;&amp;amp; mailpath=&amp;quot;/home/e-smith/&amp;quot; ||  mailpath=&amp;quot;/home/e-smith/files/users/$u&amp;quot; ;&lt;br /&gt;
  spam=`ls -1 $mailpath/Maildir/.$LearnAsSpam/cur |wc -l`&lt;br /&gt;
  ham=`ls -1 $mailpath/Maildir/.$LearnAsHam/cur |wc -l`&lt;br /&gt;
  left=`ls -1 $mailpath/Maildir/.$JunkMail/cur |wc -l`&lt;br /&gt;
  nseen=`ls -1 $mailpath/Maildir/.$JunkMail/new |wc -l`&lt;br /&gt;
  if  [[ $spam &amp;gt; 0 ]] || [[ $ham &amp;gt; 0 ]] || [[ $left &amp;gt; 0 ]] || [[ $nseen &amp;gt; 0 ]];   then&lt;br /&gt;
     printf &amp;quot;%-25s %-11d %-11d %-11d %-11d \n&amp;quot; $u $spam $ham $left $nseen&lt;br /&gt;
  fi&lt;br /&gt;
  tspam=$tspam+$spam&lt;br /&gt;
  tham=$tham+$ham&lt;br /&gt;
  tleft=$tleft+$left&lt;br /&gt;
  tnseen=$tnseen+$nseen&lt;br /&gt;
done&lt;br /&gt;
echo &amp;quot;----------------------------------------------------------------------&amp;quot;&lt;br /&gt;
printf &amp;quot;%-25s %-11d %-11d %-11d %-11d \n&amp;quot; &amp;quot;Total:&amp;quot; $tspam $tham $tleft $tnseen&lt;br /&gt;
echo&lt;br /&gt;
popd &amp;gt;&amp;gt;/dev/nul&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Learn Contrib====&lt;br /&gt;
The [[Learn]] contrib is intended to install and configure the bayes training tools LearnAsSpam &amp;amp; LearnAsHam.&lt;br /&gt;
&lt;br /&gt;
====Reset the Bayes Database====&lt;br /&gt;
Based on this forum post http://forums.contribs.org/index.php/topic,50712.msg258844.html#msg258844 it may be advantageous to remove the bayes database every few years &amp;amp; recreate it, in order to improve spam filtering performance. &lt;br /&gt;
&lt;br /&gt;
Follow these instructions to turn bayes OFF, delete the database, create an empty database, and turn bayes back on:&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin UseBayes 0&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 &#039;rm&#039; /var/spool/spamd/.spamassassin/bayes* &lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin UseBayes 1&lt;br /&gt;
 expand-template /etc/mail/spamassassin/local.cf&lt;br /&gt;
 sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex&lt;br /&gt;
 chmod 640 /var/spool/spamd/.spamassassin/bayes_* &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Updates to smeserver-spamassasin now require two new config db settings to have bayesian autolearning enabled.  See forum post https://forums.contribs.org/index.php/topic,54320.msg284208.html#msg284208&lt;br /&gt;
&lt;br /&gt;
===The Sonora Communications &amp;quot;Spam Filter Configuration for SME 7&amp;quot; howto===&lt;br /&gt;
&lt;br /&gt;
http://www.sonoracomm.com/support/19-inet-support/49-spam-filter-configuration-for-sme-7&lt;br /&gt;
&lt;br /&gt;
===GeoIP: spam blocking based on geographical information===&lt;br /&gt;
&lt;br /&gt;
The GeoIP plugin for Spamassasin lets us know where our mail server is receiving mail from. If we&#039;re receiving too much spam from a particular location, this will help track it down. We can then use that info to reject connections from that place taking the load off our server.&lt;br /&gt;
&lt;br /&gt;
{{Note box | This can be a crude way of blocking spam and potentially also block legitimate users!}}&lt;br /&gt;
&lt;br /&gt;
You can find information how to install and use it on the [[GeoIP]] page.&lt;br /&gt;
&lt;br /&gt;
==Anti Virus==&lt;br /&gt;
SME Server uses Clam AntiVirus (http://www.clamav.net) as the default and built-in anti virus engine.&lt;br /&gt;
&lt;br /&gt;
===Signatures===&lt;br /&gt;
By default SME Server will automatically get virus signature database updates from ClamAV.&lt;br /&gt;
&lt;br /&gt;
Other people and organizations have developed additional signatures which can also be used with ClamAV to provide extra protection. Databases of these signatures can be downloaded and installed on SME Server, and used by ClamAV&lt;br /&gt;
&lt;br /&gt;
In order to automate the download and installation of the additional databases, as well as control which databases you use, follow the instruction in the [[Virus:Additional_Signatures|Virus:Additional Signatures]] Howto&lt;br /&gt;
&lt;br /&gt;
===Heuristic Scan===&lt;br /&gt;
HeuristicScanPrecedence is a new option in clamav 0.94.&lt;br /&gt;
&lt;br /&gt;
When enabled, if a heuristic scan (such as phishingScam) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time.&lt;br /&gt;
&lt;br /&gt;
To enable this feature:&lt;br /&gt;
 config setprop clamav HeuristicScanPrecedence yes&lt;br /&gt;
 expand-template /etc/clamd.conf&lt;br /&gt;
 sv t clamd&lt;br /&gt;
&lt;br /&gt;
Default is disabled.&lt;br /&gt;
&lt;br /&gt;
===Attachment Filtering===&lt;br /&gt;
The functionality to block possible executable and virus files attached to emails has been incorporated into SME Server v7.x. See the [[SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Filtering|Email]] panel in server manager.&lt;br /&gt;
&lt;br /&gt;
Additional file signature patterns can be added to the SME defaults. See the [[Virus:Email_Attachment_Blocking|Virus:Email Attachment Blocking]] Howto for further information&lt;br /&gt;
&lt;br /&gt;
==Email Clients==&lt;br /&gt;
===&amp;quot;concurrency limit reached&amp;quot; when using IMAP===&lt;br /&gt;
Sometime shows as Thunderbird giving this error message,&lt;br /&gt;
&#039;&#039;This Mail-server is not a imap4 mail-server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To workaround thunderbirds limitations change, this thunderbird setting to false&lt;br /&gt;
&lt;br /&gt;
*Preferences, Advanced, Config editor (aka about:config): filter on tls.&lt;br /&gt;
*set security.enable_tls to false&lt;br /&gt;
&lt;br /&gt;
If the total concurrency limit is reached, it&#039;ll look like this in /var/log/dovecot/current:&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c1f19c9381c master: Warning: service(imap): process_limit (2) reached, client connections are being dropped&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c291a4712dc imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c291a471aac imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the per IP concurrency limit, it&#039;ll be like this:&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c6214542b94 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=&amp;lt;someone&amp;gt;, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=&amp;lt;abcdefgh&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c6233f1bcb4 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=&amp;lt;someone&amp;gt;, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=&amp;lt;ijklmnop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following commands will give your the current value:&lt;br /&gt;
 db configuration getprop imap ConcurrencyLimit || echo 400&lt;br /&gt;
 db configuration getprop imap ConcurrencyLimitPerIP || echo 12&lt;br /&gt;
&lt;br /&gt;
You can also  increase the ConcurrencyLimitPerIP  and/or ConcurrencyLimit value for imap and/or imaps (secure)&lt;br /&gt;
 config setprop imap ConcurrencyLimitPerIP 20&lt;br /&gt;
 config setprop imaps ConcurrencyLimitPerIP 20&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
{{Note box| for sme9, only the key imap has properties ConcurrencyLimitPerIP,checkConcurrencyLimit,ProcessMemoryLimit. If you set these properties to the key imaps, a migrate fragment will remove them automatically.}}&lt;br /&gt;
To see configuration:&lt;br /&gt;
 config show imap&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/dovecot/current | tai64nlocal  #out of date&lt;br /&gt;
&lt;br /&gt;
More detail can be found [http://forums.contribs.org/index.php?topic=33124.0 here] or [https://forums.contribs.org/index.php/topic,51872.0 here].&lt;br /&gt;
&lt;br /&gt;
{{Tip box|You can see if you are running out of the number of available connections in your log file /var/log/imaps/current and look for messages like the log extract below where the ConcurrencyLimitPerIP was set to 20. A 21st connection was attempted and was denied.&lt;br /&gt;
&lt;br /&gt;
 tcpsvd: info: pid 30693 from 10.1.0.104&lt;br /&gt;
 tcpsvd: info: concurrency 30693 10.1.0.104 21/20&lt;br /&gt;
 tcpsvd: info: deny 30693 0:10.1.0.21 ::10.1.0.104:49332 ./peers/10.1.0&lt;br /&gt;
}}&lt;br /&gt;
{{Tip box|Mobile devices have a tendency to frequently disconnect and connect from the network. When this disconnect happens, the sessions on the server are not always immediately cleaned up (they get cleaned up after a time out of some minutes). When the email client reconnects, they create new network connections and you get into the situation that these new connections get denied because of the concurrency limit. On the mobile device this may be noted as a &amp;quot;Unable to connect to server&amp;quot; message.}}&lt;br /&gt;
{{Tip box|Some email clients use a separate connection per imap folder, so the concurrency limits may occur for users that have many imap folders.}}&lt;br /&gt;
&lt;br /&gt;
===Mail server is not an IMAP4 mail server===&lt;br /&gt;
This is a bug in Thunderbird, the previous tips may help.&lt;br /&gt;
&lt;br /&gt;
===The Bat===&lt;br /&gt;
The gives this error message, but they are wrong.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;This server uses TLS v3.0 which is considered to be obsolete and insecure. &lt;br /&gt;
The server must use TLS v3.1 or above.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Outlook/Outlook Express give error 10060/0x800CCC90===&lt;br /&gt;
Most likely OUTLOOK (EXPRESS) isn&#039;t configured correctly.&lt;br /&gt;
 &lt;br /&gt;
 -open OUTLOOK&lt;br /&gt;
 -click TOOLS &amp;gt; ACCOUNTS&lt;br /&gt;
 -click CHANGE (on the right-hand side)&lt;br /&gt;
 -find INCOMING MAIL SERVER &amp;amp; OUTGOING MAIL SERVER (on right-hand side)&lt;br /&gt;
 -type: mail.yourdomain.tld (in both places)&lt;br /&gt;
 -click MORE SETTINGS (on bottom-right)&lt;br /&gt;
 -click OUTGOING SERVER tab (at the top)&lt;br /&gt;
 -checkmark &amp;quot;MY OUTGOING SERVER REQUIRES AUTHENTICATION&amp;quot;&lt;br /&gt;
 -bullet &amp;quot;USE SAME SETTINGS AS INCOMING MAIL SERVER&amp;quot;&lt;br /&gt;
 -click ADVANCED tab (at the top)&lt;br /&gt;
 -find OUTGOING SERVER&lt;br /&gt;
 -checkmark &amp;quot;THIS SERVER REQUIRES A SECURE CONNECTION&amp;quot; (under outgoing server)&lt;br /&gt;
 -change 25 to 465&lt;br /&gt;
 -[possibly required, secure IMAP is 993]&lt;br /&gt;
 -click OK &amp;gt; NEXT &amp;gt; FINISHED&lt;br /&gt;
 -you&#039;re finished, your email should work now&lt;br /&gt;
&lt;br /&gt;
===Outlook 2013 on Windows 10 gives &amp;quot;An unknown error occurred, error code 0x8004011c&amp;quot; when attempting an IMAP connection for a DOMAIN user===&lt;br /&gt;
This is a known issue with the above combination of Windows and Outlook version as of 2015-02-18 (see: [http://bugs.contribs.org/show_bug.cgi?id=9618 Bug 9618]).&lt;br /&gt;
&lt;br /&gt;
The following registry key resolves the issue:&lt;br /&gt;
To work around this problem, set the value of the ProtectionPolicy registry entry to 1 to enable local backup of the MasterKey instead of requiring a RWDC in the following registry subkey:&lt;br /&gt;
&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb] &lt;br /&gt;
 &amp;quot;ProtectionPolicy&amp;quot;=dword:00000001&lt;br /&gt;
&lt;br /&gt;
The PortectionPolicy entry may need to be created&lt;br /&gt;
&lt;br /&gt;
===Outlook 2013 on Windows 8.1 gives error 0x800CCC1A when sending over SMTP port 465===&lt;br /&gt;
This is a known issue with the above combination of Windows and Outlook version as of 2015-02-18 (see: [http://bugs.contribs.org/show_bug.cgi?id=8854 Bug 8854]).&lt;br /&gt;
&lt;br /&gt;
The following client-side workaround has been suggested on the [http://www.dovecot.org/list/dovecot/2014-May/096029.html dovecot mailinglist]:&lt;br /&gt;
&lt;br /&gt;
Disable TLS1.2 on the Windows 8.1 client, using a registry entry:&lt;br /&gt;
&lt;br /&gt;
  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.2\Client]&lt;br /&gt;
  &amp;quot;DisabledByDefault&amp;quot;=dword:00000001&lt;br /&gt;
  &amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&lt;br /&gt;
If the registry entry above does not exist on your system, you will have to create it manually.&lt;br /&gt;
&lt;br /&gt;
Whether this is OpenSSL or Microsoft&#039;s &amp;quot;fault&amp;quot; is currently not answered.&lt;br /&gt;
&lt;br /&gt;
===Outlook test message doesn&#039;t come through===&lt;br /&gt;
You clicked the TEST ACCOUNT SETTINGS in OUTLOOK didn&#039;t you? This is a bug in OUTLOOK. The test message sends a test email with &#039;no Date header&#039;. As the name suggests, this means a message without any date. Since the server doesn&#039;t accept mail with &#039;no Date header&#039; (because it&#039;s required) the message is rejected. To test, send an actual message from OUTLOOK.&lt;br /&gt;
&lt;br /&gt;
If you want, you can try THUNDERBIRD. It&#039;s like OUTLOOK but made by a different company. It&#039;s completely free and works very well at home and at the office.&lt;br /&gt;
&lt;br /&gt;
===I can&#039;t receive/send email from my application (ACT!, vTiger, MS Outlook, etc)===&lt;br /&gt;
Most likely, this is a bug the application you&#039;re using and not a problem with the SMESERVER. The application sends an email with &#039;no Date header&#039;. As the name suggests, this means a message without any date. Since the server doesn&#039;t accept mail with &#039;no Date header&#039; (because it&#039;s required) the message is rejected. &lt;br /&gt;
&lt;br /&gt;
As a workaround you can disable the check for the &#039;Date header&#039;.&lt;br /&gt;
To disable this check on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; \&lt;br /&gt;
 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To disable this check for the external interface: &lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; \&lt;br /&gt;
 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===After I upgrade my SME Server, my email folders have disappeared when using IMAP===&lt;br /&gt;
After upgrade, if there are missing IMAP folders, the client may need to re-subscribe to folders.  This may affect either webmail users or users who use an IMAP email client.&lt;br /&gt;
&lt;br /&gt;
===Entourage: Using SME&#039;s Self-Signed Certificate for SSL Connections from Entourage on OS X 10.4===&lt;br /&gt;
The main problem here is that Entourage will only support trusted, PEM Base-64 Encoded certificates.  To use IMAPS or SMTPS from Entourage with your SME server, you will need to:&lt;br /&gt;
 1. Login to your Mac as a user with administrative privileges&lt;br /&gt;
 &lt;br /&gt;
 2. Open Safari and browse to https://&#039;&#039;smeserver&#039;&#039;/server-manager.  &lt;br /&gt;
    When you receive the warning about your certificate:&lt;br /&gt;
    - click on &amp;quot;Show Certificate&amp;quot;&lt;br /&gt;
    - click and drag the gold-rimmed image of a certificate to your desktop.  &lt;br /&gt;
    You will now have &#039;&#039;myserver.mydomain.tld.cer&#039;&#039; on your desktop.&lt;br /&gt;
 &lt;br /&gt;
 3. Locate and open the &#039;&#039;&#039;Microsoft Cert Manager&#039;&#039;&#039;&lt;br /&gt;
    - &amp;quot;Import&amp;quot; the certificate you downloaded in step 2.&lt;br /&gt;
 &lt;br /&gt;
 4. Highlight the imported certificate and &amp;quot;Export&amp;quot; it. &lt;br /&gt;
    - Select the &amp;quot;PEM...&amp;quot; format&lt;br /&gt;
    - add &amp;quot;&#039;&#039;pem.&#039;&#039;&amp;quot; to the beginning of the filename&lt;br /&gt;
    - export it to your Desktop&lt;br /&gt;
 &lt;br /&gt;
 5. Double-click on the new &#039;&#039;pem.myserver.mydomain.tld.cer&#039;&#039;  &lt;br /&gt;
    - Apple&#039;s &#039;&#039;&#039;Keychain Access&#039;&#039;&#039; application will open.&lt;br /&gt;
    - Select the &#039;&#039;&#039;X509Anchors&#039;&#039;&#039; Keychain and click &amp;quot;OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 6. While still in Apple&#039;s &#039;&#039;&#039;Keychain Access&#039;&#039;&#039;, select the &amp;quot;Certificates&amp;quot; category&lt;br /&gt;
    - Drag &#039;&#039;pem.myserver.mydomain.tld.cer&#039;&#039; into the certificates window.&lt;br /&gt;
&lt;br /&gt;
You should now be able to connect to your SME from your Entourage using IMAPS.  &lt;br /&gt;
&lt;br /&gt;
If you are accessing your SME server using a different name than the one encoded in the certificate you will still receive a security warning from Entourage, but &amp;quot;OK&amp;quot; will now grant access to your folders.&lt;br /&gt;
&lt;br /&gt;
Notes: &lt;br /&gt;
&lt;br /&gt;
*Procedure mostly taken from http://www.kerio.com/manual/kmsug/en/ch09s06.html&lt;br /&gt;
*I still get various other IMAP errors due, I suspect, to the &amp;quot;concurrency limit reached&amp;quot; issue.&lt;br /&gt;
*Click on &amp;quot;Show Keychains&amp;quot; in Apple&#039;s &amp;quot;Keychain Access&amp;quot; if you need to delete a certificate and try again.&lt;br /&gt;
&lt;br /&gt;
===How do I get my e-mail to show the correct From Address===&lt;br /&gt;
&lt;br /&gt;
The From address on an e-mail is not supplied by the server. It is supplied by the e-mail client.&lt;br /&gt;
&lt;br /&gt;
*Configure your Account in your e-mail client with the correct FROM address.&lt;br /&gt;
*You can change the FROM address in webmail with the following:&lt;br /&gt;
**Login to webmail as the user, go to &#039;&#039;options-personal information&#039;&#039; and change the &#039;&#039;identity&#039;&#039; to have the correct FROM address. You can have multiple identities with a single user.&lt;br /&gt;
&lt;br /&gt;
Some system generated email is created by the server, some contribs may send mail externally, in these cases you need a valid domain name for the server, buy one or use a free provider like dyndns.org&lt;br /&gt;
&lt;br /&gt;
===Outlook 365 / Outlook 2019 IMAP Configuration===&lt;br /&gt;
&lt;br /&gt;
Microsoft has disabled the ability to enter the IMAP/SMTP username in the account setup wizard in Outlook 365 / 2019 for Windows.  The wizard used within Outlook requires that the IMAP/SMTP username be the full email address.&lt;br /&gt;
&lt;br /&gt;
To work around this issue, setup the account using &amp;quot;Mail (Microsoft Outlook 2016)&amp;quot; in the Windows control panel:&lt;br /&gt;
[[File:Screen Shot 2019-12-04 at 6.44.18 AM.png|450px]]&lt;br /&gt;
&lt;br /&gt;
==Server Settings==&lt;br /&gt;
===qmail ConcurrencyLocal===&lt;br /&gt;
The default value for /var/qmail/control/concurrencylocal is 20. This setting controls the maximum amount of simultaneous local deliveries.&lt;br /&gt;
&lt;br /&gt;
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyLocal for qmail in the config database. The ConcurrencyLocal property changes the value stored in /var/qmail/control/concurrencylocal.&lt;br /&gt;
&lt;br /&gt;
It can be set, for example to decrease the local concurrency limit&lt;br /&gt;
 config setprop qmail ConcurrencyLocal 6&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===qmail ConcurrencyRemote===&lt;br /&gt;
The default value for /var/qmail/control/concurrencyremote is 20. This setting controls the maximum amount of simultaneous remote deliveries.&lt;br /&gt;
&lt;br /&gt;
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyRemote for qmail in the config database. The ConcurrencyRemote property changes the value stored in /var/qmail/control/concurrencyremote. &lt;br /&gt;
&lt;br /&gt;
It can be set, for example to decrease the remote concurrency limit&lt;br /&gt;
 config setprop qmail ConcurrencyRemote 10&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Refer also this comment by CB&lt;br /&gt;
&lt;br /&gt;
http://forums.contribs.org/index.php/topic,50091.msg251320.html#msg251320&lt;br /&gt;
&lt;br /&gt;
===How long retry before return e-mail as undeliverable===&lt;br /&gt;
To configure how long SME server will try to delivery a message before return a permanent error&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
The default value is 604800 seconds, or one week.&amp;lt;br&amp;gt;&lt;br /&gt;
The example above shows 172800 seconds, or two days (a weekend for infra upgrade!)&lt;br /&gt;
&lt;br /&gt;
source: http://forums.contribs.org/index.php/topic,47471.0.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Double bounce messages===&lt;br /&gt;
To stop admin receiving double bounce messages&lt;br /&gt;
&lt;br /&gt;
 config setprop qmail DoubleBounceTo someoneuser&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Or just delete them. You risk losing legitimate double bounces (which are&lt;br /&gt;
rare, but you want to look at them when they do occur)&lt;br /&gt;
&lt;br /&gt;
 config setprop qmail DoubleBounceTo devnull&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
see a longer explaination [[Email_delete_double-bounce_messages | here]]&lt;br /&gt;
&lt;br /&gt;
===Keep a copy of all emails===&lt;br /&gt;
You may need to keep a copy of all emails sent to or from your email server.&lt;br /&gt;
This may be for legal, or other reasons.&lt;br /&gt;
&lt;br /&gt;
The following instructions will create a new user account (default is maillog) and forward every email that goes through your SME server to it.&lt;br /&gt;
&lt;br /&gt;
First, log onto the server-manager and create the user &#039;&#039;&#039;maillog&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Go to the SME Command Line (logon as root) and issue the following commands:&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd Bcc enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Optionally make the forwarding of the emails invisible to the end user. Without it, there will be an X-Copied-To: header in each email. Run this command before the signal-event&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd BccMode bcc&lt;br /&gt;
&lt;br /&gt;
If you want to view the emails, point your email client at the SME and log on as maillog.&lt;br /&gt;
&lt;br /&gt;
You can modify the default user:&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd BccUser someuser&lt;br /&gt;
&lt;br /&gt;
====Keep a copy of outgoing emails only====&lt;br /&gt;
In addition to the commands in the [[#Keep_a_copy_of_all_emails | previous section]] we will also have to create a custom template as follows:&lt;br /&gt;
&lt;br /&gt;
Log in as root or a user with root privileges&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cp /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/13bcc /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 nano -w 13bcc&lt;br /&gt;
&lt;br /&gt;
change the code to:&lt;br /&gt;
 {&lt;br /&gt;
      return &amp;quot;# bcc disabled&amp;quot; unless ($qpsmtpd{Bcc} eq &amp;quot;enabled&amp;quot;);&lt;br /&gt;
      return &amp;quot;bcc mode &amp;quot; . $qpsmtpd{BccMode} . &amp;quot; outgoing &amp;quot; . $qpsmtpd{BccUser};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Save by pressing Ctrl x at the same time and confirm with y&lt;br /&gt;
&lt;br /&gt;
Then enable the changes with&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
More info:&lt;br /&gt;
 perldoc /usr/share/qpsmtpd/plugins/bcc&lt;br /&gt;
&lt;br /&gt;
===Set Helo hostname===&lt;br /&gt;
Default is set to the hostname.domain, but sometime you might want to have something else to answer with the same as your reverseDNS. You can do one of the followings to only adjust the helo name:&lt;br /&gt;
 &lt;br /&gt;
 config setprop smtpd HeloHost mydomainname&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
or the following to adjust the way your server will present itself everywhere (httpd, qpsmtd...) This might trigger the generation of new ssl certificate, so use it only if you are sure this is what you want to do.&lt;br /&gt;
&lt;br /&gt;
 config set DomainName mydomainname&lt;br /&gt;
 signal-event domain-modify&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Set max email size===&lt;br /&gt;
&lt;br /&gt;
*IMPORTANT: [[bugzilla: 7876]] points out that if your system has &#039;&#039;/var/service/qpsmtpd/config/databytes&#039;&#039; it should be deleted. (Fixed as of smeserver-qpsmtpd-2.4.0-7.el6.sme.noarch - see [[bugzilla: 8329]]).&lt;br /&gt;
&lt;br /&gt;
There are several components involved in sending email on a SME server.  Each component has a size limit that may affect an email message that passes through the server.&lt;br /&gt;
&lt;br /&gt;
Be aware that &#039;&#039;email size&#039;&#039; is not the same thing as &#039;&#039;attachment size&#039;&#039;.  Binary attachments to email are encoded using techniques that result in email sizes that can be as much as 30% larger than the original attachment. Most major email clients (Thunderbird, Apple Mail, Outlook) allow you to enable a &amp;quot;message size&amp;quot; column in the message list that will show you the size of your email messages ([http://forums.contribs.org/index.php/topic,48366.msg241720.html#msg241720 More]).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Subsystem&lt;br /&gt;
!Function&lt;br /&gt;
!Default Limit&lt;br /&gt;
!Command to change size&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|qmail&lt;br /&gt;
|Delivers email to local mailboxes and to remote servers&lt;br /&gt;
|15000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;qmail&amp;amp;nbsp;MaxMessageSize&amp;amp;nbsp;xx000000&lt;br /&gt;
|Value is in BYTES. 15000000 equals approximately 15MB.&amp;lt;br&amp;gt;No value means no limit.&lt;br /&gt;
|-&lt;br /&gt;
|clamav&lt;br /&gt;
|Used to scan emails and attachments&lt;br /&gt;
|15M&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;clamav&amp;amp;nbsp;MaxFileSize&amp;amp;nbsp;15M&lt;br /&gt;
|Value includes human-readable abbreviations.  &amp;quot;15M&amp;quot; equals 15 MegaBytes.&lt;br /&gt;
|-&lt;br /&gt;
|clamd&lt;br /&gt;
|Involved in attachment virus scanning&lt;br /&gt;
|1400000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;clamd&amp;amp;nbsp;MemLimit&amp;amp;nbsp;1400000000&lt;br /&gt;
|May require increase per [https://forums.contribs.org/index.php?topic=54070.0;topicseen this forum topic]&lt;br /&gt;
|-&lt;br /&gt;
|qpsmtpd&lt;br /&gt;
|The clamav plugin to qpsmtpd is called with a specified size limit.&lt;br /&gt;
|25000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;qpsmtpd&amp;amp;nbsp;MaxScannerSize&amp;amp;nbsp;xx000000&lt;br /&gt;
|Value is in BYTES.&amp;lt;br&amp;gt;Question: does this value override the setting of &#039;MaxFileSize&#039;, or will the smaller value prevail?&lt;br /&gt;
|-&lt;br /&gt;
|php&lt;br /&gt;
|The php maximum file upload size will determine the largest file you can attach to an email message using horde (or any other php email client)&lt;br /&gt;
|10M&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;php&amp;amp;nbsp;UploadMaxFilesize&amp;amp;nbsp;10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
====clamav====&lt;br /&gt;
A note about clamav:&amp;lt;br&amp;gt;&lt;br /&gt;
ClamAV includes settings to prevent the scanning of archives that could cause problems if fully expanded; if an attachment cannot be scanned, it will be rejected.&lt;br /&gt;
&lt;br /&gt;
In order for changes to take effect, run:&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
These attributes could result in the rejection of a  compressed attachment on a SME server:&lt;br /&gt;
&lt;br /&gt;
*ArchiveMaxCompressionRatio (default 300)&lt;br /&gt;
*MaxFiles (default 1500)&lt;br /&gt;
*MaxRecursion (default 8)&lt;br /&gt;
&lt;br /&gt;
====spamassassin====&lt;br /&gt;
By default the qpsmtpd &#039;spamassassin&#039; plugin does not pass any messages over 500,000 bytes to spamassassin for scanning. &lt;br /&gt;
&lt;br /&gt;
To change this behavior:&lt;br /&gt;
  db configuration setprop spamassassin MaxMessageSize 2000000 &lt;br /&gt;
increases message size to 2,000,000 bytes.  Apply the change with &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Change Horde Webmail Login Page &#039;Welcome To&#039; Title===&lt;br /&gt;
The login page for Webmail defaults to &amp;quot;Welcome to Horde Webmail&amp;quot;. In order to change this to something like &amp;quot;Welcome to MyDomain Mail&amp;quot;&lt;br /&gt;
 config setprop horde Name &amp;quot;MyDomain Mail&amp;quot;&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;br /&gt;
Other configurable Horde settings [[DB_Variables Configuration#Horde_(webmail)]]&lt;br /&gt;
&lt;br /&gt;
Forum post [http://forums.contribs.org/index.php/topic,31093.0.html 31093]&lt;br /&gt;
&lt;br /&gt;
===Add the admin user as an administrator for Horde===&lt;br /&gt;
&lt;br /&gt;
 config setprop horde Administration enabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Large attachments not displaying in webmail===&lt;br /&gt;
Due to limits set in the PHP configuration it might be that webmail will not display large attachments (see also [[bugzilla:3990]]). The following entries are related to the error and can be found in the log files:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/var/log/messages&#039;&#039;&#039;&lt;br /&gt;
 Mar 13 00:00:12 box1 httpd: PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 154 bytes) in /home/httpd/html/horde/imp/lib/MIME/Contents.php on line 173&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/var/log/httpd/error_log&#039;&#039;&#039;&lt;br /&gt;
 Allowed memory size of 33554432 bytes exhausted (tried to allocate 0 bytes)&lt;br /&gt;
&lt;br /&gt;
The default MemoryLimit setting in PHP is set to 32M the value can be changed using the commands below replacing &#039;&#039;XX&#039;&#039; with the value you desire.&lt;br /&gt;
{{Note box|You can set the MemoryLimit any value you like but be sure to add the capital M as a suffix for Megabytes.}}&lt;br /&gt;
 db configuration setprop php MemoryLimit XXM&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 sv t httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
===Disable mail to a user from an external network===&lt;br /&gt;
However, this seems to only affect /var/qmail/control/badrcptto - denying external delivery to your users but allowing outbound emails:&lt;br /&gt;
http://forums.contribs.org/index.php?topic=40449.5&lt;br /&gt;
&lt;br /&gt;
Can be either a user, pseudonym or group&lt;br /&gt;
 db accounts setprop groupname/username/pseudonym Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to remove &lt;br /&gt;
 db accounts delprop groupname/username/pseudonym Visible&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
*If you need to restrict emails for all users you can perform this command line&lt;br /&gt;
&lt;br /&gt;
 db accounts show | awk -F &amp;quot;=&amp;quot;  &#039;/\=user/ {print $1}&#039; |while read USER; do db accounts setprop $USER Visible internal; done&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to remove &lt;br /&gt;
 db accounts show | awk -F &amp;quot;=&amp;quot;  &#039;/\=user/ {print $1}&#039; |while read USER; do db accounts delprop $USER Visible; done&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{{Note box|Please note that admin and other system accounts can not be hidden from external network this way.&lt;br /&gt;
&lt;br /&gt;
Also note that Pseudonyms can be set to internal only using the server-manager.}}&lt;br /&gt;
&lt;br /&gt;
===I can&#039;t receive mail at: user@mail.domain.tld===&lt;br /&gt;
Add mail.domain.tld as a virtualdomain.&lt;br /&gt;
 -login to SERVER-MANAGER&lt;br /&gt;
 -click DOMAINS (on the left)&lt;br /&gt;
 -click ADD&lt;br /&gt;
 -type: mail.domain.tld&lt;br /&gt;
&lt;br /&gt;
===How do I find out who is logged into webmail and what IP number.===&lt;br /&gt;
This is logged is in /var/log/messages.&lt;br /&gt;
&lt;br /&gt;
===Allow SMTP relay of mail without encryption/authentication===&lt;br /&gt;
&lt;br /&gt;
Change the configuration of the system from the default, so that it no longer requires encryption/authentication before allowing relaying of mail.&lt;br /&gt;
&lt;br /&gt;
* For most case, you really want to allow few specific clients on your LAN or trusted networks, this is done by setting a coma separated list of ip this way (replace IP1, IP2, IP3 by valid ips). &lt;br /&gt;
 config set qpsmtpd UnauthenticatedRelayClients IP1,IP2,IP3&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* In some case you would have a whole dedicated network with appliances needing to send email without auth, this is done this way&lt;br /&gt;
 db networks setprop {$network} RelayRequiresAuth disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* In case you needs are not fulfilled because you need to accommodate a list of remote IP or a sub network of a larger trusted network, you can create a custom template. Here for reference the accepted formats:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients&lt;br /&gt;
 # a subnetwork by only using a prefix of full ip&lt;br /&gt;
 echo &amp;quot;10.10.0.&amp;quot;&amp;gt;&amp;gt;  /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 # an external ip&lt;br /&gt;
 echo &amp;quot;99.10.1.23&amp;quot; &amp;gt;&amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 # an external network you control&lt;br /&gt;
 echo &amp;quot;164.163.12.1/30&amp;quot; &amp;gt;&amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* Disable smtp authentication on all local interfaces as shown in [[Bugzilla: 6522]]&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd RelayRequiresAuth disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===SMTP Authentication TLS before Auth disable &amp;amp; enable===&lt;br /&gt;
Since SME v7.5 the default for SMTP Authentication is &#039;requires TLS before Auth&#039; to increase security.&lt;br /&gt;
Where a SME7.4 or earlier server with SMTP &amp;amp; SSMTP authentication enabled has been upgraded, users are now unable to send mail.&lt;br /&gt;
Users will need to enable TLS or Auto for the Authentication encryption setting in their email clients. Some older email clients and devices do not support TLS.&lt;br /&gt;
&lt;br /&gt;
A fix was released in SME7.5.1 to allow this setting to be disabled (ie revert to SME7.4 functionality). Upgrade to SME7.5.1 before using these commands.&lt;br /&gt;
&lt;br /&gt;
To disable this (AUTH without TLS) &amp;amp; revert to SME7.4 defaults do&lt;br /&gt;
 config setprop qpsmtpd TlsBeforeAuth 0&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To change back to the sme7.5 &amp;amp; greater default (AUTH with TLS) do &lt;br /&gt;
 config setprop qpsmtpd TlsBeforeAuth 1&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
See http://forums.contribs.org/index.php/topic,46218.0.html&lt;br /&gt;
&lt;br /&gt;
http://bugs.contribs.org/show_bug.cgi?id=5997&lt;br /&gt;
&lt;br /&gt;
===Internet provider&#039;s outgoing port 25 is blocked: How to set an alternative outgoing port for the SMTP server===&lt;br /&gt;
If your Internet provider is blocking outgoing smtp port 25 on your internet connection but your provider is offering an alternative outgoing port (or when using some relay service) you can simply set this alternative port by adding it to the &#039;Address of Internet provider&#039;s mail server&#039; value in the &#039;E-mail delivery settings&#039; screen of the server-manager like this:&lt;br /&gt;
 &amp;lt;internet providers mail server name or ip-address&amp;gt;:&amp;lt;alternative port&amp;gt;&lt;br /&gt;
For example:  mail.mydomain.com:587&lt;br /&gt;
&lt;br /&gt;
This setting does not alter the incoming smtp mail server port on SME server, which will still use port 25. Refer to a workaround in http://wiki.contribs.org/PortRedirect&lt;br /&gt;
&lt;br /&gt;
===How do I enable and configure a disclaimer in email messages===&lt;br /&gt;
A disclaimer message can be added to the footer of all outgoing email messages.&lt;br /&gt;
&lt;br /&gt;
The message can be the same for all domains or it can be different for all domains.&lt;br /&gt;
&lt;br /&gt;
This functionality is part of sme7.2 release so make sure you have upgraded before doing this.&lt;br /&gt;
&lt;br /&gt;
To create a general disclaimer for all domains on your sme server&lt;br /&gt;
 config setprop smtpd disclaimer enabled&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer&lt;br /&gt;
Enter the required disclaimer text &lt;br /&gt;
&lt;br /&gt;
To save &amp;amp; exit&lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
To make the changes take effect&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create domain specific disclaimers, create seperate domain based disclaimer text files&lt;br /&gt;
&lt;br /&gt;
Delete the general (all domains) disclaimer file if you have already created it&lt;br /&gt;
 rm  /service/qpsmtpd/config/disclaimer&lt;br /&gt;
 config setprop smtpd disclaimer enabled&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain1.com.au&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain2.com&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain3.org&lt;br /&gt;
&lt;br /&gt;
Enter the required text in each disclaimer file&lt;br /&gt;
&lt;br /&gt;
To save &amp;amp; exit&lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
After making any changes remember to do&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note if you only wish to have a disclaimer for some domains, then only create a disclaimer text file for those domains &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note also the criteria for when a disclaimer is attached &lt;br /&gt;
&lt;br /&gt;
(see http://bugs.contribs.org/show_bug.cgi?id=2648)&lt;br /&gt;
&lt;br /&gt;
eg a disclaimer is added to internal to external messages but not internal to internal messages.&lt;br /&gt;
&lt;br /&gt;
To disable the disclaimer function for all domains on your sme server&lt;br /&gt;
 config setprop smtpd disclaimer disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Email WBL server manager panel===&lt;br /&gt;
&lt;br /&gt;
There is a server-manager contrib to allow GUI control of email white and black lists, detailed in the wiki article: [[:Email_Whitelist-Blacklist_Control]].&lt;br /&gt;
&lt;br /&gt;
The panel allows easy configuration of functionality that is built into qmail, qpsmtpd and spamassassin. For more information google for qmail &amp;amp; qpsmtpd, read the spamassassin section in this wiki article and see [[:Email#Default_Plugin_Configuration default qpsmtpd plugin confguration]]).&lt;br /&gt;
&lt;br /&gt;
There are two main sections, Blacklist and Whitelist, where you can control settings.&lt;br /&gt;
&lt;br /&gt;
Note that there are subtle differences in syntax between whitelist and blacklist entries&lt;br /&gt;
&lt;br /&gt;
Blacklist - Black lists are used for rejecting e-mail traffic&lt;br /&gt;
&lt;br /&gt;
  DNSBL status      - DNSBL is an abbreviation for &amp;quot;DNS blacklist&amp;quot;. &lt;br /&gt;
                      It is a list of IP addresses known to be spammers.&lt;br /&gt;
  RHSBL status      - RHSBL is an abbreviation for &amp;quot;Right Hand Side Blacklist&amp;quot;. &lt;br /&gt;
                      It is a list of domain names known to be spammers.&lt;br /&gt;
  qpsmtpd badhelo   - Check a HELO message delivered from a connecting host. &lt;br /&gt;
                      Reject any that appear in badhelo during the &#039;helo&#039; stage.&lt;br /&gt;
  qmail badmailfrom - Check envelope sender addresses. &lt;br /&gt;
                      Reject any that appear (@host or user@host) in badmailfrom during the &#039;mail&#039;           &lt;br /&gt;
                      stage.&lt;br /&gt;
  spamassassin blacklist_from - Any envelope sender of a mail (*@host or user@host) matching an &lt;br /&gt;
                                entry in blacklist_from will be rejected by spamassassin.&lt;br /&gt;
&lt;br /&gt;
Whitelists - White lists are used for accepting e-mail traffic&lt;br /&gt;
&lt;br /&gt;
  Whitelists status           - White Lists: ACCEPT&lt;br /&gt;
  qpsmtpd whitelisthosts      - Any IP address listed in whitelisthosts will be exempted &lt;br /&gt;
                                from any further validation during the &#039;connect&#039; stage.&lt;br /&gt;
  qpsmtpd whitelisthelo       - Any host that issues a HELO matching an entry in whitelisthelo &lt;br /&gt;
                                will be exempted from further validation during the &#039;helo&#039; stage.&lt;br /&gt;
  qpsmtpd whitelistsenders    - Any envelope sender of a mail (host or user@host) matching an &lt;br /&gt;
                                entry in whitelistsenders will be exempted from further validation&lt;br /&gt;
                                during the &#039;mail&#039; stage.&lt;br /&gt;
  spamassassin whitelist_from - Any envelope sender of a mail (*@host or user@host) matching an &lt;br /&gt;
                                entry in whitelist_from will be exempted from spamassassin rejection.&lt;br /&gt;
&lt;br /&gt;
===How to block email from one address to another address with check_badmailfromto plugin===&lt;br /&gt;
&lt;br /&gt;
Enable the check_badmailfromto plugin. Adapted from [http://forums.contribs.org/index.php/topic,35667.0.html this Forum post]&lt;br /&gt;
&lt;br /&gt;
This is based heavily on the similar check_badmailfrom, but this plugin references both the&lt;br /&gt;
FROM: and TO: lines, and if they both are present in the badmailfromto&lt;br /&gt;
config file (a tab delimited list of FROM/TO pairs), then the message is&lt;br /&gt;
blocked as if the recipient (TO) didn&#039;t exist.  This is specifically designed&lt;br /&gt;
to not give the impression that the sender is blocked (good for cases of&lt;br /&gt;
harassment). &lt;br /&gt;
&lt;br /&gt;
====Prior SME9.2 : qpsmtpd check_badmailfromto plugin====&lt;br /&gt;
To control mail from external locations to internal locations do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins&lt;br /&gt;
 echo &amp;quot;check_badmailfromto&amp;quot; &amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To control mail sent from internal locations to internal locations, in addition to the above also do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Since SME9.2 : qpsmtpd badmailfromto plugin====&lt;br /&gt;
remove previous templates, if you are updating&lt;br /&gt;
 rm /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto \&lt;br /&gt;
 /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto \&lt;br /&gt;
 /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto&lt;br /&gt;
&lt;br /&gt;
To control mail from external locations to internal locations do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins&lt;br /&gt;
 echo &amp;quot;badmailfromto&amp;quot; &amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To control mail sent from internal locations to internal locations, in addition to the above also do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====For Qmail====&lt;br /&gt;
 &lt;br /&gt;
Create and configure the badmailfromto custom template fragment&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control/badmailfromto&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/var/qmail/control/badmailfromto/template-begin&lt;br /&gt;
&lt;br /&gt;
Type in the From and To pairs that you want to stop email delivery for, with a tab between them and a carriage return at the end of the line, with additional pairs on a new line ie&lt;br /&gt;
 user@bad-domain.com tab user@yourdomain.com enter&lt;br /&gt;
 user@bad-domain2 tab user2@yourdomain enter&lt;br /&gt;
&lt;br /&gt;
Note also that wildcards or blank spaces are not supported&lt;br /&gt;
&lt;br /&gt;
eg&lt;br /&gt;
 john@aol.com      mary@yourdomain&lt;br /&gt;
 bill@yahoo.com      paul@yourdomain.com&lt;br /&gt;
&lt;br /&gt;
then save using &lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
&lt;br /&gt;
Expand the template to update the /var/qmail/control/badmailfromto config file&lt;br /&gt;
 expand-template /var/qmail/control/badmailfromto&lt;br /&gt;
&lt;br /&gt;
Restart mail services&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Redirect mail.domain.net to Webmail===&lt;br /&gt;
Setup external dns records&lt;br /&gt;
&lt;br /&gt;
Add mail.domain.net in Domains panel in server-manager&lt;br /&gt;
 db domains setprop mail.dom.ain TemplatePath ProxyPassVirtualHosts ProxyPassTarget http://sme.dom.ain/webmail&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
where http://sme.dom.ain/webmail is servername.domainname/webmail&lt;br /&gt;
&lt;br /&gt;
===E-mail Retrieval===&lt;br /&gt;
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Retrieval&lt;br /&gt;
&lt;br /&gt;
If your ISP does not provide a custom sort field and you experience the following errors occuring when Multidrop is enabled and the &amp;quot;Select Sort Method (for multi-drop)&amp;quot; is set to Default: &lt;br /&gt;
&lt;br /&gt;
 fetchmail: warning: multidrop for pop3.mypopserver.com requires envelope option!&lt;br /&gt;
 fetchmail: warning: Do not ask for support if all mail goes to postmaster!&lt;br /&gt;
&lt;br /&gt;
and/or&lt;br /&gt;
&lt;br /&gt;
 fetchmail: warning: multidrop for my.isp.domain requires envelope option! &lt;br /&gt;
 fetchmail: warning: Do not ask for support if all mail goes to postmaster! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set &amp;quot;Select Sort Method (for multi-drop) to &#039;Received&#039; or &#039;for&#039;&lt;br /&gt;
As described at [[bugzilla:5602]] [[bugzilla:6483]]&lt;br /&gt;
&lt;br /&gt;
===Domain Authentication===&lt;br /&gt;
{{WIP box|trex1512}}&lt;br /&gt;
Major mail hosting companies (Google, Yahoo, Microsoft) have made domain-authentication mandatory so as to not mark incoming mail as spam.&lt;br /&gt;
&lt;br /&gt;
To facilitate this support for DomainKeys and DKIM signing needs to be enabled in SME&#039;s mail subsystem. These techniques require the adding of records in the DNS zone for the user&#039;s domain. The DKIM/DK/SPF/SenderID configuration has to be added to your your DNS server / registrar.&lt;br /&gt;
&lt;br /&gt;
===How do I remove an email address from the everyone group===&lt;br /&gt;
By default, all users are automatically added to the user group &amp;quot;everyone&amp;quot;. If you would like to remove a user from this group, connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop username EveryoneEmail no&lt;br /&gt;
 signal-event user-modify username&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I remove an email address from any regular group===&lt;br /&gt;
By default, all users member of a group &amp;quot;group1&amp;quot; are automatically added as recipients of mail sent to group1@domain. If you would like to remove a user from this group, connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop group1 EmailExcludeUsers tom,jack &lt;br /&gt;
 signal-event group-modify group1&lt;br /&gt;
&lt;br /&gt;
If you want to prevent all the user members from another group &amp;quot;group2&amp;quot; from receiving emails addressed to group1@domain while they are also member of group1, you could connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop group1  EmailExcludeGroups group2&lt;br /&gt;
 signal-event group-modify group1&lt;br /&gt;
&lt;br /&gt;
All members of the group will still be member for all other purpose (samba access to ibays as an example)&lt;br /&gt;
&lt;br /&gt;
This behaviour is only available as per e-smith-qmail-2.4.0-7.sme see bug #9540&lt;br /&gt;
&lt;br /&gt;
===Change the number of logs retained for qpsmtpd and/or sqpsmtpd===&lt;br /&gt;
The normal retention is 5 logs for both qpsmptd and sqpsmtpd. This may or may not fit all installations. This information is pulled from bugzilla.&lt;br /&gt;
&lt;br /&gt;
Check your config to see if any change has been made to the default log retention rules. Note there are different rules for qpsmtpd and sqpsmtpd. You have to make changes to both as you require.&lt;br /&gt;
 config show qpsmtpd&lt;br /&gt;
If the KeepLogFiles property isn&#039;t listed, the default rules apply. Determine how many logs you would like to keep and apply that to the following example. In the command below, 15 is used to keep 15 qpsmtpd logs.&lt;br /&gt;
 db configuration setprop qpsmtpd KeepLogFiles 15&lt;br /&gt;
Restart multilog with the following.&lt;br /&gt;
 sv t /service/qpsmtpd/log&lt;br /&gt;
Check that your setting saved.&lt;br /&gt;
 ps aux | grep qpsmtpd | grep multi&lt;br /&gt;
Look for the line that ends with /var/log/qpsmtpd and verify the number after n equals your KeepLogFiles property from above.&lt;br /&gt;
&lt;br /&gt;
==DKIM Setup - qpsmtpd version&amp;lt;0.96==&lt;br /&gt;
&lt;br /&gt;
A plugin has been written and is available in SME&lt;br /&gt;
&lt;br /&gt;
To activate it manually follow the steps below, or download a shell script that will do the server based stuff for you &amp;amp; guide you on the DNS stuff [ftp://ftp.gfitc.com.au:2121/e-smith/setup_dkim.sh setup_dkim.sh]:-&lt;br /&gt;
&lt;br /&gt;
Note:  I&#039;d recommend reviewing the script first to make sure you&#039;re happy to run it on your system&lt;br /&gt;
&lt;br /&gt;
Create a folder:&lt;br /&gt;
 mkdir /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
Then:&lt;br /&gt;
 cd /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
 openssl genrsa -out dkim.private 1024&lt;br /&gt;
 openssl rsa -in dkim.private -pubout -out dkim.public&lt;br /&gt;
 chown qpsmtpd:qpsmtpd -R /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
 chmod 0700 dkim.private&lt;br /&gt;
For each domain you want to sign:&lt;br /&gt;
 cp -a dkim.private &amp;lt;fully qualified domain name&amp;gt;.private (less the &amp;lt;&amp;gt; brackets)&lt;br /&gt;
Then create a template fragment:&lt;br /&gt;
 mkdir --parent /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;dkim_sign keys dkim&amp;quot;&amp;gt;/etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Finally propagate your public key &amp;quot;dkim.public&amp;quot; content (&amp;lt;key text&amp;gt;) to your DNS.&lt;br /&gt;
&lt;br /&gt;
Check with your DNS server / registrar. Something similar to the following should work but it varies depending on provider - replace &amp;lt;fully qualified domain name&amp;gt; with your doman details e.g &amp;quot;mydomain.org&amp;quot; (less the &amp;lt;&amp;gt; brackets):&lt;br /&gt;
&lt;br /&gt;
When extracting the key text from the dkim.public file it&#039;s on multiple lines.  For the key to work for us in the DNS TXT record we need to exclude the header &amp;amp; footer lines &amp;amp; have just the key text as a single line string (the setup_dkim.sh script provides this info in the format required).&lt;br /&gt;
&lt;br /&gt;
default._domainkey.&amp;lt;fully qualified domain name&amp;gt; IN TXT &amp;quot;k=rsa; p=&amp;lt;key text&amp;gt;; t=y&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Zonedit the following works within your Zone :&lt;br /&gt;
&lt;br /&gt;
Subdomain : default._domainkey&lt;br /&gt;
&lt;br /&gt;
Type : TXT&lt;br /&gt;
&lt;br /&gt;
Text : &amp;quot;v=DKIM1;k=rsa; p=&amp;lt;key text&amp;gt;; t=y&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to customize the signing you can add parameters to the line in /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign. Parameters and value are separated by a space only.&lt;br /&gt;
&lt;br /&gt;
#keys : &amp;quot;dk&amp;quot; or &amp;quot;domainkeys&amp;quot; for domainkey signature only, &amp;quot;dkim&amp;quot; for DKIM signature only, default &amp;quot;both&amp;quot; (n.b. above template example is dkim ONLY)&lt;br /&gt;
#dk_method : for domainkey method , default &amp;quot;nofws&amp;quot;&lt;br /&gt;
#selector : the selector you want, default &amp;quot;default&amp;quot;&lt;br /&gt;
#algorithm : algorithm for DKIM signing, default &amp;quot;rsa-sha1&amp;quot;&lt;br /&gt;
#dkim_method : for DKIM, default &amp;quot;relaxed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NB: key files can not be defined in parameters, they need to be in /var/service/qpsmtpd/config/dkimkeys/{SENDER_DOMAIN}.private&lt;br /&gt;
&lt;br /&gt;
{{Tip box|msg=You can verify that your settings are correct by sending an email to [mailto:check-auth@verifier.port25.com check-auth@verifier.port25.com], a free service the purpose of which is to verify if your domain does not contradict mail policies. Please check the answer carefully. See [[bugzilla:4558#c6]] }}&lt;br /&gt;
&lt;br /&gt;
See also : [[bugzilla:8251]] [[bugzilla:8252]]&lt;br /&gt;
&lt;br /&gt;
==DKIM Setup - qpsmtpd version &amp;gt;= 0.96==&lt;br /&gt;
&lt;br /&gt;
Version 0.96 and above supports DKIM natively without the need for extra plugins.&lt;br /&gt;
&lt;br /&gt;
All you have to do is to enable the DKIM signing and promulgate the DNS TXT entries to support it.&lt;br /&gt;
&lt;br /&gt;
Enable the signing:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
 qpsmtpd-print-dns &amp;lt;domain name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to show the DNS entry(s) required.&lt;br /&gt;
&lt;br /&gt;
Then you have to update your DNS.&lt;br /&gt;
&lt;br /&gt;
{{Tip box|msg=You can verify that your settings are correct by sending an email to [mailto:check-auth@verifier.port25.com check-auth@verifier.port25.com], a free service the purpose of which is to verify if your domain does not contradict mail policies. Please check the answer carefully. See [[bugzilla:4558#c6]] }}&lt;br /&gt;
&lt;br /&gt;
also see [[bugzilla:9694]] and https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation&lt;br /&gt;
&lt;br /&gt;
More details are available [https://wiki.contribs.org/Email#Inbound_DKIM_.2F_SPF_.2F_DMARC here]&lt;br /&gt;
&lt;br /&gt;
Incoming DKIM checking is also enabled out of the box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case you got a problem using the DKIM field provided with your DNS provider /registrar, please first contact them to ensure the problem is not how you try to enter the information. In the likelihood, you got &amp;quot;invalid field&amp;quot; or &amp;quot;too long field&amp;quot; errors and your provider is not able to help you or update its interface, you can generate a shorter DKIM key (with 1024 instead of the default 2048) this way: &lt;br /&gt;
&lt;br /&gt;
 cd /home/e-smith/dkim_keys/default&lt;br /&gt;
 mv private private.long&lt;br /&gt;
 mv public public.long&lt;br /&gt;
 openssl genrsa -out private 1024&lt;br /&gt;
 openssl rsa -in private -pubout -out public&lt;br /&gt;
 chown qpsmtpd:qpsmtpd private&lt;br /&gt;
 chown root:qpsmtpd public&lt;br /&gt;
 chmod 0400 private&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 qpsmtpd-print-dns&lt;br /&gt;
&lt;br /&gt;
===Outbound DKIM signing / SPF / DMARC policy FOR MULTIPLE DOMAINS===&lt;br /&gt;
The default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domains that you manage:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
If you want to disable dkim signing for a domain, you can use:&lt;br /&gt;
 db domains setprop domain.com DKIMSigning disabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:&lt;br /&gt;
 cd /home/e-smith/dkim_keys &lt;br /&gt;
 mkdir domain.net &lt;br /&gt;
 cd domain.net &lt;br /&gt;
 echo default &amp;gt; selector &lt;br /&gt;
 openssl genrsa -out private 2048 &lt;br /&gt;
 openssl rsa -in private -out public -pubout &lt;br /&gt;
 chown qpsmtpd:qpsmtpd private &lt;br /&gt;
 chmod 400 private &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.&lt;br /&gt;
&lt;br /&gt;
==Domain Keys==&lt;br /&gt;
&lt;br /&gt;
There is a plugin to check incoming mail has been signed&lt;br /&gt;
&lt;br /&gt;
Please read here for more details : http://bugs.contribs.org/show_bug.cgi?id=4569&lt;br /&gt;
&lt;br /&gt;
{{Warning box|msg=There is a plugin for signing with DomainKeys but it is not installed by default. It has not been tested on Koozali SME Server:&lt;br /&gt;
&lt;br /&gt;
http://wiki.qpsmtpd.org/doku.php?id=plugins:spam:domainkeys_sign}} &lt;br /&gt;
&lt;br /&gt;
==Other information==&lt;br /&gt;
&lt;br /&gt;
DomainKeys seem to be deprecated in favour of DKIM.&lt;br /&gt;
&lt;br /&gt;
The DomainKeys plugin only CHECKS incoming email. Spamassassin checks for DKIM.&lt;br /&gt;
&lt;br /&gt;
===Temporary_error_on_maildir_delivery===&lt;br /&gt;
&lt;br /&gt;
In certains cases you have some mailboxes which can&#039;t delivery messages and the qmail log say:&lt;br /&gt;
&lt;br /&gt;
 deferral: Temporary_error_on_maildir_delivery._(#4.3.0)/&lt;br /&gt;
&lt;br /&gt;
It is probably that your users  want to go beyond the upper limit of their quota, [[SME_Server:Documentation:Administration_Manual:Chapter9#Quotas|so you have to increase it]]. This could solve their problems.&lt;br /&gt;
&lt;br /&gt;
==External Access==&lt;br /&gt;
===Allow external IMAP mail access===&lt;br /&gt;
There was a deliberate decision to remove non-SSL protected username/password&lt;br /&gt;
services from the external interface.&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
&lt;br /&gt;
to allow &#039;&#039;&#039;unsecure IMAP access&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 config setprop imap access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
But before you do this try to use secure IMAP (IMAPS or imap over ssl) with port 993&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===POP3 &amp;amp; webmail HTTP===&lt;br /&gt;
I want to set my SMESERVER to allow POP3 (or webmail HTTP) but it&#039;s not an option, I only see POP3S (or webmail HTTPS).&lt;br /&gt;
&lt;br /&gt;
The SMESERVER is secure by design. POP3 (or webmail HTTP) is viewed as inadequate security and removed as an option from a standard installation to encourage unknowing administrators to select the &#039;best practice&#039; option -a secure connection with POP3S, IMAPS, or HTTPS.&lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
You can still set your SMESERVER to allow POP3 settings by:&lt;br /&gt;
 config setprop pop3 access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Allow external pop3 access===&lt;br /&gt;
&lt;br /&gt;
Email settings &amp;gt; POP3 server access in SME 7.1 server-manager allows only pop3s protocol for clients outside the LAN.  Some email clients (eg The Bat! v3.98.4) won&#039;t allow pop3s connections to SME 7.1 because of ssl version conflict.  Until this is sorted out, a workaround is to hack SME to allow regular pop3 on the external interface using the following commands. &lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
 config setprop pop3 access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 svc -t /service/pop3s  &lt;br /&gt;
&lt;br /&gt;
more information [[bugzilla:2620]]&lt;br /&gt;
&lt;br /&gt;
==Imap==&lt;br /&gt;
===Folders with a dot in name===&lt;br /&gt;
Email folder names that have a period (&#039;.&#039;) in the folder name, will be split into sub-folders.&lt;br /&gt;
e.g. folder name &#039;www.contribs.org&#039; is created as&lt;br /&gt;
 www&lt;br /&gt;
   contribs&lt;br /&gt;
         org&lt;br /&gt;
===Dovecot Idle_Notify===&lt;br /&gt;
Poor battery consumption issues has been reported with K9-mail on recent Android systems. It is apparent one way of helping this is to modify the imap_idle_notify setting. The default is in Dovecot, and therefore on SME is 2 minutes.&lt;br /&gt;
&lt;br /&gt;
K9 has an idle refresh of 24 mins but it seems with Dovecot defaults at 2 mins it causes lots of wake ups and battery drain.&lt;br /&gt;
&lt;br /&gt;
This is configurable via a config db property.&lt;br /&gt;
&lt;br /&gt;
Default on install&lt;br /&gt;
 # config show dovecot&lt;br /&gt;
  dovecot=service&lt;br /&gt;
    Quotas=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Set dovecot Idle_Notify to 20 minutes&lt;br /&gt;
&lt;br /&gt;
 # config setprop dovecot Idle_Notify 20&lt;br /&gt;
 # config show dovecot&lt;br /&gt;
  dovecot=service&lt;br /&gt;
    Idle_Notify=20&lt;br /&gt;
    Quotas=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Expand template to update *.conf (can also issue a full reconfigure/reboot)&lt;br /&gt;
&lt;br /&gt;
 # expand-template /etc/dovecot/dovecot.conf&lt;br /&gt;
 # dovecot -a |grep imap_idle_notify_interval&lt;br /&gt;
   imap_idle_notify_interval = 20 mins&lt;br /&gt;
&lt;br /&gt;
==qpsmtpd==&lt;br /&gt;
SME uses the [http://smtpd.develooper.com qpsmtpd] smtp daemon.&lt;br /&gt;
&lt;br /&gt;
===Official Description===&lt;br /&gt;
qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core SMTP features, all functionality is implemented in small &amp;quot;extension plugins&amp;quot; using the easy to use object oriented plugin API.&lt;br /&gt;
&lt;br /&gt;
qpsmtpd was originally written as a drop-in qmail-smtpd replacement, but now it also includes smtp forward, postfix, exim and maildir &amp;quot;backends&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
qpsmtpd wiki: http://wiki.qpsmtpd.org&lt;br /&gt;
&lt;br /&gt;
===Log watching tool===&lt;br /&gt;
qplogtail is a script to to monitor /var/log/qpsmtpd/current, see [[bugzilla:3418]]&lt;br /&gt;
&lt;br /&gt;
===Qpsmtpd for SME versions 9.1 and earlier===&lt;br /&gt;
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsptpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.1 and earlier, except where the plugin has been retained, See the next section for the new details.}}&lt;br /&gt;
====Default Plugin Configuration====&lt;br /&gt;
SME uses the following [http://wiki.qpsmtpd.org/plugins qpsmtpd plugins] to evaluate each incoming email. &lt;br /&gt;
&lt;br /&gt;
SME maintains 2 distinct configurations: one for the &#039;local&#039; networks (as defined in server-manager::Security::Local networks) and another for &#039;remote&#039; networks (everyone else).&lt;br /&gt;
&lt;br /&gt;
The default configuration of each plugin is indicated in the &#039;Default Status&#039; column.&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Plugin&lt;br /&gt;
!Purpose&lt;br /&gt;
!Default Status&lt;br /&gt;
|-&lt;br /&gt;
|hosts_allow&lt;br /&gt;
|Prohibit more than &amp;quot;InstancesPerIP&amp;quot; connections from any single host (change with &#039;config setprop smtpd InstancesPerIP&#039;).  Allow or deny connections according to the contents of /var/service/qpsmtpd/config/hosts_allow.  See [http://svn.perl.org/qpsmtpd/trunk/plugins/hosts_allow hosts_allow SVN code] for more details.&lt;br /&gt;
|[http://bugs.contribs.org/show_bug.cgi?id=3352 enabled]&lt;br /&gt;
|-&lt;br /&gt;
|peers&lt;br /&gt;
|Allow different plugin configuration based on the sending computer&#039;s IP address.  By default SME maintains different configurations for the local networks (in /var/service/qpsmtpd/config/peers/local) and for everyone else (in /var/service/qpsmtpd/config/peers/0)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|logging/logterse&lt;br /&gt;
|Allow greater logging detail using smaller log files.  Optionally supports [[Email_Statistics#qplogsumm.pl|qplogsumm.pl]] to compile qpsmtpd statistics.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|auth/auth_cvm_unix_local&lt;br /&gt;
|Allow authenticated smtp relay&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[qpsmtpd_check_earlytalker|check_earlytalker]]&lt;br /&gt;
|reject email from servers that talk out of turn&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|count_unrecognized_commands&lt;br /&gt;
|reject email from servers that issue &#039;&#039;X&#039;&#039; invalid commands&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|bcc&lt;br /&gt;
|bcc all email to a specific address for archiving&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_relay&lt;br /&gt;
|Check to see if relaying is allowed (in case the recipient is not listed in one of SME&#039;s local domains)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_norelay&lt;br /&gt;
|Check to see if the sending server is specifically forbidden to relay through us.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|require_resolvable_fromhost&lt;br /&gt;
|Check that the domain listed in the sender&#039;s email address is resolvable&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_basicheaders&lt;br /&gt;
|reject email that lacks either a From: or Date: header&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|rhsbl&lt;br /&gt;
|Reject email if the sender&#039;s email domain has a reputation for disregarding smtp RFCs.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;(always disabled for local connections)&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl&lt;br /&gt;
|Reject email from hosts listed in your configured dnsbl servers&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_badmailfrom&lt;br /&gt;
|Reject email where the sender address is listed in /var/service/qpsmtpd/config/badmailfrom&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_badrcptto_patterns&lt;br /&gt;
|Reject email addressed to any address matching an expression listed in /var/service/qpsmtpd/config/badrcptto_patterns&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_badrcptto&lt;br /&gt;
|Reject email addressed to any address listed in /var/service/qpsmtpd/config/badrcptto&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_spamhelo&lt;br /&gt;
|Reject email from hosts that say &#039;helo ...&#039; using a value in /var/service/qpsmtpd/config/badhelo&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_smtp_forward&lt;br /&gt;
|If &#039;&#039;config show DelegateMailServer&#039;&#039; or &#039;&#039;db domains show &amp;lt;domainname&amp;gt; MailServer&#039;&#039; is set (telling SME to deliver email for all domains or just &amp;lt;domainname&amp;gt; to another server), check_smtp_forward will connect to the specified server and will reject the message outright if the internal mail server would also reject it.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;unless an internal mail server is configured.&lt;br /&gt;
|-&lt;br /&gt;
|check_goodrcptto&lt;br /&gt;
|Accept email only if the recipient address matches an entry in /var/service/qpsmtpd/config/goodrcptto.  For domains that are configured to use an internal mail server, the entire domain name will be added to .../goodrcptto.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|rcpt_ok&lt;br /&gt;
|Return &#039;OK&#039; if none of the other host checks has returned &#039;DENY&#039; (??)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|pattern_filter&lt;br /&gt;
|Reject email according to content patterns (??)&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|Convert MS TNEF (winmail.dat) and uuencoded attachments to MIME&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|disclaimer&lt;br /&gt;
|Add a configurable disclaimer to email messages&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|spamassassin&lt;br /&gt;
|Check email using spamassassin, and optionally reject it completely if the score exceeds a configurable value.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;(always disabled for local connections)&lt;br /&gt;
|-&lt;br /&gt;
|virus/clamav&lt;br /&gt;
|Scan incoming email with ClamAV&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|queue/qmail-queue&lt;br /&gt;
|Deliver the incoming message to qmail for delivery.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Qpsmtpd for SME versions 9.2 and Later===&lt;br /&gt;
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsmtpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.2 and later version, see the previous section for the details.}}&lt;br /&gt;
&lt;br /&gt;
This section has been taken from the notes prepared by the dev who made the changes, the wiki is [https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation here]. &lt;br /&gt;
&lt;br /&gt;
Here is a list of the plugins in use, and a note of any changes that might have occurred:&lt;br /&gt;
&lt;br /&gt;
*logterse: no change&lt;br /&gt;
*tls: no change&lt;br /&gt;
*auth_cvm_unix_local: no change&lt;br /&gt;
*check_earlytalker: &#039;&#039;&#039;renamed earlytalker&#039;&#039;&#039;&lt;br /&gt;
*count_unrecognized_commands: no change&lt;br /&gt;
*bcc: no change&lt;br /&gt;
*check_relay: &#039;&#039;&#039;renamed relay&#039;&#039;&#039;&lt;br /&gt;
*check_norelay: &#039;&#039;&#039;merged into the relay plugin&#039;&#039;&#039;&lt;br /&gt;
*require_resolvable_fromhost: &#039;&#039;&#039;renamed resolvable_fromhost&#039;&#039;&#039;&lt;br /&gt;
*check_basicheaders: &#039;&#039;&#039;renamed headers&#039;&#039;&#039;&lt;br /&gt;
*rhsbl: no change&lt;br /&gt;
*dnsbl: no change&lt;br /&gt;
*check_badmailfrom: &#039;&#039;&#039;renamed badmailfrom&#039;&#039;&#039;&lt;br /&gt;
*check_badrcptto_patterns: &#039;&#039;&#039;doesn&#039;t exist anymore, merged with badrcptto&#039;&#039;&#039;&lt;br /&gt;
*check_badrcptto: &#039;&#039;&#039;renamed badrcptto&#039;&#039;&#039;&lt;br /&gt;
*check_spamhelo: &#039;&#039;&#039;renamed helo&#039;&#039;&#039;&lt;br /&gt;
*check_smtp_forward: no change&lt;br /&gt;
*check_goodrcptto: no change&lt;br /&gt;
*rcpt_ok: no change&lt;br /&gt;
*pattern_filter: no change&lt;br /&gt;
*tnef2mime: no change&lt;br /&gt;
*spamassassin: no change&lt;br /&gt;
*clamav: no change&lt;br /&gt;
*qmail-queue: no change&lt;br /&gt;
&lt;br /&gt;
Here is a section for each of the new plugins which are installed by default. The ones that have not changed are documented [https://wiki.contribs.org/Email#Default_Plugin_Configuration above].&lt;br /&gt;
&lt;br /&gt;
====Karma====&lt;br /&gt;
&lt;br /&gt;
The karma plugin tracks sender history. For each inbound email, various plugins can raise, or lower the &amp;quot;naughtiness&amp;quot; of the connection (eg, if SPF check passes, if the message is spammy etc...). For each host sending us email, the total number of connections, and the number of good and bad connections is recorded in a database. If a host as more bad than good connections in its history, emails will be rejected for 1 day. 3 settings are available for this plugin:&lt;br /&gt;
&lt;br /&gt;
*Karma (enabled|disabled): Default value is disabled. Change to enabled to use the plugin&amp;lt;br /&amp;gt;&lt;br /&gt;
*KarmaNegative (integer): Default value is 2.&amp;lt;br /&amp;gt; It&#039;s the delta between good and bad connection to consider the host naughty enough to block it for 1 day.&amp;lt;br /&amp;gt; Eg, with a default value of two, a host can be considered naughty if it sent you 8 good emails and 10 bad ones&amp;lt;br /&amp;gt;&lt;br /&gt;
*KarmaStrikes (integer): Default value is 3. This is the threshold for a single email to be considered good or bad. &amp;lt;br /&amp;gt;Eg, with the default value of 3, an email needs at least 3 bad karmas (reaches -3) for the connection to be considered bad.&amp;lt;br /&amp;gt;On the other side, 3 good karmas are needed for the connection to be considered good. Between the two, the connection is considered neutral&amp;lt;br /&amp;gt;and won&#039;t be used in the history count&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd Karma enabled KarmaNegative 3&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====URIBL====&lt;br /&gt;
&lt;br /&gt;
The URIBL plugin works a bit like RHSBL, except that it checks domain names found in the body of the email. For each URI identified, the corresponding domain name can be submitted to a BL list (through DNS queries). Two settings are available:&lt;br /&gt;
&lt;br /&gt;
*URIBL (enabled|disabled): Default is disabled. Set this to enabled to use the plugin&lt;br /&gt;
*UBLList: (Comma separated list addresses): Default value is &#039;&#039;&#039;multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net&#039;&#039;&#039;.&amp;lt;br /&amp;gt;This can be the same as RBLList. You can also set bitmask to use for combined lists (in the default value, the bitmask is 8-16-64-128)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd URIBL enabled UBLList multi.surbl.org,black.uribl.com&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Helo====&lt;br /&gt;
&lt;br /&gt;
Previously, the helo plugin was just checking for some known bad helo hostnames used by spammers (aol.com and yahoo.com). Now, it can check much more than that. This plugin is always enabled and has a single setting:&lt;br /&gt;
&lt;br /&gt;
*HeloPolicy: (lenient|rfc|strict). The default value is &#039;&#039;&#039;lenient&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See https://github.com/smtpd/qpsmtpd/blob/master/plugins/helo for a description of the various tests done at each level&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd HeloPolicy rfc&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Inbound DKIM / SPF / DMARC====&lt;br /&gt;
&lt;br /&gt;
DMARC is a policy on top of DKIM and SPF. By default, SPF and DKIM are now checked on every inbound emails, but no reject is attempted. The dmarc plugin can decide to reject the email (depending on the sender policy). dkim and spf plugins are always enabled. dmarc has two settings:&lt;br /&gt;
&lt;br /&gt;
*DMARCReject (enabled|disabled): Default value is disabled.&amp;lt;br /&amp;gt;If set to enabled, the dmarc plugin can decide to reject an email (if the policy of the sender is to reject on alignment failure)&amp;lt;br /&amp;gt;&lt;br /&gt;
*DMARCReporting (enabled|disabled): Default value is enabled.&amp;lt;br /&amp;gt;If set to enabled, enable reporting (which is the &#039;&#039;&#039;r&#039;&#039;&#039; in dma&#039;&#039;&#039;r&#039;&#039;&#039;c). Reporting is a very important part of the DMARC standard.&amp;lt;br /&amp;gt;When enabled, you&#039;ll record information about email you receive from domains which have published a DMARC policy in a local&amp;lt;br /&amp;gt;SQLite database (/var/lib/qpsmtpd/dmarc/reports.sqlite).&amp;lt;br /&amp;gt;Then, once a day, you send the aggregate reports to the domain owner so they have feedback.&amp;lt;br /&amp;gt;You can set this to disabled if you want to disable this feature&amp;lt;br /&amp;gt;&lt;br /&gt;
*SPFRejectPolicy (0|1|2|3|4): Default value is 0. Set the policy to apply in case of SPF failure when the sender hasn&#039;t published a DMARC policy.&amp;lt;br /&amp;gt;Note: this is only used when no DMARC policy is published by the sender.&amp;lt;br /&amp;gt;If there&#039;s a DMARC policy, even a &amp;quot;p=none&amp;quot; one (meaning no reject), then the email won&#039;t be rejected, even on failed SPF tests.&lt;br /&gt;
&lt;br /&gt;
:*0: do not reject anything&lt;br /&gt;
:*1: reject when SPF says fail&lt;br /&gt;
:*2: reject when SPF says softfail&lt;br /&gt;
:*3: reject when SPF says neutral&lt;br /&gt;
:*4: reject when an error occurred (like a syntax error in SPF entry) or if no SPF entry is published&lt;br /&gt;
&lt;br /&gt;
*Inbound DKIM checks are only used by DMARC. No reject solely based on DKIM is supported&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd DMARCReject disabled SPFRejectPolicy 2&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
====Outbound DKIM signing / SPF / DMARC policy====&lt;br /&gt;
&lt;br /&gt;
Everything is now ready for you to sign your outbound emails, and publish your public key, as well as your SPF and DMARC policy. A default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domain you manage:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to disable dkim signing for a domain, you can use:&lt;br /&gt;
 db domains setprop domain.com DKIMSigning disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:&lt;br /&gt;
 cd /home/e-smith/dkim_keys&lt;br /&gt;
 mkdir domain.net&lt;br /&gt;
 cd domain.net&lt;br /&gt;
 echo default &amp;gt; selector&lt;br /&gt;
 openssl genrsa -out private 2048&lt;br /&gt;
 openssl rsa -in private -out public -pubout&lt;br /&gt;
 chown qpsmtpd:qpsmtpd private&lt;br /&gt;
 chmod 400 private&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.&lt;br /&gt;
&lt;br /&gt;
====Publishing your DNS entries====&lt;br /&gt;
&lt;br /&gt;
Signing your outbound emails is just part of the process. You now need to publish some DNS entries so everyone can check if the email they receive matches your policy. This part is not to be done on your SME Server, but on your public DNS provider. A script helps you by creating some sample DNS entries already formatted for a bind-like zone file. To use it:&lt;br /&gt;
 qpsmtpd-print-dns &amp;lt;domain name&amp;gt;&lt;br /&gt;
If omitted, the primary domain name is assumed.&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
 Here are sample DNS entries you should add in your public DNS&lt;br /&gt;
 The DKIM entry can be copied as is, but others will probably need to be adjusted&lt;br /&gt;
 to your need. For example, you should either change the reporting email adress&lt;br /&gt;
 for DMARC (or create the needed pseudonym)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 default._domainkey IN TXT &amp;quot;v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/Qq3Ntpx2QNdRxGKMeKc2r9ULvyYW633IbLivHznN9JvjJIbS54PGIEk3sSxvZSdpTRAvYlxn/nRi329VmcDK0vJYb2ut2rnZ3VO3r5srm+XEvTNPxij5eU4gqw+5ayySDjqzAMEMc5V7lUMpZ/YiqnscA075XiMF7iEq8Quv1y0LokmgwtxzOXEZap34WXlKyhYzH+D&amp;quot;&amp;quot;fabF6SUllmA0ovODNvudzvEOanPlViQ7q7d+Mc3b7X/fzgJfh5P9f5U+iSmzgyGctSb6GX8sqsDMNVEsRZpSE3jd2Z33RDWyW21PGOKB/ZrLiliKfdJbd3Wo7AN7bWsZpQsei2Hsv1niQIDAQAB&amp;quot;&lt;br /&gt;
 @ IN SPF &amp;quot;v=spf1 mx a -all&amp;quot;&lt;br /&gt;
 @ IN TXT &amp;quot;v=spf1 mx a -all&amp;quot;&lt;br /&gt;
 _dmarc IN TXT &amp;quot;v=DMARC1; p=none; adkim=s; aspf=r; rua=mailto:dmarc-feedback@domain.net; pct=100&amp;quot;&lt;br /&gt;
All you have to do now is publish those records, but do note that there is a point to consider when publishing the default._domainkey DNS record, as produced by the &#039;&#039;qpsmtpd-print-dns&#039;&#039; command: if the DNS record includes &#039;&#039;;t=y&#039;&#039; then as per the DKIM specification ([http://dkim.org/specs/rfc4871-dkimbase.html#keys RFC4781 section 3.6.1]) this means that your &#039;&#039;&amp;quot;...domain is testing DKIM. Verifiers MUST NOT treat messages from signers in testing mode differently from unsigned email, even should the signature fail to verify. Verifiers MAY wish to track testing mode results to assist the signer.&amp;quot;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
On the other hand, if no &#039;&#039;;t=y&#039;&#039; is included, then it means you are intending to use DKIM in production mode. It might be a good idea to publish the DKIM DNS record first in testing mode (&#039;&#039;;t=y&#039;&#039; included), check how things go and if everything is alright, remove the &#039;&#039;;t=y&#039;&#039; part.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Testing====&lt;br /&gt;
You can install spfquery:&lt;br /&gt;
&lt;br /&gt;
 yum --enablerepo=epel install libspf2 libspf2-progs&lt;br /&gt;
&lt;br /&gt;
Usage (try -help for help):&lt;br /&gt;
&lt;br /&gt;
 spfquery -ip=11.22.33.44 -sender=user@aol.com -helo=spammer.tld&lt;br /&gt;
&lt;br /&gt;
Check record via dig&lt;br /&gt;
&lt;br /&gt;
 dig -t TXT +short somedomain.co.uk&lt;br /&gt;
&lt;br /&gt;
====Load====&lt;br /&gt;
The loadcheck plugin can temporarily deny inbound emails if your server is overloaded. This plugin is always enabled and has a single setting:&lt;br /&gt;
&lt;br /&gt;
*MaxLoad (int number): Default is 7. If your load is above this value, emails from the outside will be deferred.&lt;br /&gt;
&lt;br /&gt;
===Other QPSMTPD Plugins===&lt;br /&gt;
The following qpsmtpd plugins will work on a SME server, but are either not included or are not configured by default.&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Plugin&lt;br /&gt;
!Purpose&lt;br /&gt;
!Default Status&lt;br /&gt;
|-&lt;br /&gt;
|[[Qpsmtpd_connection_time|connection_time]]&lt;br /&gt;
|Track the total time for each qpsmtpd connection from &#039;Accepted connection&#039; through &#039;click, disconnecting&#039;, and output the results to the qpsmtpd log file.&lt;br /&gt;
|not installed - not clear if this works for SME9.2 (anyone?)&lt;br /&gt;
|-&lt;br /&gt;
|[[GeoIP]]&lt;br /&gt;
|Track the geographic origin of incoming email and optionally reject email from specified countries&lt;br /&gt;
|not installed - does work for SME 9.2 and later.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Internal or External Mail Servers==&lt;br /&gt;
SME can be configured as a spam and antivirus filter for one or more &amp;quot;Internal or External&amp;quot; mail servers on a domain-by-domain basis.  The mail server specified does not have to be on the same local network as your SME server, &amp;amp; can be hosted on an external site.&lt;br /&gt;
&lt;br /&gt;
===Deliver ALL email to a single internal or external mail server===&lt;br /&gt;
You can set the default delivery location for all domains on your SME server to a single &#039;&#039;internal or external&#039;&#039; mail server by setting the mail server address in server-manager::Configuration::E-mail::Change e-mail delivery settings::Address of internal mail server.&lt;br /&gt;
&lt;br /&gt;
Note: &#039;&#039;Address of internal mail server&#039;&#039; must be blank if you want any email delivered to the SME server itself.&lt;br /&gt;
&lt;br /&gt;
===Deliver email for one domain to an internal or external mail server===&lt;br /&gt;
You can override the default email delivery destination for individual domains on your SME server (forwarding all email for the specified domain to another server) as follows:&lt;br /&gt;
&lt;br /&gt;
First, create the necessary virtual domains using server-manager::Configuration::Domains::Add Domain.&lt;br /&gt;
&lt;br /&gt;
Then, (assuming your domain is called &#039;&#039;test.com&#039;&#039; and the actual mail server is at &#039;&#039;a.b.c.d&#039;&#039; issue the following commands:&lt;br /&gt;
 db domains setprop test.com MailServer a.b.c.d&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
A FQDN can also be used for the MailServer property, eg &#039;&#039;aspmx.l.google.com&#039;&#039; instead of the IP address &#039;&#039;a.b.c.d&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 db domains setprop test.com MailServer aspmx.l.google.com&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the internal or external mail server (and return email delivery for &#039;&#039;test.com&#039;&#039; to the default for your SME server) using:&lt;br /&gt;
 db domains delprop test.com MailServer&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
==Secondary/Backup Mail Server Considerations==&lt;br /&gt;
&lt;br /&gt;
Many people misunderstand the issues of using a secondary or backup &lt;br /&gt;
mail server (backup MX) to hold your mail before it gets delivered &lt;br /&gt;
to your SME Server. If you consider putting a backup mail server in &lt;br /&gt;
place because you are concerned about lost mail because your internet&lt;br /&gt;
connection may occasionally drop out, think again and consider the issues&lt;br /&gt;
discussed below.&lt;br /&gt;
&lt;br /&gt;
===What is &#039;&#039;Backup MX&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
A backup MX is a system whereby through your DNS records you tell other&lt;br /&gt;
servers on the internet that in order to deliver mail to your domain they&lt;br /&gt;
first need to try the primary MX record and if they fail to connect they&lt;br /&gt;
can try to connect to one or more of your listed backup or secondary mail &lt;br /&gt;
servers. See also http://en.wikipedia.org/wiki/MX_record&lt;br /&gt;
&lt;br /&gt;
===The process of delivering email to your SME Server===&lt;br /&gt;
&lt;br /&gt;
So lets look at how mail gets delivered without and with a &lt;br /&gt;
&#039;&#039;backup mx&#039;&#039; when your Internet link, ISP or server is down.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Without&#039;&#039;&#039; a backup MX====&lt;br /&gt;
&lt;br /&gt;
*The sending mail server cannot connect to your server.&lt;br /&gt;
*The sending mail server MUST queue the mail and try again later.&lt;br /&gt;
*The mail stays on the sender&#039;s server.&lt;br /&gt;
*The sender&#039;s server resends the mail at a later date.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The requirement to re-queue is a fundamental part of the SMTP protocol - &#039;&#039;&lt;br /&gt;
it is not optional. So, if your server is &#039;&#039;&#039;offline&#039;&#039;&#039; due to a link or ISP &lt;br /&gt;
outage, &#039;&#039;&#039;the mail just stays at the sender&#039;s server until you are once &#039;&#039;&#039;&lt;br /&gt;
again reachable&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;With&#039;&#039;&#039; a backup MX====&lt;br /&gt;
&lt;br /&gt;
*The sending mail server cannot contact your server.&lt;br /&gt;
*The sending mail server sends the mail to your secondary MX.&lt;br /&gt;
*The secondary MX queues the mail until your link/server is up.&lt;br /&gt;
*The mail is queued on an &#039;&#039;&#039;untrusted&#039;&#039;&#039; third-party mail server (&#039;&#039;think about confidential mail between your company and some business partner&#039;&#039;).&lt;br /&gt;
*The sending mail server&#039;s administrator &#039;&#039;thinks&#039;&#039; it has been delivered, according to their logs.&lt;br /&gt;
*You have no, or little, visibility over the queued mail.&lt;br /&gt;
*When your link comes up, the secondary MX sends the mail on to your server.&lt;br /&gt;
*You have added more hops, more systems and more delay to the process.&lt;br /&gt;
&lt;br /&gt;
If you think that a backup MX will protect against broken mail servers &lt;br /&gt;
which don&#039;t re-queue, you can&#039;t. Those servers will drop mail on the floor&lt;br /&gt;
at random times, for example when &#039;&#039;their&#039;&#039; Internet link is down. &lt;br /&gt;
&lt;br /&gt;
Those servers are also highly likely to never try your backup MX. &lt;br /&gt;
&lt;br /&gt;
Thankfully those servers are mostly gone from the Internet, but adding a &lt;br /&gt;
secondary MX doesn&#039;t really improve the chances that they won&#039;t drop mail&lt;br /&gt;
destined for your server on the floor.&lt;br /&gt;
&lt;br /&gt;
===Backup MX and SPAM Filtering===&lt;br /&gt;
&lt;br /&gt;
On top of the issue, indicated above, there is another issue to consider&lt;br /&gt;
and that is what happens with SPAM due to the use of a &#039;&#039;Backup MX&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Your SME Server takes care of filtering a lot of SPAM by checking on the full &lt;br /&gt;
username &amp;amp; domain at the time it is received.&lt;br /&gt;
&lt;br /&gt;
For example if your server hosts &#039;&#039;&#039;example.com&#039;&#039;&#039; and someone sends &lt;br /&gt;
mail to &#039;&#039;&#039;joeuser@example.com&#039;&#039;&#039;, the server will &#039;&#039;&#039;only&#039;&#039;&#039; accept the mail&lt;br /&gt;
if joeuser is a local user/alias/group/pseudonym on the server. &lt;br /&gt;
Otherwise, the mail is rejected during the SMTP transaction.&lt;br /&gt;
&lt;br /&gt;
A backup mail server however, generally does not have a full list of&lt;br /&gt;
users against which it can check if it should accept the mail for the given&lt;br /&gt;
domain. Hence it will accept mail for &#039;&#039;invalid&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
So:&lt;br /&gt;
&lt;br /&gt;
*If you trust the secondary MX, you &amp;lt;u&amp;gt;will&amp;lt;/u&amp;gt; accept a lot of SPAM when the link comes up.&lt;br /&gt;
*If you don&#039;t trust it, you will cause a lot of SPAM backscatter as the mail has been accepted at the secondary MX and then later bounced by you.&lt;br /&gt;
*Stopping backscatter is why SME Server rejects invalid addresses during the initial SMTP transaction.&lt;br /&gt;
&lt;br /&gt;
The SPAM backscatter can only be stopped if the secondary MX has a full list&lt;br /&gt;
of users for your domain to allow filtering to occur.&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
&lt;br /&gt;
*You need to be able to configure this secondary MX with such user/domain lists&lt;br /&gt;
*You need to maintain these secondary configurations when users are added/deleted from your primary server configuration&lt;br /&gt;
*You need to test (regularly) if the secondary is successfully accepting/rejecting mail as required.&lt;br /&gt;
&lt;br /&gt;
Quite a few sites have lost lots of mail through misconfigured backup MX servers. Unfortunately, the time when you find &lt;br /&gt;
out they are misconfigured is when you go to use them, and then you find that the backup MX has changed configuration and bounced all of your mail. &lt;br /&gt;
&lt;br /&gt;
Then you realise that this mail could have queued at the sender&#039;s site if there hadn&#039;t been a broken secondary MX bouncing the mail for you.&lt;br /&gt;
&lt;br /&gt;
*If you bounce mail at your server, you have logs to show what&#039;s wrong.&lt;br /&gt;
*If your secondary MX bounces your mail, you usually have no way to determine what happened other than via reports from the original senders that your mail bounced.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
In summary, if your server/Internet connection is available most (let&#039;s say &amp;gt;90%) of &lt;br /&gt;
the time, you are generally better off &amp;lt;u&amp;gt;without a secondary MX&amp;lt;/u&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If your server/link is down more than this (e.g. dialup), you should not be delivering mail &lt;br /&gt;
directly to your server.&lt;br /&gt;
&lt;br /&gt;
If you still want to consider setting up a seconday MX, ensure that:&lt;br /&gt;
&lt;br /&gt;
*you have fully control of the configuration of each of the email gateways for your domain&lt;br /&gt;
*each gateway can make decisions on whether to accept/reject mail for the users at the domain&lt;br /&gt;
&lt;br /&gt;
==Mail server on dynamic IP==&lt;br /&gt;
===Problems with running a mail server on SME server using a dynamic external IP from ISP===&lt;br /&gt;
&lt;br /&gt;
This information comes from http://bugs.contribs.org/show_bug.cgi?id=2057#c10&lt;br /&gt;
&lt;br /&gt;
This is the chronological sequence of events that leads to issues with mail servers on dynamic IPs:&lt;br /&gt;
&lt;br /&gt;
1) Server gets dynamic IP&lt;br /&gt;
&lt;br /&gt;
2) Reboot/power fail (without updating dynamic DNS to &amp;quot;offline&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
3) Another server/someone else is allocated your old IP while your server is down&lt;br /&gt;
&lt;br /&gt;
4) The other server/person is running a mail server&lt;br /&gt;
&lt;br /&gt;
5) The other server either gets your mail (which is bad) or bounces your mail (also bad)&lt;br /&gt;
&lt;br /&gt;
You have no control over this issue and you will lose mail when it happens. If you have a dynamic IP, the recommended approach is to get someone with a static IP to queue your inbound mail and send it to you on a non-standard port, preferably with an authentication mechanism which queues the mail if the auth fails, just in case someone else happens to have a mail server on the same port (while highly unlikely, this is possible).&lt;br /&gt;
&lt;br /&gt;
Whether this issue is really a problem to end users, depends on how much you &amp;quot;value&amp;quot; your mail. For a home user having their own mail server, it is probably not a great problem if some messages should happen to go astray, but for all other classes of users, you should really avoid running a mail server on a dynamic IP, without implementing a suitable queueing workaround as suggested. Some ISPs change the IP very infrequently eg yearly, so in those cases it is also not a significant problem. Many/most ISP&#039;s will issue a new IP every time a connection is lost &amp;amp; re-established, so these situations are more problematic.&lt;br /&gt;
&lt;br /&gt;
==How to re-apply procmail rules==&lt;br /&gt;
&lt;br /&gt;
If you have a folder of email that needs to have the procmail rules applied, then the trick is to be logged in as the email user, and then position your self in the home directory, and then this works: &lt;br /&gt;
 su &amp;lt;username&amp;gt; -s /bin/bash &lt;br /&gt;
 cd ~&lt;br /&gt;
 for m in &amp;lt;fullpath to maildirectory&amp;gt;/cur/*; do echo $m; procmail &amp;lt; $m &amp;amp;&amp;amp; rm $m; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Howto]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=96</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=96"/>
		<updated>2026-01-13T11:40:38Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* .bashrc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
 xz -dv xxx.xz&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
 xz -6cv --threads=0 /path/filename &amp;gt; /path/filename.xz&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/path/filename /path&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/path/filename /path&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[35m\]\h:\w#\[\e[m\] &amp;quot;         PINK&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=95</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=95"/>
		<updated>2026-01-13T11:40:04Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* rsync */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
 xz -dv xxx.xz&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
 xz -6cv --threads=0 /path/filename &amp;gt; /path/filename.xz&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/path/filename /path&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/path/filename /path&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=94</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=94"/>
		<updated>2026-01-13T11:34:24Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* tar create */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
 xz -dv xxx.xz&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
 xz -6cv --threads=0 /path/filename &amp;gt; /path/filename.xz&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/mnt/backups/dump/vzdump-qemu-101-2021_09_25-00_00_09.vma.zst /mnt/4TB1/abc&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/mnt/mirror1/dump/fri/SAGESVR.qcow2 /media/owner/WEEKLY/abc&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=93</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=93"/>
		<updated>2026-01-13T11:32:37Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* unzip */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
 xz -dv xxx.xz&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/mnt/backups/dump/vzdump-qemu-101-2021_09_25-00_00_09.vma.zst /mnt/4TB1/abc&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/mnt/mirror1/dump/fri/SAGESVR.qcow2 /media/owner/WEEKLY/abc&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=92</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=92"/>
		<updated>2026-01-13T11:32:13Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* SME */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 rm -f yum_repositories.po&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 signal-event dnf-modify&lt;br /&gt;
 dnf update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/mnt/backups/dump/vzdump-qemu-101-2021_09_25-00_00_09.vma.zst /mnt/4TB1/abc&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/mnt/mirror1/dump/fri/SAGESVR.qcow2 /media/owner/WEEKLY/abc&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_FTP&amp;diff=91</id>
		<title>SMEServer FTP</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_FTP&amp;diff=91"/>
		<updated>2026-01-13T11:17:14Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Ftp  In short SME uses port 21 for FTP. Default mode used is passive. To use it you will need a custom template and enabling ports (PassivePort  https://bugs.koozali.org/show_bug.cgi?id=12454).   Starting SME10, ftp default  is to use explicit TLS over ftp (FTPs explicite) &amp;#039;&amp;#039;&amp;#039;Easy filezilla connexion to SME would use url with FTPES://.&amp;#039;&amp;#039;&amp;#039; {| class=&amp;quot;wikitable&amp;quot; |+disambiguation !term / protocol !port !deamon !explanation |- |ftp ftp://...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Ftp&lt;br /&gt;
&lt;br /&gt;
In short SME uses port 21 for FTP. Default mode used is passive. To use it you will need a custom template and enabling ports (PassivePort  https://bugs.koozali.org/show_bug.cgi?id=12454). &lt;br /&gt;
&lt;br /&gt;
Starting SME10, ftp default  is to use explicit TLS over ftp (FTPs explicite) &#039;&#039;&#039;Easy filezilla connexion to SME would use url with FTPES://.&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+disambiguation&lt;br /&gt;
!term / protocol&lt;br /&gt;
!port&lt;br /&gt;
!deamon&lt;br /&gt;
!explanation&lt;br /&gt;
|-&lt;br /&gt;
|ftp ftp://&lt;br /&gt;
|21&lt;br /&gt;
|proftpd&lt;br /&gt;
|unencrypted file transfer protocol, all is clear text, no encryption. disabled on SME&amp;gt;=10&lt;br /&gt;
|-&lt;br /&gt;
|ftps ftpes://&lt;br /&gt;
|21&lt;br /&gt;
|proftpd&lt;br /&gt;
|explicit TLS encrypted file transfer protocol, password exchange and files are encrypted&lt;br /&gt;
|-&lt;br /&gt;
|ftps ftps://&lt;br /&gt;
|900&lt;br /&gt;
|proftpd&lt;br /&gt;
|implicit TLS, not available on SME&lt;br /&gt;
|-&lt;br /&gt;
|sftp&lt;br /&gt;
|22&lt;br /&gt;
|sshd&lt;br /&gt;
|secured file transfer protocol over ssh. this needs a RSA or EC key  on SME Server&lt;br /&gt;
|}&lt;br /&gt;
SME Server offers a ftp server, which is Proftpd. If enabled it  allows you to access to the Primary ibay files folder with anonymous access, and to any content your user is allowed, if authenticated, inside /home/e-smith/files.&lt;br /&gt;
&lt;br /&gt;
Prior to SME 10 ftp was using cleat text communication (&#039;&#039;&#039;FTP&#039;&#039;&#039;), allowing one to listen to your password and files exchanged on the network. Now TLS is enforced by default (&#039;&#039;&#039;FTPs&#039;&#039;&#039;), and it is suggested that you keep it enabled.&lt;br /&gt;
&lt;br /&gt;
While you may be used to the traditional port 21 for file transfer protocol (&#039;&#039;&#039;FTP&#039;&#039;&#039;), this page is here to help you have steady access to your ftp server, by understanding it, and enabling the extra needed ports.&lt;br /&gt;
&lt;br /&gt;
Your server is using &lt;br /&gt;
&lt;br /&gt;
Do not confuse &#039;&#039;&#039;sFTP&#039;&#039;&#039;, which is part of ssh protocol and uses port 22, with &#039;&#039;&#039;FTPs&#039;&#039;&#039; which is the regular ftp protocol over port 21 using a layer of SSL/TLS encryption.&lt;br /&gt;
&lt;br /&gt;
== FTP connection modes : active versus passive ==&lt;br /&gt;
SME by default offers both active and passive mode when you are on LAN. However, as soon as you try to access from a  remote location you will have some difficulties depending on the situation.&lt;br /&gt;
&lt;br /&gt;
By default, for passive connection,  Proftpd will use ports from 1024 and up, which means that you must forward &#039;&#039;all&#039;&#039; ports 1024-65535 from the NAT to the FTP server!  And you have to allow many (possibly) dangerous ports in your fire-walling rules!  Not a good situation.&lt;br /&gt;
&lt;br /&gt;
==== The Modes ====&lt;br /&gt;
&lt;br /&gt;
===== active =====&lt;br /&gt;
From the server-side firewall&#039;s standpoint, to support active mode FTP the following communication channels need to be opened (http://slacksite.com/other/ftp.html):&lt;br /&gt;
&lt;br /&gt;
* FTP server&#039;s port 21 from anywhere (Client initiates connection)&lt;br /&gt;
* FTP server&#039;s port 21 to ports &amp;gt; 1024 (Server responds to client&#039;s control port)&lt;br /&gt;
* FTP server&#039;s port 20 to ports &amp;gt; 1024 (Server initiates data connection to client&#039;s data port)&lt;br /&gt;
* FTP server&#039;s port 20 from ports &amp;gt; 1024 (Client sends ACKs to server&#039;s data port)&lt;br /&gt;
&lt;br /&gt;
===== passive =====&lt;br /&gt;
From the server-side firewall&#039;s standpoint, to support passive mode FTP the following communication channels need to be opened (http://slacksite.com/other/ftp.html):&lt;br /&gt;
&lt;br /&gt;
* FTP server&#039;s port 21 from anywhere (Client initiates connection)&lt;br /&gt;
* FTP server&#039;s port 21 to ports &amp;gt; 1024 (Server responds to client&#039;s control port)&lt;br /&gt;
* FTP server&#039;s ports &amp;gt; 1024 from anywhere (Client initiates data connection to random port specified by server)&lt;br /&gt;
* FTP server&#039;s ports &amp;gt; 1024 to remote ports &amp;gt; 1024 (Server sends ACKs (and data) to client&#039;s data port)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note port 20 does not need to be open inward on SME, as it is only used to send from SME, however if you have a restrictive firewall between Internet and SME limiting outgoing connection you need to open port 20 to be able to do active ftp. http://www.proftpd.org/docs/howto/AWS.html&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway connected to Internet - Client is remote behind a NAT =====&lt;br /&gt;
Active mode will not work because the NAT will mostly hide the client port.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall.&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway behind a firewall / NAT  to Internet - Client is remote behind a NAT =====&lt;br /&gt;
Active mode will not work because the NAT will mostly hide the client port.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall and in your firewall between you SME and Internet. You might also need a template custom to add MasqueradeAddress (http://www.proftpd.org/docs/modules/mod_core.html#MasqueradeAddress).&lt;br /&gt;
&lt;br /&gt;
===== SME is server-gateway connected to Internet - Client is remote directly connected to the Internet =====&lt;br /&gt;
Active mode will work.&lt;br /&gt;
&lt;br /&gt;
Passive mode will need to use the &amp;lt;code&amp;gt;PassivePorts&amp;lt;/code&amp;gt; directive in your &amp;lt;code&amp;gt;proftpd.conf&amp;lt;/code&amp;gt; to control what ports &amp;lt;code&amp;gt;proftpd&amp;lt;/code&amp;gt; will use for its passive data transfers, and you will need to open those port in your SME firewall.&lt;br /&gt;
&lt;br /&gt;
== SSL mode: Explicit SSL versus Implicit SSL ==&lt;br /&gt;
&#039;&#039;&#039;SME 10 and above uses explicit SSL mode for FTPs&#039;&#039;&#039; over port 21 only and does not need port 990. &amp;lt;u&amp;gt;The client must explicitly request for SSL/TLS to be able to go on&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
FTPS (FTP over TLS) is served up in two incompatible modes. If using explicit FTPS, the client connects to the normal FTP port and explicitly switches into secure (TLS) mode with &amp;quot;AUTH TLS&amp;quot;, whereas implicit FTPS is an older style service that assumes TLS mode right from the start of the connection (and normally listens on TCP port 990, rather than 21). &lt;br /&gt;
&lt;br /&gt;
In a FileZilla client this means prefixing the host with &amp;quot;FTPES://&amp;quot; to connect an  &amp;quot;explicit&amp;quot; FTPS server, or &amp;quot;FTPS://&amp;quot; for the legacy &amp;quot;implicit&amp;quot; server (for which you will likely also need to set the port to 990).&lt;br /&gt;
&lt;br /&gt;
== Filezilla config ==&lt;br /&gt;
[[File:Filezilla-ftpes.png|left|thumb]]&lt;br /&gt;
If you use a client such a filezilla, starting SME 10, you will need to select the options&lt;br /&gt;
&lt;br /&gt;
* encryption: TLS/SSL explicit encription &lt;br /&gt;
* port: 21&lt;br /&gt;
* hostname : you ip or domain name&lt;br /&gt;
* user name: your user name &lt;br /&gt;
* password : your password user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
== SME enabling from smanager ==&lt;br /&gt;
[[File:Smanager2-ftp.png|none|thumb|898x898px]]&lt;br /&gt;
&lt;br /&gt;
== FTP configuration options in SME ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+configuration db&lt;br /&gt;
!key&lt;br /&gt;
!Property&lt;br /&gt;
!default&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;10&amp;quot; |ftp&lt;br /&gt;
|access&lt;br /&gt;
|private&lt;br /&gt;
|-&lt;br /&gt;
|TcpPorts&lt;br /&gt;
|49200:49999&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|ChrootDir&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TLSEnable&lt;br /&gt;
|on&lt;br /&gt;
|-&lt;br /&gt;
|TLSRequired&lt;br /&gt;
|on&lt;br /&gt;
|-&lt;br /&gt;
|TLSVerifyClient&lt;br /&gt;
|off&lt;br /&gt;
|-&lt;br /&gt;
|LoginAccess&lt;br /&gt;
|private&lt;br /&gt;
|-&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|disabled&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+account db for ibay type&lt;br /&gt;
!Property&lt;br /&gt;
!default&lt;br /&gt;
|-&lt;br /&gt;
|PublicAccess&lt;br /&gt;
|none&lt;br /&gt;
|-&lt;br /&gt;
|DisableAnonymous&lt;br /&gt;
|no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
*http://www.proftpd.org/docs/modules/mod_core.html#MasqueradeAddress Virtualhost vs Class see http://www.proftpd.org/docs/howto/NAT.html&lt;br /&gt;
* http://www.proftpd.org/docs/howto/FXP.html&lt;br /&gt;
&lt;br /&gt;
===Bug report===&lt;br /&gt;
Proftpd is listed in the [https://bugs.koozali.org/enter_bug.cgi?product=SME%20Server%2010.X bugtracker server] section.&lt;br /&gt;
&lt;br /&gt;
Please report all bugs, new feature requests and documentation issues there.&lt;br /&gt;
&lt;br /&gt;
Current bugs:&lt;br /&gt;
&lt;br /&gt;
https://bugs.koozali.org/buglist.cgi?bug_status=UNCONFIRMED&amp;amp;bug_status=CONFIRMED&amp;amp;bug_status=NEEDINFO&amp;amp;bug_status=IN_PROGRESS&amp;amp;bug_status=RESOLVED&amp;amp;f1=cf_package&amp;amp;list_id=102854&amp;amp;o1=equals&amp;amp;query_format=advanced&amp;amp;resolution=---&amp;amp;v1=e-smith-proftpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
* https://wiki.filezilla-project.org/FTP_over_TLS#Explicit_vs_Implicit_FTPS&lt;br /&gt;
* http://www.proftpd.org/docs/howto/TLS.html&lt;br /&gt;
* https://hstechdocs.helpsystems.com/manuals/globalscape/archive/secureserver3/Explicit_versus_Implicit_SSL.htm&lt;br /&gt;
* https://winscp.net/eng/docs/ftp_modes&lt;br /&gt;
* http://www.proftpd.org/docs/howto/NAT.html&lt;br /&gt;
* http://slacksite.com/other/ftp.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Fail2ban&amp;diff=90</id>
		<title>SMEServer Fail2ban</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Fail2ban&amp;diff=90"/>
		<updated>2026-01-10T10:43:22Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Fail2ban  {{Languages|Fail2ban}}  == Fail2ban for SME Server == {{Level|Easy|The instructions on this page can be followed by a beginner.}}  == Maintainer == Daniel B.&amp;lt;br /&amp;gt; [http://www.firewall-services.com Firewall Services]&amp;lt;br&amp;gt; mailto:daniel@firewall-services.com  Please discuss, provide feedback and share experiences on the forums [http://forums.contribs.org/index.php/topic,51127.0.html &amp;#039;&amp;#039;&amp;#039;here&amp;#039;&amp;#039;&amp;#039;]  == Descriptio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Fail2ban&lt;br /&gt;
&lt;br /&gt;
{{Languages|Fail2ban}}&lt;br /&gt;
&lt;br /&gt;
== Fail2ban for SME Server ==&lt;br /&gt;
{{Level|Easy|The instructions on this page can be followed by a beginner.}}&lt;br /&gt;
&lt;br /&gt;
== Maintainer ==&lt;br /&gt;
[[User:VIP-ire|Daniel B.]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.firewall-services.com Firewall Services]&amp;lt;br&amp;gt;&lt;br /&gt;
mailto:daniel@firewall-services.com&lt;br /&gt;
&lt;br /&gt;
Please discuss, provide feedback and share experiences on the forums [http://forums.contribs.org/index.php/topic,51127.0.html &#039;&#039;&#039;here&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Fail2ban operates by monitoring log files (e.g. /var/log/pwdfail, /var/log/auth.log, etc.) for selected entries and running scripts based on them. Most commonly this is used to block selected IP addresses that may belong to hosts that are trying to breach the system&#039;s security. It can ban any host IP that makes too many login attempts or performs any other unwanted action within a time frame defined by the administrator. &lt;br /&gt;
Fail2ban is typically set up to unban a blocked host within a certain period, so as to not &amp;quot;lock out&amp;quot; any genuine connections that may have been temporarily misconfigured. However, an unban time of several minutes is usually enough to stop a network connection being flooded by malicious connections, as well as reducing the likelihood of a successful dictionary attack.&lt;br /&gt;
&lt;br /&gt;
After installation the most important core services (and some additional ones) are monitored by default without the need for manual configuration (see: [[#Services|Services]]).&lt;br /&gt;
&lt;br /&gt;
{{Tip box|fail2ban is not only a tool against brute force attack on ssh but it can be a tool useful against http protocol attacks or [http://forums.contribs.org/index.php/topic,50162.msg252195.html#msg252195 spam attacks] on your server. See the [[Fail2ban#Jail.conf |jail section]]}}&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
This contrib has been developed and tested on SME Server 8 and later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note box|The SME feature [http://wiki.contribs.org/AutoBlock AutoBlock SSH] should be disabled to ensure that fail2ban controls SSH traffic and not the SME build-in firewall.}}&lt;br /&gt;
&lt;br /&gt;
==Koozali SME v9/v10==&lt;br /&gt;
&lt;br /&gt;
{{#smeversion: smeserver-fail2ban}}&lt;br /&gt;
&lt;br /&gt;
== Installation Koozali SME==&lt;br /&gt;
&amp;lt;tabs container&amp;gt;&amp;lt;tab name=&amp;quot;For SME 10&amp;quot;&amp;gt;&lt;br /&gt;
 yum --enablerepo=smecontribs install smeserver-fail2ban&lt;br /&gt;
&amp;lt;/tab&amp;gt;&amp;lt;tab name=&amp;quot;For SME 9&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* install the rpms&lt;br /&gt;
&lt;br /&gt;
 yum --enablerepo=smecontribs install smeserver-fail2ban&lt;br /&gt;
&lt;br /&gt;
* Apply the needed configuration:&lt;br /&gt;
Use care to execute these three commands precisely. Failure to do so may prevent remote login via ssh. &lt;br /&gt;
&lt;br /&gt;
 db configuration setprop masq status enabled&lt;br /&gt;
 expand-template /etc/rc.d/init.d/masq&lt;br /&gt;
 /etc/init.d/masq restart&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
or, as an alternative, use the following commands. They will have the same effect after rebooting.&lt;br /&gt;
 db configuration setprop masq status enabled&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
&lt;br /&gt;
{{warning box| Failing to run either of these command will completely lock network access next time iptables rules are reloaded}}&lt;br /&gt;
{{warning box| The masq service must be enabled for fail2Ban to work correctly. If you disable it, Fail2ban won&#039;t ban anything}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
{{warning box| Starting SME10 and smeserver-fail2ban 0.1.18-29, manual change of configuration is included in core backup, if you use .local files in  the folders action.d/                fail2ban.d/        filter.d/         jail.d/. Any change to rpm owned .conf file is not added in core backup. Use the .local files to override the conf file instead and it will be in the backup. See http://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Configuration.}}&lt;br /&gt;
&lt;br /&gt;
== Disable SME Feature AutoBlock SME 9 or greater ==&lt;br /&gt;
It&#039;s been noted that one of the features of fail2ban overlaps the built-in ssh AutoBlock feature of SME (https://wiki.contribs.org/AutoBlock). &lt;br /&gt;
It is possible to disable the AutoBlock feature using the following optional steps.&lt;br /&gt;
&lt;br /&gt;
1. View what your current settings are for the built in SME AutoBlock feature by entering the following at the cli.&lt;br /&gt;
 # config show sshd&lt;br /&gt;
2. If AutoBlock is disabled no action is required. If AutoBlock is enabled, set it to disabled with the following commands:&lt;br /&gt;
 # config setprop sshd AutoBlock disabled&lt;br /&gt;
 # signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
==DB command==&lt;br /&gt;
While there is a panel in the server-manager, you can also manage the contrib by the db configuration, it is quite simple&lt;br /&gt;
&lt;br /&gt;
 # config show fail2ban &lt;br /&gt;
 fail2ban=service&lt;br /&gt;
    Mail=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Available options are below:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IgnoreIP&#039;&#039;&#039;: a comma separated list of IP or CIDR networks which will never be blocked by fail2ban. Example: 12.15.22.4,17.20.0.0/16. All your local networks and networks allowed to access the server-manager are already automatically whitelisted&lt;br /&gt;
* &#039;&#039;&#039;FilterLocalNetworks&#039;&#039;&#039; can be enabled or disabled (default is disabled). If set to enabled, local networks won&#039;t be whitelisted, and fail2ban can also ban hosts from the internal networks. Note that networks allowed to access the server-manager are not affected (they will never be blocked)&lt;br /&gt;
* &#039;&#039;&#039;BanTime&#039;&#039;&#039;: Duration (in seconds) of a ban. Default to 1800 (about 30 minutes)&lt;br /&gt;
* &#039;&#039;&#039;FindTime&#039;&#039;&#039;: The time window fail2ban will check, in seconds. Default is 900. So, this means fail2ban will only check for the number of failed login attempts in the last 15 minutes&lt;br /&gt;
* &#039;&#039;&#039;MaxRetry&#039;&#039;&#039;: Number of failed attempts in the last &#039;&#039;&#039;FindTime&#039;&#039;&#039; seconds to trigger a ban. Default is 3&lt;br /&gt;
* &#039;&#039;&#039;Mail&#039;&#039;&#039;: can be enabled or disabled (default is enabled). If enabled, each ban will notify the admin by email&lt;br /&gt;
* &#039;&#039;&#039;MailRecipient&#039;&#039;&#039;: if &#039;&#039;&#039;Mail&#039;&#039;&#039; is enabled, the email address which should receive ban notifications. Default is root (the admin account will receive)&lt;br /&gt;
&lt;br /&gt;
After changing one of these settings, you need to apply it:&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
for example :&lt;br /&gt;
&lt;br /&gt;
 config setprop fail2ban IgnoreIP 12.15.22.4,17.20.0.0/16&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
{{Note box|&amp;lt;code&amp;gt;signal-event fail2ban-conf&amp;lt;/code&amp;gt; effectively restarts the service and clears existing bans, but a suitable &#039;findtime&#039; results in a reban. Be aware that the restart delay can be unexpectedly lengthy due to the resource intensive process of scanning the logs  to reban offending addresses.}}&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
The following services are monitored out of the box, and fail2ban will ban client IP for &#039;&#039;&#039;BanTime&#039;&#039;&#039; if more than &#039;&#039;&#039;MaxRetry&#039;&#039;&#039; authentication failure occure in less than &#039;&#039;&#039;FindTime&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*ssh&lt;br /&gt;
*dovecot (only on SME9, or if you run [https://wikit.firewall-services.com/doku.php/smedev/dovecot smeserver-dovecot])&lt;br /&gt;
*qpsmtpd. If a remote server send you too many mails which qpsmtpd rejects, it&#039;s probably spammer, so Fail2ban will blacklist it. MaxRetry is x3 for this service, so with the default config, a remote server will be blacklisted if 9 mails are rejected in less than 15 minutes&lt;br /&gt;
*httpd-e-smith. The standard http server. 3 different filters check apache logs:&lt;br /&gt;
** noscripts: check client which ask for scripts which are not available on your server. It&#039;s usually script-kiddies trying to exploit security vulerabilities&lt;br /&gt;
** scan: another set of filter for popular scans (phpMyAdmin, wp-login, admin area etc...)&lt;br /&gt;
** auth: will check for standard authentication failure&lt;br /&gt;
*pam. This will check a generic authentication failure. Everything which uses pam should work&lt;br /&gt;
*[[Sogo|SOGo]]. Check SOGo logs for failed authentications&lt;br /&gt;
*[[LemonLDAP-NG]]. Check system logs for auth failure on LemonLDAP::NG portal&lt;br /&gt;
*ftp. Check auth failure on your FTP daemon&lt;br /&gt;
*[[Ejabberd]]. Check auth failure against EJabberd&lt;br /&gt;
&lt;br /&gt;
Each filters will disable itself if the corresponding service is disabled. You can also disable specific filter if you want. For example, if you want to disable Apache filters:&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop httpd-e-smith Fail2Ban disabled&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
== Selective bans ==&lt;br /&gt;
Fail2Ban will do its best to do a selective ban. For example, if 3 auth failure against ssh are detected, only tcp port 22 (or any other port you choosed for SSH) will be blocked. Same for httpd-e-smith, SOGO, LemonLDAP::NG which will only blacklist tcp ports 80 and 443, qpsmtpd will block tcp ports 25 and 465, dovecot will block 143 and 993 etc...&lt;br /&gt;
&lt;br /&gt;
There&#039;s only two ways to be completly locked (all port/protocol):&lt;br /&gt;
* pam. As this is a generic file, it&#039;s not possible to check which service was used when an auth failure occured, so the entire client IP will be blacklisted&lt;br /&gt;
* recidive. This is a special filter. It monitors fail2Ban logs, and blacklist client IP which gets locked several time. If a client is locked out 5 times in 24 hours, it&#039;ll be completly blacklisted for one full week&lt;br /&gt;
&lt;br /&gt;
== Use Fail2ban ==&lt;br /&gt;
=== List all jails ===&lt;br /&gt;
 [root@sme8 ~]# fail2ban-client status &lt;br /&gt;
 Status&lt;br /&gt;
 |- Number of jail:	10&lt;br /&gt;
 `- Jail list:		http-overflows, http-noscript, http-auth, sogo, pam-generic, ssh-ddos, http-scan, ssh, qpsmtpd, recidive&lt;br /&gt;
&lt;br /&gt;
=== List IP banned from a specific jail ===&lt;br /&gt;
 [root@sme8 ~]# fail2ban-client status ssh&lt;br /&gt;
choose the specific jail with the command above which lists the Jail-list.&lt;br /&gt;
&lt;br /&gt;
=== Example script which list How many ip are banned from all jails ===&lt;br /&gt;
&lt;br /&gt;
 nano /root/checklist_ban&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #lancer le script en sudo &lt;br /&gt;
 JAILS=$(fail2ban-client status | grep &amp;quot; Jail list:&amp;quot; | sed &#039;s/`- Jail list://g&#039; | sed &#039;s/,//g&#039;)&lt;br /&gt;
 for j in $JAILS&lt;br /&gt;
 do&lt;br /&gt;
 echo &amp;quot;$j $(fail2ban-client status $j | grep &amp;quot; Currently banned:&amp;quot; | sed &#039;s/   |- Currently banned:\t//g&#039;)&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 chmod 700 /root/checklist_ban&lt;br /&gt;
&lt;br /&gt;
to launch the script, do the following command:&lt;br /&gt;
 /root/checklist_ban&lt;br /&gt;
&lt;br /&gt;
=== Unban an IP ===&lt;br /&gt;
In certain case you would to unban an IP immediately because you don&#039;t want waste time to wait the  automatic IP unban process of fail2ban.&lt;br /&gt;
In first you you have to find the specific jail which has blocked you IP, you can refer to the mail that the admin user has received or you can list a specific jail.&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client status qpsmtpd&lt;br /&gt;
&lt;br /&gt;
 Status for the jail: qpsmtpd&lt;br /&gt;
 |- filter&lt;br /&gt;
 |  |- File list:	/var/log/qpsmtpd/current /var/log/sqpsmtpd/current &lt;br /&gt;
 |  |- Currently failed:	5&lt;br /&gt;
 |  `- Total failed:	119&lt;br /&gt;
 `- action&lt;br /&gt;
    |- Currently banned:	1&lt;br /&gt;
    |  `- IP list:	93.17.128.20 &lt;br /&gt;
    `- Total banned:	1&lt;br /&gt;
&lt;br /&gt;
If you want to know all you active jail, then do :&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client status&lt;br /&gt;
&lt;br /&gt;
Therefore you have to play with this command to unban your IP&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client set qpsmtpd unbanip 93.17.128.20 &lt;br /&gt;
&lt;br /&gt;
the generic command is :&lt;br /&gt;
&lt;br /&gt;
 fail2ban-client set JAIL unbanip MYIP&lt;br /&gt;
&lt;br /&gt;
===Jail.conf===&lt;br /&gt;
The jail.conf is templated (/etc/e-smith/templates/etc/fail2ban/jail.conf) and the default file contains the configuration as below. You can add your own template of jail.conf at &lt;br /&gt;
 /etc/e-smith/templates-custom/etc/fail2ban/jail.conf&lt;br /&gt;
if first time you need to create the folder for your custom template&lt;br /&gt;
 mkdir -p  /etc/e-smith/templates-custom/etc/fail2ban/jail.conf&lt;br /&gt;
&lt;br /&gt;
and do this to expland templates&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/rc.d/init.d/masq&lt;br /&gt;
 /etc/init.d/masq restart&lt;br /&gt;
 signal-event fail2ban-conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====default jail.conf====&lt;br /&gt;
 [DEFAULT]&lt;br /&gt;
 ignoreip = 127.0.0.0/8 192.168.XXX.XXX 192.168.XXX.0/24&lt;br /&gt;
 bantime  = 1800&lt;br /&gt;
 findtime  = 900&lt;br /&gt;
 maxretry = 3&lt;br /&gt;
 usedns = yes&lt;br /&gt;
 backend = auto&lt;br /&gt;
&lt;br /&gt;
{{Note box|msg=Your network and your server are in the list of ignored IP  by fail2ban (see IgnoreIP)}}&lt;br /&gt;
&lt;br /&gt;
 [ssh]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = sshd&lt;br /&gt;
 logpath  = /var/log/sshd/current&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;22&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;SSH&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [ssh-ddos]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = sshd-ddos&lt;br /&gt;
 logpath  = /var/log/sshd/current&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;22&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;SSH&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [qpsmtpd]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = qpsmtpd&lt;br /&gt;
 logpath  = /var/log/*qpsmtpd/current&lt;br /&gt;
 maxretry = 9&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;25,465&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Qpsmtpd&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-overflows]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-overflows&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (overflows)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-noscript]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-noscript&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (noscript)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-scan]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-scan&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (scan)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [http-auth]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = apache-auth&lt;br /&gt;
 logpath  = /var/log/httpd/error_log&lt;br /&gt;
 action   = smeserver-iptables[port=&amp;quot;80,443&amp;quot;,protocol=tcp,bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Apache (auth)&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [pam-generic]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = pam-generic&lt;br /&gt;
 logpath  = /var/log/secure&lt;br /&gt;
 maxretry = 6&lt;br /&gt;
 action   = smeserver-iptables[bantime=1800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;PAM generic&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
 [recidive]&lt;br /&gt;
 enabled  = true&lt;br /&gt;
 filter   = recidive&lt;br /&gt;
 logpath  = /var/log/fail2ban/daemon.log&lt;br /&gt;
 bantime  = 604800&lt;br /&gt;
 findtime = 86400&lt;br /&gt;
 maxretry = 5&lt;br /&gt;
 backend  = polling&lt;br /&gt;
 action   = smeserver-iptables[bantime=604800]&lt;br /&gt;
           smeserver-sendmail[name=&amp;quot;Recidive&amp;quot;,dest=root]&lt;br /&gt;
&lt;br /&gt;
====Custom local filters====&lt;br /&gt;
&lt;br /&gt;
You can add your custom rules by adding a filtername.local file in /etc/fail2ban/filters.d/&lt;br /&gt;
 wget https://bugs.koozali.org/attachment.cgi?id=6229 -O /etc/fail2ban/filters.d/apache-badbots.local&lt;br /&gt;
&lt;br /&gt;
would be an example of local bad bots rules, be careful to test for your personal case. Some advanced rules could create a lot of false positive and lock out your users.&lt;br /&gt;
&lt;br /&gt;
== Uninstall ==&lt;br /&gt;
 yum remove smeserver-fail2ban fail2ban&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==User contributions==&lt;br /&gt;
=== Testing new regex ===&lt;br /&gt;
You can test new regex - notes from here http://bugs.contribs.org/show_bug.cgi?id=8955&lt;br /&gt;
&lt;br /&gt;
 fail2ban-regex [LOG] [REGEX]&lt;br /&gt;
&lt;br /&gt;
You can also test the actual conf files as follows&lt;br /&gt;
&lt;br /&gt;
 fail2ban-regex /var/log/qpsmtpd/current /etc/fail2ban/filter.d/qpsmtpd.conf&lt;br /&gt;
&lt;br /&gt;
Note that some characters such as ` may need escaping on the command line like this \` but do not need escaping in the conf files&lt;br /&gt;
&lt;br /&gt;
e.g From qpsmptd.conf file this works in the conf file&lt;br /&gt;
&lt;br /&gt;
 ^\s*\d+\s*logging::logterse plugin \(deny\): ` &amp;lt;HOST&amp;gt;\s*.*90\d.*msg denied before queued$&lt;br /&gt;
&lt;br /&gt;
However, on the command line it needs writing like this&lt;br /&gt;
&lt;br /&gt;
 ^\s*\d+\s*logging::logterse plugin \(deny\): \` &amp;lt;HOST&amp;gt;\s*.*90\d.*msg denied before queued$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show IPs banned by service===&lt;br /&gt;
====Check the fail2ban log====&lt;br /&gt;
Here is another quick script that shows you the most recent IPs banned in the logs. Note that they may have been unbanned but there is no check for this.&lt;br /&gt;
 mkdir /root/bin&lt;br /&gt;
 nano -w /root/bin/IP_list.sh&lt;br /&gt;
&lt;br /&gt;
and copy and paste the below code into the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # Set CLI vars to something we can read&lt;br /&gt;
 TYPE=$1&lt;br /&gt;
 LOG=$2&lt;br /&gt;
 &lt;br /&gt;
 # Set main grep string&lt;br /&gt;
 SEARCH=&amp;quot;Ban ((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Add the search term&lt;br /&gt;
 SEARCH=&amp;quot;\[$TYPE]\ $SEARCH&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Now search the log&lt;br /&gt;
 grep -oE &amp;quot;\[$TYPE\] Ban ((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])&amp;quot; $LOG&lt;br /&gt;
&lt;br /&gt;
Save the file and make it executable:&lt;br /&gt;
 chmod 755 /root/bin/IP_list.sh&lt;br /&gt;
&lt;br /&gt;
Usage : &lt;br /&gt;
 IP_list.sh [service] [log]&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
 IP_list.sh qpsmtpd /var/log/fail2ban/daemon.log&lt;br /&gt;
====Check the fail2ban banned IP for all active jails ====&lt;br /&gt;
by [[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]])&lt;br /&gt;
 mkdir /root/bin&lt;br /&gt;
 vim /root/bin/sfail2ban&lt;br /&gt;
&lt;br /&gt;
paste this in it:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 for SERVI in $(fail2ban-client status|grep &#039;Jail list&#039;|cut -d&#039;:&#039; -f2|sed &#039;s/, / /g&#039;| sed -e &#039;s/^[ \t]*//&#039;)&lt;br /&gt;
 do&lt;br /&gt;
 fail2ban-client status $SERVI |grep -E &#039;IP list|Status for the jail&#039;|sed &#039;N;s/\n/:/&#039;|cut -d: -f2,4&lt;br /&gt;
 done&lt;br /&gt;
then do &lt;br /&gt;
 chmod 755 /root/bin/sfail2ban&lt;br /&gt;
&lt;br /&gt;
Usage :&lt;br /&gt;
 sfail2ban&lt;br /&gt;
output:&lt;br /&gt;
 # sfail2ban&lt;br /&gt;
 ftp:	 &lt;br /&gt;
 imap:	 &lt;br /&gt;
 pam-generic:	 &lt;br /&gt;
 qpsmtpd:	 &lt;br /&gt;
 recidive:	141.98.80.15&lt;br /&gt;
 ssh:	&lt;br /&gt;
 ssh-ddos:	&lt;br /&gt;
 wordpress:	&lt;br /&gt;
&lt;br /&gt;
====Print a summary of the fail2ban db====&lt;br /&gt;
 mkdir -p /root/bin&lt;br /&gt;
 vi /root/bin/bansummary.sh&lt;br /&gt;
&lt;br /&gt;
Paste this&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
      echo -e \&lt;br /&gt;
      &amp;quot;IP             \t&amp;quot;\&lt;br /&gt;
      &amp;quot;BanTime             \t&amp;quot;\&lt;br /&gt;
      &amp;quot;UnbanTime           \t&amp;quot;\&lt;br /&gt;
      &amp;quot;Jail&amp;quot;&lt;br /&gt;
      &lt;br /&gt;
      for ban in $(db fail2ban show |awk -F\= &#039; $2==&amp;quot;ban&amp;quot; {print $1}&#039;); &lt;br /&gt;
        do&lt;br /&gt;
          IP=$(db fail2ban getprop $ban Host)&lt;br /&gt;
          Bantime=$(date +&amp;quot;%F %T&amp;quot; -d @$(db fail2ban getprop $ban BanTimestamp))&lt;br /&gt;
          UnBanTime=$(date +&amp;quot;%F %T&amp;quot; -d @$(db fail2ban getprop $ban UnbanTimestamp))&lt;br /&gt;
          LastJail=$(zgrep -H &amp;quot;Ban $IP&amp;quot; $(find /var/log/fail2ban -type f -ctime -7) |tail -1 |awk &#039;{print $6}&#039;) &lt;br /&gt;
      &lt;br /&gt;
          printf &amp;quot;%-15s&amp;quot; &amp;quot;$IP&amp;quot;&lt;br /&gt;
          echo -e &amp;quot;\t$Bantime\t$UnBanTime\t$LastJail&amp;quot;&lt;br /&gt;
        done&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
save, then make executable&lt;br /&gt;
 chmod 755 /root/bin/bansummary.sh&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 bansummary.sh&lt;br /&gt;
Output:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;IP             	BanTime             	UnbanTime           	Jail&lt;br /&gt;
      46.246.39.228  	2017-09-09 18:45:00	2017-09-10 18:45:00	[http-scan]&lt;br /&gt;
      124.239.180.102	2017-09-09 12:07:32	2017-09-10 12:07:32	[http-scan]&lt;br /&gt;
      212.237.54.93  	2017-09-09 19:27:32	2017-09-10 19:27:32	[http-scan]&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===WordPress===&lt;br /&gt;
Fail2Ban works with WordPress but needs some extra configuration. Please review the WordPress page, https://wiki.contribs.org/Wordpress#Fail2Ban&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]&lt;br /&gt;
and select the smeserver-fail2ban component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-fail2ban|title=this link}}. &lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component=smeserver-fail2ban|noresultsmessage=No open bugs found.}} &lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
Only released version in smecontrib are listed here.&lt;br /&gt;
&lt;br /&gt;
{{#smechangelog: smeserver-fail2ban}}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Contrib]]&lt;br /&gt;
[[Category: Security]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Qpsmtpd&amp;diff=89</id>
		<title>SMEServer Qpsmtpd</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Qpsmtpd&amp;diff=89"/>
		<updated>2026-01-10T07:01:52Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Qpsmtpd/sme11  {{WIP box|this is a work in progress for the new SME 11 qpsmtpd configuration}}  TODO: update Email#qpsmtpd for SME11  =qpsmtpd= qpsmtpd has been a core component of SME Server since SME 7, providing advanced spam fighting capabilities.  SME Server 9.2 introduced qpsmtpd 0.96 with several new capabilities.  At the same time, smeserver-qpsmtpd has been updated to provide additional SME Server c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Qpsmtpd/sme11&lt;br /&gt;
&lt;br /&gt;
{{WIP box|this is a work in progress for the new SME 11 qpsmtpd configuration}}&lt;br /&gt;
&lt;br /&gt;
TODO: update [[Email#qpsmtpd]] for SME11&lt;br /&gt;
&lt;br /&gt;
=qpsmtpd=&lt;br /&gt;
[[Wikipedia:Qpsmtpd|qpsmtpd]] has been a core component of SME Server since SME 7, providing advanced spam fighting capabilities.&lt;br /&gt;
&lt;br /&gt;
SME Server 9.2 introduced qpsmtpd 0.96 with several new capabilities.  At the same time, smeserver-qpsmtpd has been updated to provide additional SME Server configuration options.&lt;br /&gt;
&lt;br /&gt;
SME Server 10 start moving the services to systemd.&lt;br /&gt;
&lt;br /&gt;
SME Server 11 will upgrade to qpsmtpd 1.0. At the same time, smeserver-qpsmtpd has been updated providing separate configuration for each running deamons and introducing a third running deamon now covering all usual SMTP ports 25 (qpsmtpd), 587 (new uqpsmtpd) and 465 (sqpsmtpd). Also SME11 provides a full systemd implementaiton of the services without runit. Softlimit has been increased from 50MB to 150MB.&lt;br /&gt;
&lt;br /&gt;
==Systemd Configuration ==&lt;br /&gt;
Some of the setting that were previously arranged using runit run script and multiple called script are all now present in systemd unit, with a dropin file to override default. The dropin file is templated&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
# /usr/lib/systemd/system/uqpsmtpd.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=qpsmtpd on submission port&lt;br /&gt;
After=network.target network-online.target qpsmtpd.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=simple&lt;br /&gt;
LimitDATA=150000000&lt;br /&gt;
LimitSTACK=150000000&lt;br /&gt;
LimitMEMLOCK=150000000&lt;br /&gt;
Environment=PORT=587 INSTANCES=40 INSTANCES_PER_IP=5 QPSMTPD_CONFIG=/var/service/uqpsmtpd/config PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=me&lt;br /&gt;
WorkingDirectory=/var/service/qpsmtpd/&lt;br /&gt;
&lt;br /&gt;
ExecStartPre=/sbin/e-smith/service-status uqpsmtpd&lt;br /&gt;
ExecStartPre=/sbin/e-smith/systemd/qpsmtpd-init %N&lt;br /&gt;
ExecStart=/usr/bin/qpsmtpd-forkserver \&lt;br /&gt;
        -u qpsmtpd \&lt;br /&gt;
        -l 0.0.0.0 \&lt;br /&gt;
        -p $PORT \&lt;br /&gt;
        -c $INSTANCES \&lt;br /&gt;
        -m $INSTANCES_PER_IP&lt;br /&gt;
ExecReload=/bin/kill -HUP $MAINPID&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=20s&lt;br /&gt;
SyslogIdentifier=uqpsmtpd&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=sme-server.target&lt;br /&gt;
&lt;br /&gt;
# /usr/lib/systemd/system/uqpsmtpd.service.d/50koozali.conf&lt;br /&gt;
#------------------------------------------------------------&lt;br /&gt;
#              !!DO NOT MODIFY THIS FILE!!&lt;br /&gt;
# &lt;br /&gt;
# Manual changes will be lost when this file is regenerated.&lt;br /&gt;
#&lt;br /&gt;
# Please read the developer&#039;s guide, which is available&lt;br /&gt;
# at http://www.contribs.org/development/&lt;br /&gt;
#&lt;br /&gt;
# Copyright (C) 1999-2006 Mitel Networks Corporation&lt;br /&gt;
#------------------------------------------------------------&lt;br /&gt;
[Service]&lt;br /&gt;
LimitDATA=150000000&lt;br /&gt;
LimitSTACK=150000000&lt;br /&gt;
LimitMEMLOCK=150000000&lt;br /&gt;
Environment=&lt;br /&gt;
Environment=QPSMTPD_CONFIG=/var/service/uqpsmtpd/config PORT=587 INSTANCES=10 INSTANCES_PER_IP=5 PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=sme11.example.com&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Services folders==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/var/service/qpsmtpd&lt;br /&gt;
/var/service/qpsmtpd/config&lt;br /&gt;
/var/service/qpsmtpd/config/dkim&lt;br /&gt;
/var/service/qpsmtpd/config/peers&lt;br /&gt;
/var/service/qpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl&lt;br /&gt;
/var/service/sqpsmtpd&lt;br /&gt;
/var/service/sqpsmtpd/supervise&lt;br /&gt;
/var/service/sqpsmtpd/config&lt;br /&gt;
/var/service/sqpsmtpd/config/dkim -&amp;gt; ../../qpsmtpd/config/dkim&lt;br /&gt;
/var/service/sqpsmtpd/config/peers&lt;br /&gt;
/var/service/sqpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl -&amp;gt; ../qpsmtpd/ssl&lt;br /&gt;
/var/service/uqpsmtpd&lt;br /&gt;
/var/service/uqpsmtpd/config&lt;br /&gt;
/var/service/uqpsmtpd/config/dkim -&amp;gt; ../../qpsmtpd/config/dkim&lt;br /&gt;
/var/service/uqpsmtpd/config/peers&lt;br /&gt;
/var/service/uqpsmtpd/peers&lt;br /&gt;
/var/service/qpsmtpd/ssl -&amp;gt; ../qpsmtpd/ssl&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Properties in configuration db==&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
x: use the value of qpsmtpd key property for this key too.&lt;br /&gt;
!property&lt;br /&gt;
!qpsmtpd&lt;br /&gt;
! sqpsmtpd&lt;br /&gt;
!uqpsmtpd&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|Authentication&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Bcc&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BccMode&lt;br /&gt;
|cc&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BccUser&lt;br /&gt;
|maillog&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DNSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Instances&lt;br /&gt;
|40&lt;br /&gt;
|10&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|InstancesPerIP&lt;br /&gt;
|5&lt;br /&gt;
|5&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LogLevel&lt;br /&gt;
|6&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxScannerSize&lt;br /&gt;
|25000000&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|0&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PatternsScan&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Proxy&lt;br /&gt;
|blocked&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RBLList&lt;br /&gt;
|bl.spamcop.net,dnsbl-1.uceprotect.net,dnsbl-2.uceprotect.net,psbl.surriel.com,zen.spamhaus.org&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RHSBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RelayRequiresAuth&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SoftLimit&lt;br /&gt;
|150000000&lt;br /&gt;
|150000000&lt;br /&gt;
|150000000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SBLList&lt;br /&gt;
|multi.surbl.org,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TCPPort&lt;br /&gt;
|25&lt;br /&gt;
|465&lt;br /&gt;
|587&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TCPProxyPort&lt;br /&gt;
|25&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TlsBeforeAuth&lt;br /&gt;
|1&lt;br /&gt;
|1 (hardcoded)&lt;br /&gt;
|1 (hardcoded)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|UBLList&lt;br /&gt;
|multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|URIBL&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|VirusScan&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|public&lt;br /&gt;
|public&lt;br /&gt;
|public&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|qplogsumm&lt;br /&gt;
|disabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|enabled&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|KarmaNegative&lt;br /&gt;
|(2)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|KarmaStrikes&lt;br /&gt;
|(3)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|HeloPolicy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(lenient)[lenient | rfc | strict]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaximumDateOffset&lt;br /&gt;
|(0)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxLoad&lt;br /&gt;
|(7)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SPFRejectPolicy&lt;br /&gt;
|(0)[0-4]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DMARCReject&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(disabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DMARCReporting&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(enabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|disclaimer&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;(disabled)[enabled|disabled]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Config files==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+template: is templated individually ; metadata: use another template via a metadata file.&lt;br /&gt;
!config file&lt;br /&gt;
!qpsmtpd&lt;br /&gt;
!sqpsmtpd&lt;br /&gt;
!uqpsmtpd&lt;br /&gt;
!plugin&lt;br /&gt;
!related properties&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|badhelo&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|helo&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|badmailfrom&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badmailfrom&lt;br /&gt;
badmailfromto&lt;br /&gt;
&lt;br /&gt;
badrcptto&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|badrcptto&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badrcptto&lt;br /&gt;
check_goodrcptto&lt;br /&gt;
|&lt;br /&gt;
|fixed output&lt;br /&gt;
|-&lt;br /&gt;
|badrcptto_ext&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|badrcptto&lt;br /&gt;
|&lt;br /&gt;
|hide emails  when db accounts setprop ACCOUNT Visible internal&lt;br /&gt;
|-&lt;br /&gt;
|dkim&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|not in use&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl_allow&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|dnsbl&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|dnsbl&lt;br /&gt;
per_user_config&lt;br /&gt;
|$qpsmtpd{RBLList}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|forcespamcheck&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|forcespamcheck&lt;br /&gt;
|&lt;br /&gt;
|empty file, plugin set in peers&lt;br /&gt;
|-&lt;br /&gt;
|goodrcptto&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|check_goodrcptto&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|invalid_resolvable_fromhost&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|resolvable_fromhost&lt;br /&gt;
|&lt;br /&gt;
|fixed output&lt;br /&gt;
|-&lt;br /&gt;
|IP&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|IP for tcpserver to bind to , 0 for all, fixed to 0&lt;br /&gt;
|-&lt;br /&gt;
|loglevel&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|logterse (...)&lt;br /&gt;
|$qpsmtpd{LogLevel}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|memory_threshold&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed to 1&lt;br /&gt;
|-&lt;br /&gt;
|norelayclients&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|relay&lt;br /&gt;
|&lt;br /&gt;
|$GatewayIP if set&lt;br /&gt;
|-&lt;br /&gt;
|peers&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|folder&lt;br /&gt;
|peers&lt;br /&gt;
|&lt;br /&gt;
|see peers section&lt;br /&gt;
|-&lt;br /&gt;
|plugin_dirs&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed output /usr/share/qpsmtpd/plugins&lt;br /&gt;
|-&lt;br /&gt;
|plugins&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|has a copy of peers fragments, hidden by metadata&lt;br /&gt;
|-&lt;br /&gt;
|relayclients&lt;br /&gt;
|template&lt;br /&gt;
|&#039;&#039;&#039;metadata : to remove?&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;metadata: to remove?&#039;&#039;&#039;&lt;br /&gt;
|greylisting&lt;br /&gt;
relay&lt;br /&gt;
&lt;br /&gt;
spamassassin&lt;br /&gt;
|&lt;br /&gt;
|IP allowed for relay without auth&lt;br /&gt;
|-&lt;br /&gt;
|rhsbl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|rhsbl&lt;br /&gt;
|$qpsmtpd{SBLList}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|signatures_patterns&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|uses db mailpatterns&lt;br /&gt;
|-&lt;br /&gt;
|smtpgreeting&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{Greeting}&lt;br /&gt;
|default to host.domain&lt;br /&gt;
|-&lt;br /&gt;
|spool_dir&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|fixed output /var/spool/qpsmtpd&lt;br /&gt;
|-&lt;br /&gt;
|spool_perms&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|file, do not alter&lt;br /&gt;
|-&lt;br /&gt;
|subject_prefix&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$spamassassin{Subject}&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|timeout&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{timeout}&lt;br /&gt;
|120 as default&lt;br /&gt;
|-&lt;br /&gt;
|timeoutsmtpd&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{timeoutsmtpd}&lt;br /&gt;
|120 as default&lt;br /&gt;
|-&lt;br /&gt;
|tls_before_auth&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{TlsBeforeAuth}&lt;br /&gt;
|hardcoded for uqpsmtpd and sqpsmtpd&lt;br /&gt;
|-&lt;br /&gt;
|tls_ciphers&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|tls&lt;br /&gt;
|$qpsmtpd{TlsBeforeAuth}&lt;br /&gt;
$sqpsmtpd{TlsBeforeAuth}&lt;br /&gt;
&lt;br /&gt;
$uqpsmtpd{TlsBeforeAuth}&lt;br /&gt;
|sqpsmtpd default to uqpsmtpd&lt;br /&gt;
global default is $modSSL{CipherSuite} &lt;br /&gt;
|-&lt;br /&gt;
|tls_protocols&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|template&lt;br /&gt;
|tls&lt;br /&gt;
|SSLv2, SLv3, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3&lt;br /&gt;
|TLS1.2 minimum for uqpsmtpd and sqpsmtpd&lt;br /&gt;
TLS1.1 minimum for qpsmtpd&lt;br /&gt;
&lt;br /&gt;
properties are set individually for each service&lt;br /&gt;
|-&lt;br /&gt;
|uribl_zones&lt;br /&gt;
|template&lt;br /&gt;
|metadata&lt;br /&gt;
|metadata&lt;br /&gt;
|&lt;br /&gt;
|$qpsmtpd{UBLList}&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Peer plugin configuration==&lt;br /&gt;
SME Server uses a plugin call peers, that set the plugins used depending on the client IP, i.e. 2 configurations are presents one for LAN and another for WAN.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
X for not present/overriden&lt;br /&gt;
!plugin&lt;br /&gt;
!config&lt;br /&gt;
!qp local&lt;br /&gt;
!qp 0&lt;br /&gt;
!sqp /uqp&lt;br /&gt;
local&lt;br /&gt;
!sqp/uqp&lt;br /&gt;
0&lt;br /&gt;
!TODO&lt;br /&gt;
|-&lt;br /&gt;
|00setup&lt;br /&gt;
|set bounce_unknown_user&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|02logterse&lt;br /&gt;
|logging/logterse&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|04tls&lt;br /&gt;
|tls ssl/cert.pem ssl/cert.pem ssl/cert.pem ssl/dhparam.pem&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|05auth_cvm_unix_local&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|To remove&lt;br /&gt;
|-&lt;br /&gt;
|06auth_imap&lt;br /&gt;
|auth/auth_imap 127.0.0.1 143&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|09karma&lt;br /&gt;
|karma negative $negative strikes $strikes reject naughty db_dir /var/lib/qpsmtpd/karma&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|enabled by default ?&lt;br /&gt;
|-&lt;br /&gt;
|10earlytalker&lt;br /&gt;
|earlytalker&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;add wait and check-at [ CONNECT | DATA ] options&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11bogus_bounce&lt;br /&gt;
|bogus_bounce&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|12count_unrecognized_commands&lt;br /&gt;
|count_unrecognized_commands 4&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|13bcc&lt;br /&gt;
|bcc mode $qpsmtpd{BccMode}  all $user&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|add possibility to set direction (all/incoming/outgoing)&lt;br /&gt;
|-&lt;br /&gt;
|14relay&lt;br /&gt;
|relay&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|should we remove from  465 and 581 or set RELAY ONLY ? &lt;br /&gt;
|-&lt;br /&gt;
|15helo&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;helo policy { $qpsmtpd{HeloPolicy} || &#039;lenient&#039; } reject naughty&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|16resolvable_fromhost&lt;br /&gt;
|resolvable_fromhost&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|17headers&lt;br /&gt;
|headers future $days past $days&amp;quot; if ($days)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|19loadcheck&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;loadcheck max_load { $qpsmtpd{MaxLoad} || &#039;7&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|20rhsbl&lt;br /&gt;
|rhsbl&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|221spf&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;sender_permitted_from reject 1 no_dmarc_policy { $qpsmtpd{SPFRejectPolicy} || &#039;0&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|change default to 1&lt;br /&gt;
|-&lt;br /&gt;
|222dkim&lt;br /&gt;
|dkim reject 0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|223dmarc&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;marc reject { (( $qpsmtpd{DMARCReject} || &#039;disabled&#039; ) =~ m/^1|on|enabled|yes$/) ? &#039;1&#039; : &#039;0&#039; } reporting { (( $qpsmtpd{DMARCReporting} || &#039;enabled&#039; ) =~ m/^1|on|enabled|yes$/) ? &#039;1&#039; : &#039;0&#039; }&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|22dnsbl&lt;br /&gt;
|dnsbl reject naughty&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|23naughty&lt;br /&gt;
|naughty reject mail&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|24uribl&lt;br /&gt;
|uribl action deny&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|30badmailfrom&lt;br /&gt;
|badmailfrom&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|34badrcptto&lt;br /&gt;
|badrcptto&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|34badrcptto_ext&lt;br /&gt;
|badrcptto more_badrcptto badrcptto_ext&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|37check_smtp_forward&lt;br /&gt;
|check_smtp_forward&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|needed for submission ?&lt;br /&gt;
|-&lt;br /&gt;
|38check_goodrcptto&lt;br /&gt;
|check_goodrcptto extn -&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|39rcpt_ok&lt;br /&gt;
|rcpt_ok&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|62pattern_filter&lt;br /&gt;
|virus/pattern_filter check=patterns action=deny&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|62tnef2mime&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|65disclaimer&lt;br /&gt;
|disclaimer&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|missing disclaimer_file definition?&lt;br /&gt;
|-&lt;br /&gt;
|70spamassassin&lt;br /&gt;
|spamassassin reject $spamassassin{RejectLevel} munge_subject_threshold $spamassassin{TagLevel} size_limit $spamassassin{MaxMessageSize}&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|71forcespamcheck&lt;br /&gt;
|forcespamcheck reject $spamassassin{RejectLevel} munge_subject_threshold $spamassassin{TagLevel} size_limit $spamassassin{MaxMessageSize}&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|80clamav&lt;br /&gt;
|virus/clamdscan scan_all yes clamd_socket /run/clamd/clamd.socket defer_on_error yes max_size $max_size&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|90queue-qmail-queue&lt;br /&gt;
|queue/qmail-queue&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|also content commented to remove ?&lt;br /&gt;
|-&lt;br /&gt;
|90queue-smtp-forward&lt;br /&gt;
|# commented out&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Upgrade Considerations==&lt;br /&gt;
we used check_badcountries for a while, but could we switch back to ident/geoip ?&lt;br /&gt;
&lt;br /&gt;
whitelist plugin :  adding the ip-range whitelist; add login of ip &lt;br /&gt;
&lt;br /&gt;
===A-Record DNSBL Services===&lt;br /&gt;
:Some DNSBL services - notably b.barracudacentral.org - provide their results using a DNS &amp;quot;A&amp;quot; record instead of a DNS TXT record.  The dnsbl plugin requires these services to include a colon (&amp;quot;:&amp;quot;) in dnsbl_zones - however, SME used to use a colon the server separator in the configuration database.  In order to support these A-Record DNSBL services, the separator for RBLList, SBLList, and the new UBLList is now a comma.&lt;br /&gt;
&lt;br /&gt;
:You can now configure b.barracudacentral.org using (note the single quotes):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;config setprop qpsmtpd RBLList server1,server2,&#039;b.barracudacentral.org:Blocked - see &amp;lt;http://bbl.barracudacentral.com/q.cgi?ip=%IP%&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DKIM &amp;amp; DMARC===&lt;br /&gt;
:DKIM &amp;amp; DMARC are now supported natively by SME Server.  To enable these you will need to configure appropriate DNS records in your public DNS server.&lt;br /&gt;
:There are forum reports of problems for users who had DKIM enabled using the DKIM contrib.&lt;br /&gt;
===URIBL===&lt;br /&gt;
:qpsmtpd now supports URIBL - the ability to block emails that contain known malicious URLs within the body of the email.  This service is disabled by default.&lt;br /&gt;
&lt;br /&gt;
:Enable URIBL with the default services using:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;config setprop qpsmtpd URIBL enabled&lt;br /&gt;
  signal-event email-update&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Note:&#039;&#039;&#039; If your SME server is using high traffic external DNS forwarders like [https://developers.google.com/speed/public-dns/ google] (8.8.8.8 / 8.8.4.4), [https://www.opendns.com/setupguide/ opendns] (208.67.222.222 / 208.67.220.220), or any large ISP&#039;s (Cox, Comcast, Verizon), enabling URIBL may block all incoming email.  This will only affect you if you have configured a DNS forwarder in server-manager -- a default SME server installation does its own direct DNS lookups and would not be affected unless you receive over 250,000 emails per day.&lt;br /&gt;
&lt;br /&gt;
:Read more at http://uribl.com/refused.shtml&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Naughty&amp;quot; plugin===&lt;br /&gt;
:SME Server is now using the &#039;naughty&#039; plugin which allows early plugins like dnsbl, earlytalker, etc to indicate that the email should be rejected at a later point in the interaction.  This allows the server to log extra information for denied emails.  Specifically, emails denied by dnsbl will now show the sender and recipient email addresses in the qpsmtpd log&lt;br /&gt;
&lt;br /&gt;
==Plugins==&lt;br /&gt;
&lt;br /&gt;
Below is a list of all the plugins from /usr/share/qpsmtpd/plugins on a freshly updated SME 9.2 server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:2;-moz-column-count:2;-webkit-column-count:2; border:1px solid grey;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;+  New in SME 11&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*  Improved or changed in SME 9.2&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;U  Unused (by default) in SME Server&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;E  Extra / External Configuration Required&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;CW  Contrib or Wiki page exists that uses this plugin&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;SM Can be configured using server-manager&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;DB Can be configured using db variables&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;X Provided by a contrib, not in qpsmtpd git&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;AC Auto-configured by SME Server&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
*[[Qpsmtpd:auth/auth_checkpassword|auth/auth_checkpassword]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_cvm_unix_local|auth/auth_cvm_unix_local]] (AC)&lt;br /&gt;
*[[Qpsmtpd:auth/authdeny|auth/authdeny]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_flat_file|auth/auth_flat_file]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_imap|auth/auth_imap]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_ldap_bind|auth/auth_ldap_bind]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmail|auth/auth_vpopmail]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmaild|auth/auth_vpopmaild]] (U)&lt;br /&gt;
*[[Qpsmtpd:auth/auth_vpopmail_sql|auth/auth_vpopmail_sql]] (U)&lt;br /&gt;
*[[Qpsmtpd:autowhitelist_relayrcpt|autowhitelist_relayrcpt]] (U)&lt;br /&gt;
*[[Qpsmtpd:badmailfrom|badmailfrom]]&lt;br /&gt;
*[[Qpsmtpd:badmailfromto|badmailfromto]] (U)&lt;br /&gt;
*[[Qpsmtpd:badrcptto|badrcptto]] (AC)&lt;br /&gt;
*[[Qpsmtpd:bcc|bcc]] (U DB)&lt;br /&gt;
*[[Qpsmtpd:bogus_bounce|bogus_bounce]] (DB)&lt;br /&gt;
*check_badcountries (X [[GeoIP|CW]])&lt;br /&gt;
*[[Qpsmtpd:check_goodrcptto|check_goodrcptto]] (AC)&lt;br /&gt;
*[[Qpsmtpd:check_smtp_forward|check_smtp_forward]] (AC)&lt;br /&gt;
*[[Qpsmtpd_connection_time|connection_time]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:content_log|content_log]] (U)&lt;br /&gt;
*[[Qpsmtpd:count_unrecognized_commands|count_unrecognized_commands]] (DB)&lt;br /&gt;
*[[Qpsmtpd:denysoft_multi_rcpt|denysoft_multi_rcpt]] (U)&lt;br /&gt;
*[[Email#How_do_I_enable_and_configure_a_disclaimer_in_email_messages|disclaimer]] (U DB CW)&lt;br /&gt;
*[[Qpsmtpd:dkim|dkim]] (+ DB E)&lt;br /&gt;
*[[Qpsmtpd:dkim_sign|dkim_sign]] (+ DB E)&lt;br /&gt;
*[[Qpsmtpd:dmarc|dmarc]] (DB E)&lt;br /&gt;
*[[Email#Real-time_Blackhole_List_.28RBL.29|dnsbl]] (* DB CW)&lt;br /&gt;
*[[Qpsmtpd:dns_whitelist_soft|dns_whitelist_soft]] (U)&lt;br /&gt;
*[[Qpsmtpd:domainkeys|domainkeys]]&lt;br /&gt;
*[[Qpsmtpd:dont_require_anglebrackets|dont_require_anglebrackets]] (U)&lt;br /&gt;
*[[Qpsmtpd:dspam|dspam]] (U)&lt;br /&gt;
*[[Qpsmtpd_check_earlytalker|earlytalker]] (AC [[Qpsmtpd check earlytalker|CW]])&lt;br /&gt;
*[[Qpsmtpd:exe_filter|exe_filter]] (U AC)&lt;br /&gt;
*[[Qpsmtpd:fcrdns|fcrdns]] (U)&lt;br /&gt;
*[[Qpsmtpd:fix_headers_case|fix_headers_case]] (U CW)&lt;br /&gt;
*[[greylisting]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:handler|handler]] (U)&lt;br /&gt;
*[[Qpsmtpd:headers|headers]] (*)&lt;br /&gt;
*[[Qpsmtpd:helo|helo]] (AC)&lt;br /&gt;
*[[Qpsmtpd:help|help]] (U)&lt;br /&gt;
*[[Qpsmtpd:hosts_allow|hosts_allow]] (AC)&lt;br /&gt;
*[[Qpsmtpd:http_config|http_config]] (U)&lt;br /&gt;
*[[Qpsmtpd:ident/geoip|ident/geoip]] (U)&lt;br /&gt;
*[[Qpsmtpd:ident/p0f|ident/p0f]] (U)&lt;br /&gt;
*[[Qpsmtpd:karma|karma]] (+ U DB)&lt;br /&gt;
*[[Qpsmtpd:karma_tool|karma_tool]]&lt;br /&gt;
*[[Qpsmtpd:loadcheck|loadcheck]] (+)&lt;br /&gt;
*[[Qpsmtpd:logging|logging]] (AC)&lt;br /&gt;
*[[Qpsmtpd:loop|loop]] (U)&lt;br /&gt;
*[[Qpsmtpd:milter|milter]] (U)&lt;br /&gt;
*[[Qpsmtpd:naughty|naughty]] ()&lt;br /&gt;
*[[Qpsmtpd:noop_counter|noop_counter]] (U)&lt;br /&gt;
*[[Qpsmtpd:parse_addr_withhelo|parse_addr_withhelo]] (U)&lt;br /&gt;
*[[Qpsmtpd:peers|peers]] (AC)&lt;br /&gt;
*[[Qpsmtpd:per_user_config|per_user_config]] (U CW)&lt;br /&gt;
*[[Qpsmtpd:qmail_deliverable|qmail_deliverable]] (U)&lt;br /&gt;
*[[Qpsmtpd:queue|queue]] (AC)&lt;br /&gt;
*[[Qpsmtpd:quit_fortune|quit_fortune]] (U)&lt;br /&gt;
*[[Qpsmtpd:random_error|random_error]] (U)&lt;br /&gt;
*[[Qpsmtpd:rcpt_map|rcpt_map]] (U)&lt;br /&gt;
*[[Qpsmtpd:rcpt_ok|rcpt_ok]] (AC)&lt;br /&gt;
*[[Qpsmtpd:rcpt_regexp|rcpt_regexp]] (U)&lt;br /&gt;
*[[Qpsmtpd:registry.txt|registry.txt]] (U)&lt;br /&gt;
*[[Qpsmtpd:relay|relay]] (AC)&lt;br /&gt;
*[[Qpsmtpd:resolvable_fromhost|resolvable_fromhost]] (AC)&lt;br /&gt;
*[[Email#Real-time_Blackhole_List_.28RBL.29|rhsbl]] (* DB CW)&lt;br /&gt;
*[[Qpsmtpd:sender_permitted_from|sender_permitted_from]] (?)&lt;br /&gt;
*[[Email#Spamassassin|spamassassin]] (DB SM AC CW)&lt;br /&gt;
*[[Qpsmtpd:stunnel|stunnel]] (U)&lt;br /&gt;
*[[Qpsmtpd:tls|tls]] (AC)&lt;br /&gt;
*[[Qpsmtpd:tls_cert|tls_cert]]&lt;br /&gt;
*[[Qpsmtpd:tnef2mime|tnef2mime]] (AC)&lt;br /&gt;
*[[Qpsmtpd:uribl|uribl]] (DB)&lt;br /&gt;
*[[Qpsmtpd:user_config|user_config]] (U)&lt;br /&gt;
*[[Virus:Email_Attachment_Blocking|virus]] (DB SM CW)&lt;br /&gt;
*[[Qpsmtpd:whitelist|whitelist]] (U?)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Qpsmtpd]]&lt;br /&gt;
[[Category:SME11-Development]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Useful&amp;diff=88</id>
		<title>SMEServer Useful</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Useful&amp;diff=88"/>
		<updated>2026-01-10T06:58:29Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Useful_Commands  {{usefulnote}} ==SME Server locale== By default the sme server 8 locale is ISO-8859-1ldapsear   ==ACL==  ===See ACL===  getfacl /path/2/files/or/folders  ===set ACL===  setfacl -P -R -m u:apache:rwX,d:u:apache:rwX /path/2/files/or/folders  -R : recursive&amp;lt;br /&amp;gt;  -P : physical, follow symlinks  ==Apache Related Commands== ===Apache options to ibay=== ====Expand &amp;lt;b&amp;gt;httpd.conf&amp;lt;/b&amp;gt; template====   expand-template /etc/http...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Useful_Commands&lt;br /&gt;
&lt;br /&gt;
{{usefulnote}}&lt;br /&gt;
==SME Server locale==&lt;br /&gt;
By default the sme server 8 locale is ISO-8859-1ldapsear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ACL==&lt;br /&gt;
&lt;br /&gt;
===See ACL===&lt;br /&gt;
 getfacl /path/2/files/or/folders&lt;br /&gt;
&lt;br /&gt;
===set ACL===&lt;br /&gt;
 setfacl -P -R -m u:apache:rwX,d:u:apache:rwX /path/2/files/or/folders&lt;br /&gt;
&lt;br /&gt;
-R : recursive&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-P : physical, follow symlinks&lt;br /&gt;
&lt;br /&gt;
==Apache Related Commands==&lt;br /&gt;
===Apache options to ibay===&lt;br /&gt;
====Expand &amp;lt;b&amp;gt;httpd.conf&amp;lt;/b&amp;gt; template====&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
 sv h /service/httpd-e-smith&lt;br /&gt;
or&lt;br /&gt;
 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
 /usr/bin/sv h /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
====Restart httpd====&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
or &lt;br /&gt;
 sv t /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
=====SME10=====&lt;br /&gt;
How do I start, restart, stop, reload and check the status of a service (httpd-e-smith.service) with systemd.&lt;br /&gt;
&lt;br /&gt;
 # systemctl start httpd-e-smith.service&lt;br /&gt;
 # systemctl restart httpd-e-smith.service&lt;br /&gt;
 # systemctl stop httpd-e-smith.service&lt;br /&gt;
 # systemctl reload httpd-e-smith.service&lt;br /&gt;
 # systemctl status httpd-e-smith.service&lt;br /&gt;
&lt;br /&gt;
====Enable AllowOverride All/None====&lt;br /&gt;
leave Apache reads the distributed configuration file &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;.htaccess&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; per ibay:&lt;br /&gt;
 db accounts setprop IBAYNAME AllowOverride All&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME AllowOverride&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====enable Symlinks in that iBay====&lt;br /&gt;
 db accounts setprop IBAYNAME FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME FollowSymLinks&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====disable apache directory indexes per ibay====&lt;br /&gt;
 db accounts setprop IBAYNAME Indexes disabled&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
if you want to remove&lt;br /&gt;
 db accounts delprop IBAYNAME Indexes&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====PHPBaseDir per ibay====&lt;br /&gt;
the phpbasedir is a &amp;quot;php-jail&amp;quot;, if you want that it uses its normal jail and allow it to use also /tmp then :&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop IBAYNAME PHPBaseDir /home/e-smith/files/ibays/IBAYNAME/:/tmp/&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
====Allow PHP URL File Open per ibay====&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make custom httpd directory if not exist&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Create the template name &amp;lt;b&amp;gt;99allow_url_fopen&amp;lt;/b&amp;gt; and put the content&lt;br /&gt;
 &amp;lt;Directory /home/e-smith/files/ibays/IBAYNAME/html&amp;gt;&lt;br /&gt;
 php_admin_flag allow_url_fopen on&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
Save the file&lt;br /&gt;
&lt;br /&gt;
Expand&lt;br /&gt;
 expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Restart httpd.&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
&lt;br /&gt;
====Allow PHP URL File Open====&lt;br /&gt;
&lt;br /&gt;
This is set with a db command.&lt;br /&gt;
Use the command here&lt;br /&gt;
 http://wiki.contribs.org/DB_Variables_Configuration#Php&lt;br /&gt;
and replace the variable and value&lt;br /&gt;
eg&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop php AllowUrlFopen On&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
&lt;br /&gt;
====PHP document root====&lt;br /&gt;
 $_SERVER[&#039;DOCUMENT_ROOT&#039;]&lt;br /&gt;
If you set up an application in an ibay you may have some odd results due to the usage of $_SERVER[&#039;DOCUMENT_ROOT&#039;] by the application.&lt;br /&gt;
By default this is set in php.ini to :&lt;br /&gt;
&lt;br /&gt;
 /home/e-smith/files/ibays/Primary/html&lt;br /&gt;
&lt;br /&gt;
How to overcome $_SERVER[&#039;DOCUMENT_ROOT&#039;] issues in ibays see [[PHP_document_root]]&lt;br /&gt;
&lt;br /&gt;
====PHP settings only for SME9====&lt;br /&gt;
{{Tip box|msg=These settings modify only the behaviour of one ibay and not at all the whole php settings for the server. Only for sme9, see [[bugzilla:8239]]}}&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop ibayname variable value&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
&lt;br /&gt;
 AllowUrlFopen : enabled/disabled&lt;br /&gt;
 MemoryLimit : set a M as unit, eg 64M&lt;br /&gt;
 UpMaxFileSize : set a M as unit, eg 64M&lt;br /&gt;
 PostMaxSize : set a M as unit, eg 64M&lt;br /&gt;
 MaxExecTime: unlimited or set time in second without units, eg 60&lt;br /&gt;
&lt;br /&gt;
====PHPinfo====&lt;br /&gt;
PHPinfo will provide an overview of all PHP related settings. A quick way to get an overview or search for a setting, one could use:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; | less&lt;br /&gt;
or to save to a text file:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; &amp;gt; phpinfo.txt&lt;br /&gt;
or to search for specific values and save to a text file:&lt;br /&gt;
 php -r &amp;quot;phpinfo();&amp;quot; | grep mysql &amp;gt; phpmysql.txt&lt;br /&gt;
&lt;br /&gt;
===https forced redirection using custom template===&lt;br /&gt;
see [[Https_redirection]]&lt;br /&gt;
&lt;br /&gt;
If it does not already exist then create the following directory&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts&lt;br /&gt;
&lt;br /&gt;
 cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts&lt;br /&gt;
&lt;br /&gt;
 nano 60redir-ibayname1&lt;br /&gt;
&lt;br /&gt;
Paste or type the following code including the brackets, replacing ibayname with the name of your ibay&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 if ($port ne &amp;quot;443&amp;quot;)&lt;br /&gt;
 {&lt;br /&gt;
 $OUT .= &amp;lt;&amp;lt;&#039;HERE&#039;;&lt;br /&gt;
 ## Redirect Web Address to Secure Address&lt;br /&gt;
 RewriteEngine on&lt;br /&gt;
 RewriteRule ^/ibayname https://%{HTTP_HOST}/ibayname&lt;br /&gt;
 &lt;br /&gt;
 ## End Of Redirect&lt;br /&gt;
 HERE&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Save the file &amp;amp; exit by Ctrl+x&lt;br /&gt;
&lt;br /&gt;
 /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/httpd restart&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
===Debug the Mount of a remote workstation Share===&lt;br /&gt;
In the case of you have errors when you mount a remote cifs share (used by the panel &#039;backup or restore&#039;, you can experiment by just running the two commands from the command line (replace $host $share $mountdir appropriately)&lt;br /&gt;
 /bin/mount -t cifs &amp;quot;//$host/$share&amp;quot; $mountdir -o credentials=/etc/dar/CIFScredentials,nounix&lt;br /&gt;
 /bin/mountpoint  $mountdir&lt;br /&gt;
&lt;br /&gt;
For example :&lt;br /&gt;
 /bin/mount -t cifs  &amp;quot;//192.168.xx.xx/backup-sme&amp;quot; /mnt/smb -o credentials=/etc/dar/CIFScredentials,nounix&lt;br /&gt;
 /bin/mountpoint /mnt/smb/&lt;br /&gt;
&lt;br /&gt;
===Launch Manually a backup===&lt;br /&gt;
* only for an usb_backup or a remote_backup&lt;br /&gt;
 /etc/e-smith/events/actions/workstation-backup-dar&lt;br /&gt;
&lt;br /&gt;
==Certificates==&lt;br /&gt;
see http://wiki.contribs.org/Certificates_Concepts&lt;br /&gt;
===How to change your certificate===&lt;br /&gt;
&lt;br /&gt;
Since SME version 7.1.3, the functionality to configure a Common Name in the certificate is included in the main SME packages and can be configured as follows:&lt;br /&gt;
&lt;br /&gt;
 config setprop modSSL CommonName www.domain.com&lt;br /&gt;
 expand-template /home/e-smith/ssl.crt/crt&lt;br /&gt;
 expand-template /home/e-smith/ssl.key/key&lt;br /&gt;
 signal-event domain-modify&lt;br /&gt;
 signal-event email-update &lt;br /&gt;
&lt;br /&gt;
see this forum thread [http://forums.contribs.org/index.php?topic=33109.15] and bug report [http://bugs.contribs.org/show_bug.cgi?id=1689]&lt;br /&gt;
&lt;br /&gt;
===How to set a different expiration time===&lt;br /&gt;
&lt;br /&gt;
The SME self signed certificate is valid for one year, and is automatically renewed on the anniversary of the installation date of the SME server OS.&lt;br /&gt;
To specify how long your SME certificate will last for, do the following: &lt;br /&gt;
&lt;br /&gt;
 cp /etc/e-smith/templates/home/e-smith/ssl.crt /etc/e-smith/templates-custom/home/e-smith/ssl.crt&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/home/e-smith/ssl.crt&lt;br /&gt;
&lt;br /&gt;
change the value for KEYLIFEINDAYS on the first line to the number of days the certificate will remain valid for eg 1826 for 5 years.&lt;br /&gt;
&lt;br /&gt;
Save &amp;amp; exit by pressing the following keys at the same time&lt;br /&gt;
 ctrl o&lt;br /&gt;
 ctrl x&lt;br /&gt;
&lt;br /&gt;
Create a new self signed certificate, with the longer validity period. Replace the filenames below with the correct file/key names applicable to your server.&lt;br /&gt;
 rm /home/e-smith/ssl.crt/servername.domain.com.crt&lt;br /&gt;
 rm /home/e-smith/ssl.key/servername.domain.com.key&lt;br /&gt;
 rm /home/e-smith/ssl.pem/servername.domain.com.pem&lt;br /&gt;
 signal-event post-upgrade&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Install the new certificate into your browser. &lt;br /&gt;
&lt;br /&gt;
Also see http://wiki.contribs.org/Certificates_Concepts&lt;br /&gt;
&lt;br /&gt;
===How to simply recreate the certificate for SME Server===&lt;br /&gt;
&lt;br /&gt;
 rm /home/e-smith/ssl.{crt,key,pem}/*&lt;br /&gt;
 config delprop modSSL CommonName&lt;br /&gt;
 config delprop modSSL crt&lt;br /&gt;
 config delprop modSSL key&lt;br /&gt;
 signal-event post-upgrade&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
alternately&lt;br /&gt;
 config show modSSL&lt;br /&gt;
 config delprop modSSL crt key CertificateChainFile&lt;br /&gt;
 signal-event ssl-update&lt;br /&gt;
&lt;br /&gt;
==Command-Line Quick Reference Guide==&lt;br /&gt;
Below is a list of commands that I use all the time &amp;amp; tend to forget.&lt;br /&gt;
===Generic Linux===&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! COMMAND NAME !! DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| /usr/sbin/smbd -V || samba version&lt;br /&gt;
|-&lt;br /&gt;
| /usr/sbin/httpd -v || apache version&lt;br /&gt;
|-&lt;br /&gt;
| httpd -t || verify the syntax of the configuration file of apache&lt;br /&gt;
|-&lt;br /&gt;
| httpd -tf /path/to/config/file || verify the syntax of the specified configuration file of apache&lt;br /&gt;
|-&lt;br /&gt;
| httpd -t -D DUMP_MODULES || display all loaded modules of apache&lt;br /&gt;
|-&lt;br /&gt;
| mysql -v || mysql version&lt;br /&gt;
|-&lt;br /&gt;
| php -v ||  php version&lt;br /&gt;
|-&lt;br /&gt;
| du -sh /* || shows your folder sizes by directory in the root (you can adapt to your directory path) &lt;br /&gt;
|-&lt;br /&gt;
| df -h || shows disk usage in human readable form&lt;br /&gt;
|-&lt;br /&gt;
| man &amp;lt;commandname&amp;gt; || shows more info about a command&lt;br /&gt;
|-&lt;br /&gt;
| uname -a || kernel release version&lt;br /&gt;
|-&lt;br /&gt;
| mv || moves or renames a file&lt;br /&gt;
|-&lt;br /&gt;
| cp || copies or backup a file&lt;br /&gt;
|-&lt;br /&gt;
| rm || removes or deletes a file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;ps -aux|grep &amp;lt;process&amp;gt;&amp;lt;/nowiki&amp;gt; || outputs processes running &amp;lt;process&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ps -AH || report process status&lt;br /&gt;
|-&lt;br /&gt;
| ps fax || display processes by tree with their pid &lt;br /&gt;
|-&lt;br /&gt;
| top || shows processes&lt;br /&gt;
|-&lt;br /&gt;
| top -i ||  shows only active processes&lt;br /&gt;
|-&lt;br /&gt;
| htop  || shows processes (more versatile than top)&lt;br /&gt;
|-&lt;br /&gt;
| iptraf || shows network info&lt;br /&gt;
|-&lt;br /&gt;
| mc -d  || show midnight commander (cli file browser) to navigate through system easily&lt;br /&gt;
|-&lt;br /&gt;
| host -t mx aol.com || shows the mx records for aol.com&lt;br /&gt;
|-&lt;br /&gt;
| dig any aol.com || show all dns records for aol.com (you can choose the dns server by adding its IP or hostname : &#039;@8.8.4.4&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| net groupmap list || shows samba mappings to nt groups&lt;br /&gt;
|-&lt;br /&gt;
| telinit 1 || changes to single user mode&lt;br /&gt;
|-&lt;br /&gt;
| ifconfig || shows detailed info on ethernet ports&lt;br /&gt;
|-&lt;br /&gt;
| grep -nsr &amp;quot;casesensitivesearch&amp;quot; /path/to/dir || finds all documents containing the criteria in a dir (add &#039;i&#039; to the options for a non sensitive search)&lt;br /&gt;
|-&lt;br /&gt;
| grep -nsri server-manager.jpg  /etc/e-smith/ || search the file server-manager.jpg in the path directory /etc/e-smith&lt;br /&gt;
|-&lt;br /&gt;
| grep -P &#039;^www |apache&#039; /etc/group || search after patterns which start by www and/or apache in /etc/group&lt;br /&gt;
|-&lt;br /&gt;
| tail -f /var/log/&amp;lt;LOGFILE&amp;gt; || realtime viewing of your log file&lt;br /&gt;
|-&lt;br /&gt;
| tar -czvf foo.tar.gz foo || creates a tar/zip file of a directory&lt;br /&gt;
|-&lt;br /&gt;
| tar -xvzf foo.tar.gz || untar/unzip a tar/zip file&lt;br /&gt;
|-&lt;br /&gt;
| scp -P &amp;lt;ssh_portnumber&amp;gt; foo.tar.gz &amp;lt;user&amp;gt;@&amp;lt;other_server_ipaddress&amp;gt;:/opt || transfers file to another server in /opt directory&lt;br /&gt;
|-&lt;br /&gt;
| rsync --progress -te &amp;quot;ssh -p &amp;lt;ssh_portnumber&amp;gt;&amp;quot; foo &amp;lt;other_server_ipaddress&amp;gt;:/opt  || transfers file to another server&lt;br /&gt;
|-&lt;br /&gt;
| sed -i -e &amp;quot;s/foo/fee/g&amp;quot; &amp;lt;FILENAMEORPATHTODIR&amp;gt; || replaces foo with fee&lt;br /&gt;
|-&lt;br /&gt;
| sed &#039;/abba/Id&#039; file.txt || remove all &#039;&#039;&#039;lines&#039;&#039;&#039; with the string &#039;abba&#039; (case sensitive) in the file.txt&lt;br /&gt;
|-&lt;br /&gt;
| sed -n &#039;/^www/p&#039; /etc/group || print all line starting by www in the file /etc/group&lt;br /&gt;
|-&lt;br /&gt;
| watch mysqladmin process || shows the mysql processes running&lt;br /&gt;
|-&lt;br /&gt;
| lslbk &amp;lt;ONLY SME9&amp;gt;|| lsblk lists information about all available or the specified block devices. The lsblk command reads the sysfs filesystem to gather information. The command prints all block devices (except RAM disks) in a tree-like format by default.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;find . -type f | xargs rpm -qf | sort | uniq&amp;lt;/nowiki&amp;gt; || find from which rpm these files come from&lt;br /&gt;
|-&lt;br /&gt;
| who -r || see in which runlevel you are running (7 for sme8, 4 for sme9)&lt;br /&gt;
|-&lt;br /&gt;
| findmnt || findmnt will list all mounted filesytems or search for a filesystem.&lt;br /&gt;
|-&lt;br /&gt;
| pstree || pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted.&lt;br /&gt;
|-&lt;br /&gt;
| clamdtop || clamdtop is a tool to monitor one or multiple clamd(s), that shows the jobs in clamd’s queue, memory usage, and information about the loaded signature database.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Estimate file space usage - drill down into directories&lt;br /&gt;
 cd /&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
 cd /home&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
 cd /home/e-smith&lt;br /&gt;
 du --si --max-depth 1&lt;br /&gt;
&lt;br /&gt;
====UID/GID====&lt;br /&gt;
* see informations of a user&lt;br /&gt;
 id USER&lt;br /&gt;
*change the uid of a user&lt;br /&gt;
 usermod -u &#039;&#039;&#039;UID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
* create a group&lt;br /&gt;
 groupadd -g &#039;&#039;&#039;GID&#039;&#039;&#039; -o GROUPE_NAME&lt;br /&gt;
* modify the GID of a group&lt;br /&gt;
 groupmod -o -g &#039;&#039;&#039;GID&#039;&#039;&#039; GROUPE_NAME&lt;br /&gt;
* add a principal group to a user&lt;br /&gt;
 usermod -g &#039;&#039;&#039;GROUP_NAME_OR_GID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
* add a secondary group to a user&lt;br /&gt;
 usermod -a -G &#039;&#039;&#039;GROUP_NAME_OR_GID&#039;&#039;&#039; USER_NAME&lt;br /&gt;
&lt;br /&gt;
====usermod====&lt;br /&gt;
*change the home directory (-m move files/folders to the new location)&lt;br /&gt;
 usermod -d /var/lib/jdownloader jdownloader&lt;br /&gt;
* change the shell access of a user&lt;br /&gt;
 usermod --shell /bin/bash jdownloader&lt;br /&gt;
&lt;br /&gt;
====Read a TAI64N timestamp in human readable format====&lt;br /&gt;
[http://cr.yp.to/daemontools/tai64nlocal.html tai64nlocal] converts precise TAI64N timestamps to a human-readable format. &lt;br /&gt;
tai64nlocal reads lines from stdin. If a line does not begin with @, tai64nlocal writes it to stdout without change. If a line begins with @, tai64nlocal looks for a timestamp after the @, in the format printed by tai64n, and writes the line to stdout with the timestamp converted to local time in ISO format: YYYY-MM-DD HH:MM:SS.SSSSSSSSS. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Eg&lt;br /&gt;
 cat  /var/log/qpsmtpd/current |tai64nlocal|less&lt;br /&gt;
Or&lt;br /&gt;
 tailf /var/log/sshd/current | tai64nlocal&lt;br /&gt;
&lt;br /&gt;
====adjust the ntp time====&lt;br /&gt;
if you want to set the correct time via ntpd without restarting the server&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in a root terminal&lt;br /&gt;
 /etc/init.d/ntpd stop&lt;br /&gt;
 ntpdate pool.ntp.org&lt;br /&gt;
 /etc/init.d/ntpd start&lt;br /&gt;
and to verify&lt;br /&gt;
 date&lt;br /&gt;
&lt;br /&gt;
====create missing group and set gid====&lt;br /&gt;
If a specific sme group or linux group is missing, you can create it again. see [[bugzilla:7932#c48]]&lt;br /&gt;
 groupadd -g 102 -o apache&lt;br /&gt;
 rpm --setugids --setperms rpm1 rpm2&lt;br /&gt;
&lt;br /&gt;
where 102 is the correct gid of apache group, adapt it to the right setting&lt;br /&gt;
where rpm1 and rpm2 are valid rpm but broken due to the lack of apache group during installation or upgrade&lt;br /&gt;
&lt;br /&gt;
if the group apache exists but with the wrong gid (example 48) you can set the 102 gid&lt;br /&gt;
&lt;br /&gt;
 groupmod -o -g 102 apache&lt;br /&gt;
&lt;br /&gt;
====display what are your network interfaces====&lt;br /&gt;
 # perl -Mesmith::ethernet -e &amp;quot;print esmith::ethernet::probeAdapters();&amp;quot;&lt;br /&gt;
 EthernetDriver1	e1000	08:00:27:23:85:a6	&amp;quot;Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)&amp;quot;&lt;br /&gt;
alternatively, and only for SME9 or greater, you can use&lt;br /&gt;
 # ip addr&lt;br /&gt;
 1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN &lt;br /&gt;
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;br /&gt;
    inet 127.0.0.1/8 scope host lo&lt;br /&gt;
 2: eth0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000&lt;br /&gt;
    link/ether AA:BB:CC:DD:EE:FF brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 11.22.22.44/XY brd 11.22.33.255 scope global eth0&lt;br /&gt;
 3: dummy0: &amp;lt;BROADCAST,NOARP,UP,LOWER_UP&amp;gt; mtu 1500 qdisc noqueue state UNKNOWN &lt;br /&gt;
    link/ether 10:00:01:02:03:04 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 192.168.45.1/24 brd 192.168.45.255 scope global dummy0&lt;br /&gt;
&lt;br /&gt;
====find files by their size====&lt;br /&gt;
it could be useful to find large file by the command line &lt;br /&gt;
&lt;br /&gt;
 find /home/e-smith -type f -size +200&#039;&#039;&#039;M&#039;&#039;&#039; -exec ls -lh {} \; | awk &#039;{ print $ &amp;quot;:_&amp;quot; $5 }&#039;;&lt;br /&gt;
&lt;br /&gt;
use &lt;br /&gt;
 ‘k’    for Kilobytes (units of 1024 bytes)&lt;br /&gt;
 ‘M’    for Megabytes (units of 1048576 bytes)&lt;br /&gt;
 ‘G’    for Gigabytes (units of 1073741824 bytes)&lt;br /&gt;
&lt;br /&gt;
====reduce root&#039;s user reserved space====&lt;br /&gt;
as a default, 5% of the disk space is allocated to root user&lt;br /&gt;
&lt;br /&gt;
you can reduce the allocated space to 1% with (for LVM)&lt;br /&gt;
&lt;br /&gt;
 tune2fs -m 1 /dev/mapper/main-root&lt;br /&gt;
&lt;br /&gt;
if you&#039;re not using LVM, use &lt;br /&gt;
&lt;br /&gt;
 df -h&lt;br /&gt;
&lt;br /&gt;
to see where / is mounted&lt;br /&gt;
&lt;br /&gt;
====find files by the Name====&lt;br /&gt;
 find ~/smeserver/ -name &#039;e-smith-backup-2.4.0*&#039;&lt;br /&gt;
or use (updatedb is launched every night)&lt;br /&gt;
 updatedb&lt;br /&gt;
 locate e-smith-backup-2.4.0&lt;br /&gt;
&lt;br /&gt;
====how much mail data per user is stored on the server====&lt;br /&gt;
&lt;br /&gt;
You can adapt that command line to your needs, here we can see the used disk spaceof  all emails stored by your users on your SME Server.&lt;br /&gt;
 du -s /home/e-smith/files/users/*/Maildir | sort -rn | cut -f2- | xargs -d &amp;quot;\n&amp;quot; du -sh&lt;br /&gt;
&lt;br /&gt;
====Replace a chain of characters====&lt;br /&gt;
Replace a chain of characters chaine1 by chaine2 in all files of the current directory with &#039;.txt&#039;&lt;br /&gt;
&lt;br /&gt;
 find . -name &amp;quot;*.txt&amp;quot; -type f -exec sed -i &amp;quot;s/chaine1/chaine2/g&amp;quot; {} \;&lt;br /&gt;
&lt;br /&gt;
====Check file system in case of corruption====&lt;br /&gt;
&lt;br /&gt;
If your filesystem is corrupted. That can be a hardware failure, or a software corruption (after a crash). The server won&#039;t boot before you manually run fsck to check/repair the filesystem. Note that this might not be possible if the problem is comming from hardware failure (hope you have backups....).&lt;br /&gt;
&lt;br /&gt;
Try this:&lt;br /&gt;
- when you&#039;re prompted to, enter the root password, you&#039;ll be dropped on a shell&lt;br /&gt;
- manually run fsck&lt;br /&gt;
&lt;br /&gt;
 e2fsck -D -tt -y /dev/main/root&lt;br /&gt;
&lt;br /&gt;
It can take several minutes/hours depending on the size of your drives and their speed. With some luck, the filesystem will be cleaned, and you&#039;ll be able to boot.&lt;br /&gt;
&lt;br /&gt;
====Adding notes/comments to shell commands====&lt;br /&gt;
You can add comments to shell commands without interrupting the functionality of the shell command. The comments will be appear in .bash_history which can be beneficial for later analysis. e.g. Why was the the command given or who entered the command. Examples:&lt;br /&gt;
 cat /etc/redhat-release #johnd What version are we running&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd status disabled #maryc Disable ssh access ticket:#12345&lt;br /&gt;
&lt;br /&gt;
With (complex) grep arguments one would be able to search the bash history on different criteria. e.g. To find all shell commands given entered by mary that have something to do with ssh (example line above):&lt;br /&gt;
 cat /root/.bash_history | grep &amp;quot;#mary&amp;quot; | grep ssh&lt;br /&gt;
will return:&lt;br /&gt;
 config setprop sshd status disabled #maryc Disable ssh access ticket:#12345&lt;br /&gt;
&lt;br /&gt;
====Adding date and time to bash history====&lt;br /&gt;
By default the bash history does not show the date and time of any activity. You can enable this by entering the following command:&lt;br /&gt;
 HISTTIMEFORMAT=&amp;quot;%d/%m/%y %T &amp;quot;&lt;br /&gt;
where %d=day, %m is month, &amp;amp;y is year and %T is time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see the bash history with the date and time added, enter:&lt;br /&gt;
 history&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the history command can be useful in combination with added comments to shell commands for more precise analysis or (automatic) reporting based on a shell script and cron.&lt;br /&gt;
&lt;br /&gt;
====Find open ports====&lt;br /&gt;
&lt;br /&gt;
* netstat&lt;br /&gt;
 # netstat -anp|grep 5232&lt;br /&gt;
 tcp        0      0 192.168.12.233:5232         0.0.0.0:*                   LISTEN      2028/python&lt;br /&gt;
&lt;br /&gt;
* nmap&lt;br /&gt;
nmap can specify if a port is closed or not&lt;br /&gt;
 yum install nmap&lt;br /&gt;
 nmap localhost -p 5232&lt;br /&gt;
&lt;br /&gt;
===Raid===&lt;br /&gt;
You have a lot of interesting tutorial [http://wiki.contribs.org/Category:Administration:Storage concerning the Raid]&lt;br /&gt;
==== shows software raid performance ====&lt;br /&gt;
 hdparm -Tt /dev/mdX &lt;br /&gt;
&lt;br /&gt;
(where X is 0,1,2,etc) 	&lt;br /&gt;
&lt;br /&gt;
==== gives raid info ==== &lt;br /&gt;
 mdadm --detail /dev/mdX &lt;br /&gt;
&lt;br /&gt;
(where X is 0,1,2,etc)&lt;br /&gt;
&lt;br /&gt;
==== shows software raid ==== &lt;br /&gt;
 cat /proc/mdstat 	&lt;br /&gt;
&lt;br /&gt;
==== remove the degraded raid ====&lt;br /&gt;
when you install the smeserver with one drive and in a degraded raid, you will see a &#039;U_&#039; state but without warnings. If you want to leave just one &#039;U&#039;&lt;br /&gt;
 mdadm --grow /dev/md0 --force --raid-devices=1&lt;br /&gt;
 mdadm --grow /dev/md1 --force --raid-devices=1&lt;br /&gt;
&lt;br /&gt;
===RPM&#039;s===&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qa	 || shows all rpms installed&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qa --last || shows all rpms installed &amp;amp; installation date&lt;br /&gt;
|-&lt;br /&gt;
| rpm -q  || asks for rpm info&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qi  || asks for detailed rpm info&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qlv &amp;lt;packagename&amp;gt; || lists all files in a package&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qlvp &amp;lt;packagename.rpm&amp;gt; || List all files in a rpm which is not installed&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qf &amp;lt;filename&amp;gt; || reports what package a file belongs to&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qV &amp;lt;packagename&amp;gt; || reports if permission and ownership are OK&lt;br /&gt;
|-&lt;br /&gt;
| rpm -qRp &amp;lt;packagename.rpm&amp;gt; || Find what dependencies have a  rpm&lt;br /&gt;
|-&lt;br /&gt;
|  rpm -qR &amp;lt;packagename&amp;gt; || Find what dependencies have a package name&lt;br /&gt;
|-&lt;br /&gt;
| rpm -q --whatrequires &amp;lt;packagename&amp;gt; || find what packages have &amp;lt;packagename&amp;gt; as dependancy&lt;br /&gt;
|-&lt;br /&gt;
|rpm -e --test &amp;lt;packagename&amp;gt; || find what packages have &amp;lt;packagename&amp;gt; as dependancy (more verbose as above)&lt;br /&gt;
|-&lt;br /&gt;
| rpm -e --nodeps &amp;lt;packagename&amp;gt; || remove packagename without removing dependencies&lt;br /&gt;
|-&lt;br /&gt;
| rpm --setugids &amp;lt;packagename&amp;gt; || set right ownership to rpm&lt;br /&gt;
|-&lt;br /&gt;
| rpm --setperms &amp;lt;packagename&amp;gt; || set right permissions to rpm&lt;br /&gt;
|-&lt;br /&gt;
| rpm -e --noscripts &amp;lt;packagename&amp;gt; || remove packagename without executing sciptlets (%pre, %post, %preun, %postun)&lt;br /&gt;
|-&lt;br /&gt;
| rpm -Va ||  capture any damaged/incomplete rpms - but will also show lots of configuration files, which you of course expect to be modified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Find upstream rpms patched by contribs.org====&lt;br /&gt;
For the need of the distribution we ought to patch some upstream rpms, this is the list&lt;br /&gt;
 rpm -qa --qf &amp;quot;%{name} %{BuildHost}\n&amp;quot; | grep -P &#039;build64\-1|builder.koozali.org&#039; | awk &#039;{print $1}&#039; | grep -vP &#039;^smeserver|e\-smith&#039; | sort&lt;br /&gt;
&lt;br /&gt;
====Restore all permissions and ownership====&lt;br /&gt;
If you want to restore all permissions and right ownership of rpm, you can do this in a root terminal. See [[bugzilla:6851#c15]]&lt;br /&gt;
 for f in $(rpm -qa); do echo $f; rpm --setugids $f; done&lt;br /&gt;
 for f in $(rpm -qa); do echo $f; rpm --setperms $f; done&lt;br /&gt;
&lt;br /&gt;
===YUM&#039;ing and repositories===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| yum install &amp;lt;packagename&amp;gt; || installs packagename &amp;amp; any package it may need&lt;br /&gt;
|-&lt;br /&gt;
| yum remove &amp;lt;packagename&amp;gt; || removes packagename&lt;br /&gt;
|-&lt;br /&gt;
| yum history package-info &amp;lt;packagename&amp;gt; || Shows the installation/removal history of a package and it&#039;s Transaction ID [http://yum.baseurl.org/wiki/YumHistory see more commands]&lt;br /&gt;
|-&lt;br /&gt;
| yum history undo &amp;lt;Transaction ID&amp;gt; || Removes all packages from a specific Transaction ID [http://yum.baseurl.org/wiki/YumHistory see more commands]&lt;br /&gt;
|-&lt;br /&gt;
| yum list updates || list updates to any installed package&lt;br /&gt;
|-&lt;br /&gt;
| yum list available || list available packages in all repos not already installed&lt;br /&gt;
|-&lt;br /&gt;
| yum list available |grep &amp;lt;reponame&amp;gt; || list available packages -shows only from repo name&lt;br /&gt;
|-&lt;br /&gt;
| yum search &amp;lt;packagename&amp;gt;  || lists all packages in all repos matching packagename&lt;br /&gt;
|-&lt;br /&gt;
| yum clean all --enablerepo=* || Is used to clean up various things which accumulate in the yum cache (includes disabled repos) &lt;br /&gt;
|-&lt;br /&gt;
| yum --enablerepo=&amp;lt;reponame&amp;gt; &amp;lt;command&amp;gt; || enables a repo not normally enabled&lt;br /&gt;
|-&lt;br /&gt;
|  /sbin/e-smith/audittools/newrpms || shows all extra packages installed&lt;br /&gt;
|-&lt;br /&gt;
| /sbin/e-smith/audittools/repositories || show all repositories and if they are activated or not&lt;br /&gt;
|-&lt;br /&gt;
| db yum_repositories show &amp;lt;reponame&amp;gt; || show properties of the repository &amp;lt;reponame&amp;gt; &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Restoring Default Yum Repositories=====&lt;br /&gt;
&lt;br /&gt;
{{note box|If you have problems with your yum setup you may have entered incorrect repository values. Remove the current values and restore the original setting with these commands}}&lt;br /&gt;
&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
Now you have a clean install, you can re-add 3rd party repos as described above&lt;br /&gt;
&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
&lt;br /&gt;
and check if you can update your server&lt;br /&gt;
&lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
==LDAP==&lt;br /&gt;
===Show/Debug the state of LDAP===&lt;br /&gt;
about the DB settings&lt;br /&gt;
 db configuration show ldap&lt;br /&gt;
&lt;br /&gt;
about the service (see the pid and the output when manually you start the service)&lt;br /&gt;
 cd /service/ldap&lt;br /&gt;
 sv s .&lt;br /&gt;
 ./run&lt;br /&gt;
&lt;br /&gt;
See the ownership of LDAP database (must be owned ldap:ldap)&lt;br /&gt;
 ll /var/lib/ldap/&lt;br /&gt;
&lt;br /&gt;
===ldif-fix===&lt;br /&gt;
it just prints what changes are needed in the ldap tree. With -u instead of -d, those changes are applied&lt;br /&gt;
 /var/service/ldap/ldif-fix -d&lt;br /&gt;
&lt;br /&gt;
===Parse the ldap catalogue===&lt;br /&gt;
&lt;br /&gt;
you can use this command&lt;br /&gt;
 slapcat&lt;br /&gt;
or if you want to sort&lt;br /&gt;
 slapcat | grep -viP &#039;userPassword|sambaNTPassword|sambaLMPassword&#039;&lt;br /&gt;
&lt;br /&gt;
===namingContexts===&lt;br /&gt;
we can conduct a simple search of the naming context to see our directory information you can display &#039;dn&#039; LDAP parameters, either by the [[SME_Server:Documentation:Administration_Manual:Chapter13#Directory|server-manager]] or by the command line :&lt;br /&gt;
 ldapsearch -x -b &#039;&#039; -s base &#039;(objectclass=*)&#039; namingContexts&#039;&#039;&lt;br /&gt;
or you can do&lt;br /&gt;
 ldapsearch -x -h localhost -s base |grep &#039;dn&#039;&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
&lt;br /&gt;
 [root@sme9 ~]# ldapsearch -x -h localhost -s base |grep &#039;dn&#039;&lt;br /&gt;
 # base &amp;lt;dc=stephane,dc=dtdns,dc=net&amp;gt; (default) with scope baseObject&lt;br /&gt;
 # stephane.dtdns.net&lt;br /&gt;
 &#039;&#039;&#039;dn: dc=mycompany,dc=local&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Retrieve the ldap base====&lt;br /&gt;
in a template you can do&lt;br /&gt;
  baseDN = &amp;quot;ou=Users,{ esmith::util::ldapBase($DomainName); }&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
===request a listing of all entries===&lt;br /&gt;
The following LDAP search is requesting a listing of all entries starting from the base &amp;quot;dc=example,dc=local&amp;quot;. This should return all of the entries&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -x -b &#039;dc=mycompany,dc=local&#039; &#039;(objectclass=*)&#039;&lt;br /&gt;
&lt;br /&gt;
===Bind with a specific user on LDAP===&lt;br /&gt;
Try to connect to ldap with credentials of a specific user and see the LDAP catalogue. Find the &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;dc&#039;&#039;&#039;&#039; by the chapter [[Useful_Commands#namingContexts|above]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldapsearch -x -D uid=user2,ou=Users,dc=server1,dc=pt -W&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
 [root@sme9 ~]# ldapsearch -x -D uid=stephane,ou=Users,dc=mycompany,dc=local -W&lt;br /&gt;
&lt;br /&gt;
===Check a specific  user in LDAP catalogue===&lt;br /&gt;
display informations on the user requested. Find the &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;dc&#039;&#039;&#039;&#039; by the chapter [[Useful_Commands#namingContexts|above]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;for sme9&#039;&#039;&#039;&lt;br /&gt;
 ldapsearch -x -D cn=root,dc=server1,dc=pt -w $(cat /etc/pam_ldap.secret) -b ou=Users,dc=domain,dc=tld &amp;quot;uid=test2&amp;quot;&lt;br /&gt;
&#039;&#039;&#039;for sme8&#039;&#039;&#039;&lt;br /&gt;
  ldapsearch -x -D cn=root,dc=server1,dc=pt -w $(cat /etc/ldap.secret) -b ou=Users,dc=domain,dc=tld &amp;quot;uid=test2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* for example&lt;br /&gt;
&#039;&#039;&#039;for sme9&#039;&#039;&#039;&lt;br /&gt;
 ldapsearch -x -D cn=root,dc=mycompany,dc=local -w $(cat /etc/pam_ldap.secret) -b ou=Users,dc=mycompany,dc=local &amp;quot;uid=stephane&amp;quot;&lt;br /&gt;
&#039;&#039;&#039;for sme8&#039;&#039;&#039;&lt;br /&gt;
  ldapsearch -x -D cn=root,dc=mycompany,dc=local -w $(cat /etc/ldap.secret) -b ou=Users,dc=mycompany,dc=local &amp;quot;uid=stephane&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Retrieve the ldap password===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* directly in a terminal&lt;br /&gt;
 perl -Mesmith::util -e &#039;print esmith::util::LdapPassword();&#039;&lt;br /&gt;
* in a template&lt;br /&gt;
 my $pwd = esmith::util::LdapPassword();&lt;br /&gt;
&lt;br /&gt;
if you need to call the ldap password in a script you can invoke this bash variable&lt;br /&gt;
* for sme8&lt;br /&gt;
 PWD=$(cat /etc/ldap.secret)&lt;br /&gt;
* for sme9&lt;br /&gt;
 PWD=$(cat /etc/pam_ldap.secret)&lt;br /&gt;
&lt;br /&gt;
==Log==&lt;br /&gt;
===Parse Log files to search for errors===&lt;br /&gt;
When you want to test the SME Product it can be useful to see what it occurs.&lt;br /&gt;
This CL can help you, but you should read the entire log&lt;br /&gt;
 grep -iE &amp;quot;uninitialized|WARNING|ERROR&amp;quot; /var/log/messages&lt;br /&gt;
of course this is for the /var/log/messages&lt;br /&gt;
&lt;br /&gt;
or if you want to parse all log&lt;br /&gt;
 grep -iE &amp;quot;uninitialized|WARNING|ERROR&amp;quot; /var/log/*&lt;br /&gt;
&lt;br /&gt;
{{Note box| you have now a tool in your hand to parse logfile : [[Audit_Tools#logcheck]]. You should be aware that tool is here to help to find errors in the development side of the SME Server and thus you could have a lot of false positive}}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Parse log for hack / phishing for missing files&#039;&#039;&#039; ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
EXTIP=`curl -s ifconfig.me/ip`&lt;br /&gt;
grep &amp;quot;File does not exist&amp;quot; /var/log/httpd/error_log | sed -e &#039;s#\: /#\n#&#039; | grep &amp;quot;home&amp;quot; | sort -u | sed -e &amp;quot;s#$EXTIP#\&amp;lt;IP\&amp;gt;#g&amp;quot; &amp;gt; dict_err.txt&lt;br /&gt;
# grep &amp;quot;File does not exist&amp;quot; /var/log/httpd/admin_error_log | sed -e &#039;s#\: /#\n#&#039; | grep &amp;quot;home&amp;quot; | sort -u | sed -e &amp;quot;s#$EXTIP#\&amp;lt;IP\&amp;gt;#g&amp;quot; &amp;gt; dict_admin_err.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* verbose output&lt;br /&gt;
&lt;br /&gt;
 less  /var/log/messages| grep -iE &amp;quot;useless|uninitialized|warn|fail|error|disable|unable|exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* search all logs with verbose output&lt;br /&gt;
 less  /var/log/* | grep -iE &amp;quot;useless|uninitialized|warn|fail|error|disable|unable|exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Mail==&lt;br /&gt;
see [[Email]]&lt;br /&gt;
&lt;br /&gt;
===check blocked email address by the server===&lt;br /&gt;
 grep -i &#039;blocked email address&#039; /var/log/qpsmtpd/current&lt;br /&gt;
&lt;br /&gt;
===maximum email size===&lt;br /&gt;
[[Email#Set_max_email_size]]&lt;br /&gt;
&lt;br /&gt;
===Spam filter with Server-Manager===&lt;br /&gt;
Using the Server-Manager Configuration/E-Mail panel, adjust the settings to these reasonable defaults.&lt;br /&gt;
&lt;br /&gt;
*Virus scanning Enabled&lt;br /&gt;
*Spam filtering Enabled&lt;br /&gt;
*Spam sensitivity Custom&lt;br /&gt;
*Custom spam tagging level 4&lt;br /&gt;
*Custom spam rejection level 12&lt;br /&gt;
*Sort spam into junkmail folder Enabled&lt;br /&gt;
*Modify subject of spam messages Enabled&lt;br /&gt;
&lt;br /&gt;
===spam retention in junk mailbox===&lt;br /&gt;
The server will automatically delete old spam in the junkmail folders after 90 days. You can control the number of days old spam is kept with the following commands. Where 15 is the number of days you want to keep messages, do...&lt;br /&gt;
 db configuration setprop spamassassin MessageRetentionTime 15&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 svc -t /service/qpsmtpd&lt;br /&gt;
then&lt;br /&gt;
config show spamassassin&lt;br /&gt;
&lt;br /&gt;
===Mail Statistics===&lt;br /&gt;
&lt;br /&gt;
See [[Mailstats]] for details on the mailstats package.&lt;br /&gt;
&lt;br /&gt;
 yum install --enablerepo=smecontribs smeserver-mailstats&lt;br /&gt;
&lt;br /&gt;
===Whitelist and Blacklist===&lt;br /&gt;
If mail comes in and it is misclassified as spam by Spamasassin, you can add the sender to the Spamassassin whitelist so that future messages coming in from that sender are not filtered.&lt;br /&gt;
Conversely, you can add a spammer to the Spamassassin blacklist so you never see their spam again.&lt;br /&gt;
Add senders (or their entire domains) to the global whitelist (or blacklist) with commands similar to these (as root):&lt;br /&gt;
&lt;br /&gt;
 db spamassassin setprop wbl.global *@vonage.com White&lt;br /&gt;
 db spamassassin setprop wbl.global *domain2.com White&lt;br /&gt;
 db spamassassin setprop wbl.global user@domain3.com White&lt;br /&gt;
 db spamassassin setprop wbl.global spammer@spamdomain.com Black&lt;br /&gt;
&lt;br /&gt;
expland template and save the configuration to the database&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can view the lists with this command:&lt;br /&gt;
 db spamassassin show&lt;br /&gt;
&lt;br /&gt;
These lists can be also controlled by the server-manager with the wbl contrib http://wiki.contribs.org/Email_Whitelist-Blacklist_Control&lt;br /&gt;
&lt;br /&gt;
==MySQL==&lt;br /&gt;
There appears to be no password set for the MySQL root password, but this is not true.  If you are logged in to the SME Server shell a special mechanism is in place to log you in with MySQL root privileges without prompting you for the password.&lt;br /&gt;
&lt;br /&gt;
The MySQL root password for SME Server is a 72 character random string generated during installation of SME Server. You should never change the MySQL root password as this will break your SME Server configuration. How to login as MySQL root user? describes how to access MySQL with root privileges on SME Server.&lt;br /&gt;
&lt;br /&gt;
For more informations you can see the [[MySQL]] page&lt;br /&gt;
&lt;br /&gt;
===Login as MySQL root user===&lt;br /&gt;
To login as MySQL root user, simply type &#039;mysql&#039; at the SME Server shell, this will log you in with root privileges.&lt;br /&gt;
the mysql admin password is a random password generated which can be find&lt;br /&gt;
&lt;br /&gt;
*/root/.my.cnf&lt;br /&gt;
*/etc/ldap.secret for sme8 and /etc/pam_ldap.secret for sme9&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;do not modify these files.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* directly in a terminal&lt;br /&gt;
 perl -Mesmith::util -e &#039;print esmith::util::LdapPassword();&#039;&lt;br /&gt;
* in a template&lt;br /&gt;
 my $pwd = esmith::util::LdapPassword();&lt;br /&gt;
&lt;br /&gt;
if you need to call the mysql password in a script you can invoke this bash variable&lt;br /&gt;
* for sme8&lt;br /&gt;
 PWD=$(cat /etc/ldap.secret)&lt;br /&gt;
* for sme9&lt;br /&gt;
 PWD=$(cat /etc/pam_ldap.secret)&lt;br /&gt;
&lt;br /&gt;
===Create a Database and its User===&lt;br /&gt;
Create a new MySQL database (In this example the database name is databasename. Change &#039;&#039;&#039;databasename&#039;&#039;&#039;, &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; with your own choices as required)&lt;br /&gt;
&lt;br /&gt;
Login as root and issue the following command to enter the MySQL CLI and create the database:&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 create database &#039;&#039;&#039;databasename&#039;&#039;&#039;;&lt;br /&gt;
 grant all privileges on &#039;&#039;&#039;databasename&#039;&#039;&#039;.* to &#039;&#039;&#039;username&#039;&#039;&#039; identified by &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;password&#039;&#039;&#039;&#039;;&lt;br /&gt;
 flush privileges;&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
or directly from the shell or script:&lt;br /&gt;
&lt;br /&gt;
 mysql -e &amp;quot;create database &#039;&#039;&#039;databasename&#039;&#039;&#039;;&amp;quot;&lt;br /&gt;
 mysql -e &amp;quot;grant all privileges on &#039;&#039;&#039;databasename&#039;&#039;&#039;.* to &#039;&#039;&#039;username&#039;&#039;&#039; identified by &#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039;password&#039;&#039;&#039;&#039;;&amp;quot;&lt;br /&gt;
 mysql -e &amp;quot;flush privileges;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Remove a database===&lt;br /&gt;
Get access to the SME Server shell and MySQL and issue the following command:&lt;br /&gt;
&lt;br /&gt;
 drop database databasename;&lt;br /&gt;
or from the shell. Confirmation will be asked.&lt;br /&gt;
 mysqladmin drop databasename&lt;br /&gt;
Replace databasename with the name of the database.&lt;br /&gt;
&lt;br /&gt;
===Remove a user===&lt;br /&gt;
Get access to the SME Server shell and MySQL and issue the following command:&lt;br /&gt;
&lt;br /&gt;
 USE mysql;&lt;br /&gt;
 DELETE FROM user WHERE user = &#039;username&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
&lt;br /&gt;
Replace username with the username you wish to delete.&lt;br /&gt;
&lt;br /&gt;
{{Tip box|mysql_setpermission is a command line menu driven utility that can assist in MySQL administration.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Show databases directly from CLI===&lt;br /&gt;
&lt;br /&gt;
Directly in your Terminal you can see how much DB mysql you have.&lt;br /&gt;
&lt;br /&gt;
 mysqlshow&lt;br /&gt;
&lt;br /&gt;
 +--------------------+&lt;br /&gt;
 |     Databases      |&lt;br /&gt;
 +--------------------+&lt;br /&gt;
 | information_schema |&lt;br /&gt;
 | egroupware         |&lt;br /&gt;
 | horde              |&lt;br /&gt;
 | mysql              |&lt;br /&gt;
 | roundcube          |&lt;br /&gt;
 | test               |&lt;br /&gt;
 | wordpress          |&lt;br /&gt;
 +--------------------+&lt;br /&gt;
&lt;br /&gt;
===Other useful MySQL commands:===&lt;br /&gt;
* list all available database.&lt;br /&gt;
 show databases;&lt;br /&gt;
*display a list of the MySQL users&lt;br /&gt;
 SELECT user FROM mysql.user;&lt;br /&gt;
*remove the user jeffrey &lt;br /&gt;
 DROP USER &#039;jeffrey&#039;@&#039;localhost&#039;;&lt;br /&gt;
* list the privileges granted to the account user&lt;br /&gt;
 SHOW GRANTS FOR &#039;user&#039;@&#039;localhost&#039;;&lt;br /&gt;
* give all rights on all databases for new_dba user &lt;br /&gt;
 GRANT ALL PRIVILEGES ON *.* TO &#039;new_dba&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039; WITH GRANT OPTION;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
* give all rights on database for new_user &lt;br /&gt;
 GRANT SELECT, UPDATE, INSERT, DELETE ON database.* TO &#039;new_user&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
* will let you destroy a database. Use with care. Use &#039;mysqladmin --help&#039; for all available options.&lt;br /&gt;
 mysqladmin drop &#039;&#039;&#039;databasename&#039;&#039;&#039;;&lt;br /&gt;
* show you all &#039;&#039;&#039;table&#039;&#039;&#039; details of mysql &#039;&#039;&#039;database&#039;&#039;&#039;&lt;br /&gt;
 use database;&lt;br /&gt;
 show table status;&lt;br /&gt;
* let you see all &#039;&#039;&#039;tables&#039;&#039;&#039; of mysql &#039;&#039;&#039;database&#039;&#039;&#039;&lt;br /&gt;
 use database;&lt;br /&gt;
 show table status;&lt;br /&gt;
&lt;br /&gt;
==Password==&lt;br /&gt;
===Password strength===&lt;br /&gt;
&lt;br /&gt;
First a warning - Far too many systems out there have weak passwords and they will be broken into. Educating your users on the necessity of strong passwords is the best option. If that fails, here is how you change the password strength checking from &#039;strong&#039; to &#039;normal&#039;, which was the setting in previous versions of SME. Be careful to use the exact capitalization.&lt;br /&gt;
&lt;br /&gt;
 config setprop passwordstrength Admin normal&lt;br /&gt;
 config setprop passwordstrength Users normal&lt;br /&gt;
 config setprop passwordstrength Ibays normal&lt;br /&gt;
 &lt;br /&gt;
It is also possible, but strongly discouraged, to disable password strength checking by setting to &#039;none&#039; &lt;br /&gt;
&lt;br /&gt;
Password strength options are:&lt;br /&gt;
&lt;br /&gt;
 none         : Only checks if the password meets the minimum length requirement (default - 12 characters).&lt;br /&gt;
 normal       : Requires minimum length plus both uppercase and lowercase characters.&lt;br /&gt;
 intermediate : Requires minimum length, uppercase, lowercase, and passes a dictionary check.&lt;br /&gt;
 strong       : Requires all of intermediate&#039;s checks plus must contain numbers and special characters&lt;br /&gt;
&lt;br /&gt;
And password minimum length (which defaults to 12), can be set:&lt;br /&gt;
&lt;br /&gt;
 config setprop passwordstrength length &amp;lt;whatever&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change Password Users by the command line===&lt;br /&gt;
&lt;br /&gt;
If you want to change password to your users by the command Line instead of the user panel of SME Server you can do it like this.&lt;br /&gt;
&lt;br /&gt;
 perl -e &amp;quot;use esmith::util;esmith::util::setUserPassword( &#039;username&#039;, &#039;password&#039;);&amp;quot;;  /sbin/e-smith/signal-event  password-modify username&lt;br /&gt;
&lt;br /&gt;
run it for each user separately and replace&lt;br /&gt;
 username&lt;br /&gt;
and&lt;br /&gt;
 password&lt;br /&gt;
with the appropriate values for each of your users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For special characters note this bug regarding escaping [[bugzilla:8510]]&lt;br /&gt;
&lt;br /&gt;
Some examples :&lt;br /&gt;
&lt;br /&gt;
 perl -e &#039;use esmith::util;esmith::util::setUserPassword(&amp;quot;username&amp;quot;,&amp;quot;pass!word&amp;quot;);&#039;&lt;br /&gt;
&lt;br /&gt;
Or:&lt;br /&gt;
&lt;br /&gt;
 perl -e &amp;quot;use esmith::util;esmith::util::setUserPassword( &#039;username&#039;,&#039;pass&amp;quot;&#039;!&#039;&amp;quot;word&#039;);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Generating strong random password===&lt;br /&gt;
You can Install &#039;&#039;&#039;[[Random_Strong_Password_Generator|randpw]]&#039;&#039;&#039; else you can use manually the CL below&lt;br /&gt;
 &lt;br /&gt;
Security should not be taken lightly and password for e.g. databases, connections etc. need to be long and strong. One way of generating a strong random password is:&lt;br /&gt;
 &amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50};echo;&lt;br /&gt;
This will generate a 50 character long random password whereby the characters are selected from the above given string _A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?. The number 50 represents the length of the generated password and can be adjusted to fit your needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One could also store the generated password to a file or to a db key:&lt;br /&gt;
 &amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50} &amp;gt; mypassword.txt&lt;br /&gt;
 &lt;br /&gt;
 config set MyStrongPassword `&amp;lt; /dev/urandom tr -dc &#039;_A-Z-a-z-0-9!@+[](){}~&amp;lt;&amp;gt;*%^&amp;amp;#+=/$:;,?&#039; | head -c${1:-50};echo;`&lt;br /&gt;
Please note the usage of ` (the backtick character) which is not the same as the &#039; (single quote character)&lt;br /&gt;
&lt;br /&gt;
===Signalling events : Signal-event===&lt;br /&gt;
&lt;br /&gt;
The signal-event program takes an event name as an argument, and executes all of the actions in that event, providing the event name as the first parameter and directing all output to the system log. It works by listing the entries in the event directory and executing them in sequence. So for example, the command:&lt;br /&gt;
&lt;br /&gt;
 signal-event console-save&lt;br /&gt;
&lt;br /&gt;
will perform all the actions associated with the console-save event, which is defined by the contents of the /etc/e-smith/events/console-save/ directory. This is exactly what the console user interface does when you select save at the end of the console configuration wizard. &lt;br /&gt;
&lt;br /&gt;
[[SME_Server:Documentation:Developers_Manual:Chapter7#Standard_events_and_their_arguments| see all options]]&lt;br /&gt;
&lt;br /&gt;
==PHP Related Commands==&lt;br /&gt;
===Show current php settings===&lt;br /&gt;
&lt;br /&gt;
 config show php&lt;br /&gt;
&lt;br /&gt;
===Expand &amp;lt;b&amp;gt;php.ini&amp;lt;/b&amp;gt; template===&lt;br /&gt;
&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Configure &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;PHP Basedir&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; Restriction per ibay===&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop IBAYNAME PHPBaseDir DIR1:DIR2:DIRn&lt;br /&gt;
 signal-event ibay-modify IBAYNAME&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary:/tmp&lt;br /&gt;
 signal-event ibay-modify Primary&lt;br /&gt;
&lt;br /&gt;
===Execution Time===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php MaxExecutionTime ZZ&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;ZZ&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the time in seconds.&lt;br /&gt;
&lt;br /&gt;
===Memory Limit===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php MemoryLimit XXM&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;XX&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the amount of memory in Mb.&lt;br /&gt;
&lt;br /&gt;
===Upload Max File Size===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php UploadMaxFilesize WW&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WW&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the file size in Mb.&lt;br /&gt;
&lt;br /&gt;
===Post Maximum Size===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
 db configuration setprop php PostMaxSize  WW&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 /etc/init.d/httpd-e-smith restart&lt;br /&gt;
where &amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WW&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; is the file size in Mb.&lt;br /&gt;
&lt;br /&gt;
===Allow URL FOpen===&lt;br /&gt;
For SME9 exclusively see [[Useful_Commands#PHP_settings_only_for_SME9]]&amp;lt;br /&amp;gt;&lt;br /&gt;
Not secure. Instead use per ibay or directory.&lt;br /&gt;
&lt;br /&gt;
==SAMBA==&lt;br /&gt;
===shows samba mappings to nt groups===&lt;br /&gt;
   net groupmap list &lt;br /&gt;
===manage the SAM database(Database of Samba Users)=== &lt;br /&gt;
The pdbedit program is used to manage the users accounts stored in the sam database and can only be run by root.&lt;br /&gt;
 pdbedit -u USER -v&lt;br /&gt;
for example&lt;br /&gt;
 pdbedit -u stephane -v&lt;br /&gt;
&lt;br /&gt;
===check an smb.conf configuration===&lt;br /&gt;
testparm - check an smb.conf configuration file for internal correctness&lt;br /&gt;
 testparm -vs&lt;br /&gt;
&lt;br /&gt;
===The Trust Relationship Failure===&lt;br /&gt;
Using Samba 3 sometimes some Windows computers fall off the domain, resulting in a trust relationship failure.&lt;br /&gt;
&lt;br /&gt;
    The trust relationship between this workstation and the primary domain failed.&lt;br /&gt;
&lt;br /&gt;
This is generally caused by mis-matched work-station and domain controller account passwords. To reset this you must un-join/re-join the domain.&lt;br /&gt;
&lt;br /&gt;
===enable samba audit logs for ibays===&lt;br /&gt;
Samba audit logging can be enabled for ibays using db variables.&lt;br /&gt;
&lt;br /&gt;
Samba activity is logged in /var/log/samba/samba_audit&lt;br /&gt;
&lt;br /&gt;
To enable audit logging for an ibay named &amp;quot;fileshare&amp;quot;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;db accounts setprop fileshare Audit enabled&lt;br /&gt;
 signal-event ibay-modify fileshare&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable audit logging for every ibay on your server:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;for ibay in $(db accounts show |grep \=ibay |cut -d= -f1); do db accounts setprop $ibay Audit enabled; done&lt;br /&gt;
 signal-event ibay-modify&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The details of what gets logged are controlled by /etc/e-smith/templates/etc/smb.conf/ibays/10smbaudit&lt;br /&gt;
&lt;br /&gt;
==SME Server specific==&lt;br /&gt;
=== Command Line===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command !! Explanation&lt;br /&gt;
|-&lt;br /&gt;
| signal-event post-upgrade || performs SME Server to go regenerate all templates&lt;br /&gt;
|-&lt;br /&gt;
| signal-event reboot || reboots the server&lt;br /&gt;
|-&lt;br /&gt;
| signal-event &amp;lt;event&amp;gt; || performs SME Server to go regenerate event template &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| signal-event console-save || Expands templates and reconfigures services which can be changed from the text-mode console and which do not require a reboot&lt;br /&gt;
|-&lt;br /&gt;
| signal-event dns-update || refreshes the DNS cache, useful for when you know a domain has changed IP and the TTL is too long to wait&lt;br /&gt;
|-&lt;br /&gt;
| /etc/e-smith/events/actions/navigation-conf || recreates server-manager navigation panel&lt;br /&gt;
|-&lt;br /&gt;
| config show || display the internal configuration of the server&lt;br /&gt;
|-&lt;br /&gt;
| config show &amp;lt;service name&amp;gt; || show the service configuration &#039;&#039;&#039;(you may use TAB to auto-complete your command line)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| db || shows the syntax of the db command&lt;br /&gt;
|-&lt;br /&gt;
| db configuration show || shows the entire server configuration&lt;br /&gt;
|-&lt;br /&gt;
| db configuration setprop &amp;lt;record&amp;gt; &amp;lt;property&amp;gt; &amp;lt;value&amp;gt; || sets or changes a property in the configuration database&lt;br /&gt;
|-&lt;br /&gt;
| db accounts show || shows all account details&lt;br /&gt;
|-&lt;br /&gt;
| db accounts show &amp;lt;accountname&amp;gt; || shows the account details&lt;br /&gt;
|-&lt;br /&gt;
| /etc/e-smith/events/actions/initialize-default-databases|| action for initializing the default database values&lt;br /&gt;
|}&lt;br /&gt;
===Refresh DNS cache===&lt;br /&gt;
&lt;br /&gt;
 signal-event dns-update 	&lt;br /&gt;
&lt;br /&gt;
refreshes the DNS cache, useful for when you know a domain has changed IP and the TTL is too long to wait &lt;br /&gt;
&lt;br /&gt;
===Refresh Squid Cache===&lt;br /&gt;
Extracted from: http://forums.contribs.org/index.php?topic=38848.msg176737#msg176737&lt;br /&gt;
&lt;br /&gt;
===Flush and Restart===&lt;br /&gt;
&lt;br /&gt;
 sv d /service/squid&lt;br /&gt;
 echo &amp;quot;&amp;quot; &amp;gt; /var/spool/squid/swap.state&lt;br /&gt;
 sv u /service/squid&lt;br /&gt;
&lt;br /&gt;
&amp;amp; to check it&#039;s running&lt;br /&gt;
 sv s /service/squid&lt;br /&gt;
===SystemConfig===&lt;br /&gt;
Some relative Informations to your system are recorded in the configuration database&lt;br /&gt;
 config show sysconfig&lt;br /&gt;
===db command===&lt;br /&gt;
{{note box|SME Server comes with the most used parameters set as variables in its internal configuration databases. These variables are used to store values to be used in the final configuration files. Please, read the [[SME_Server:Documentation:Developers_Manual:Section2]] to understand the template and database process.}}&lt;br /&gt;
&lt;br /&gt;
you can see this page of the wiki [[DB_Variables_Configuration]] and the [[Db_command_tutorial]]&lt;br /&gt;
&lt;br /&gt;
==== Setting db variables to default values ====&lt;br /&gt;
{{Note box| Use of &#039;config&#039; is a shorthand version for &#039;db configuration&#039; and therefore only works with the configuration database}}&lt;br /&gt;
&lt;br /&gt;
Any db variable that has a default value can be reset to the default by deleting the variable entirely, then re-initializing the default database values as follows:&lt;br /&gt;
 config delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
==== Delete a property value ====&lt;br /&gt;
To delete the property&lt;br /&gt;
 db accounts delprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Reset a property to an empty value ====&lt;br /&gt;
To reset to an empty value&lt;br /&gt;
 db accounts setprop &amp;lt;key&amp;gt; &amp;lt;prop&amp;gt; &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Create DB key manually by a script====&lt;br /&gt;
&lt;br /&gt;
An example on how create by hand some db with contents in a script. all these db can not be erased because for every &#039;post-upgrade signal-event; signal-event reboot&#039;, the default values set manually below will return.&lt;br /&gt;
&lt;br /&gt;
 mkdir -p          /etc/e-smith/db/accounts/defaults/wordpress&lt;br /&gt;
 echo &amp;quot;reserved&amp;quot; &amp;gt; /etc/e-smith/db/accounts/defaults/wordpress/type&lt;br /&gt;
&lt;br /&gt;
 mkdir -p                  /etc/e-smith/db/configuration/defaults/wordpress&lt;br /&gt;
 echo &amp;quot;configuration&amp;quot;    &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/type&lt;br /&gt;
 echo &amp;quot;Wordpress weblog&amp;quot; &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/Name&lt;br /&gt;
 echo &amp;quot;global&amp;quot;           &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/PublicAccess&lt;br /&gt;
 echo &amp;quot;enabled&amp;quot;          &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/status&lt;br /&gt;
 echo &amp;quot;wordpress&amp;quot;        &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/DbName&lt;br /&gt;
 echo &amp;quot;wordpress&amp;quot;        &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/DbUser&lt;br /&gt;
 echo &amp;quot;en&amp;quot;               &amp;gt; /etc/e-smith/db/configuration/defaults/wordpress/WpLang&lt;br /&gt;
&lt;br /&gt;
in order to initialize all db settings&lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
&lt;br /&gt;
====Create DB key manually by &#039;config&#039;====&lt;br /&gt;
If you want to create a key entry manually you can use the &#039;config&#039; command and save properties in the &#039;&#039;&#039;configuration database&#039;&#039;&#039;. For your information, once deleted you cannot retrieve default values as above.&lt;br /&gt;
The generic Command line is :&lt;br /&gt;
 config configuration set key type [prop1 val1] [prop2 val2] ...&lt;br /&gt;
for example you can do&lt;br /&gt;
&lt;br /&gt;
 config set plop configuration Name wordpress PublicAccess private status enabled DbName wordpress DbUser wordpress WpLang en&lt;br /&gt;
&lt;br /&gt;
you can see the result&lt;br /&gt;
&lt;br /&gt;
 config show plop&lt;br /&gt;
  plop=configuration&lt;br /&gt;
    DbName=wordpress&lt;br /&gt;
    DbUser=wordpress&lt;br /&gt;
    Name=wordpress&lt;br /&gt;
    PublicAccess=private&lt;br /&gt;
    WpLang=en&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
===Modify Hidden settings of users===&lt;br /&gt;
====Grant bash access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; Shell /bin/bash&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Grant vpn access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039;  VPNClientAccess yes&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Grant sudo access to a &amp;quot;user&amp;quot;====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; Sudoer yes&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Chroot &amp;quot;user&amp;quot; on FTP usage====&lt;br /&gt;
 db accounts setprop &#039;&#039;&#039;user&#039;&#039;&#039; ChrootDir /home/e-smith/files/users/user/home&lt;br /&gt;
 signal-event user-modify &#039;&#039;&#039;user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== General Service Handling ===&lt;br /&gt;
====SME9====&lt;br /&gt;
SME Server uses [http://smarden.org/runit/ runit], a UNIX init scheme with service supervision. See the man page of [http://smarden.org/runit/sv.8.html the &#039;sv&#039; command]&lt;br /&gt;
&lt;br /&gt;
All other linux common way to start or stop services are also valuable&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/servicename start/stop/status&lt;br /&gt;
 service servicename start/stop/status&lt;br /&gt;
&lt;br /&gt;
*start&lt;br /&gt;
 sv u /service/servicename&lt;br /&gt;
*stop&lt;br /&gt;
 sv d /service/servicename&lt;br /&gt;
*restart&lt;br /&gt;
 sv t /service/servicename&lt;br /&gt;
* status&lt;br /&gt;
 sv s /service/servicename&lt;br /&gt;
{{tip box|you may use TAB to auto-complete your command line}}&lt;br /&gt;
&lt;br /&gt;
you have some shortcuts&lt;br /&gt;
 down =&amp;gt; &#039;d&#039;,&lt;br /&gt;
 stop =&amp;gt; &#039;d&#039;,&lt;br /&gt;
 up =&amp;gt; &#039;u&#039;,&lt;br /&gt;
 start =&amp;gt; &#039;u&#039;,&lt;br /&gt;
 restart =&amp;gt; &#039;t&#039;,&lt;br /&gt;
 sigterm =&amp;gt; &#039;t&#039;,&lt;br /&gt;
 adjust =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 reload =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 sighup =&amp;gt; &#039;h&#039;,&lt;br /&gt;
 sigusr1 =&amp;gt; &#039;1&#039;,&lt;br /&gt;
 sigusr2 =&amp;gt; &#039;2&#039;,&lt;br /&gt;
 once =&amp;gt; &#039;o&#039;,&lt;br /&gt;
 pause =&amp;gt; &#039;p&#039;,&lt;br /&gt;
 alarm =&amp;gt; &#039;a&#039;,&lt;br /&gt;
 interrupt =&amp;gt; &#039;i&#039;,&lt;br /&gt;
 quit =&amp;gt; &#039;q&#039;,&lt;br /&gt;
 kill =&amp;gt; &#039;k&#039;,&lt;br /&gt;
 exit =&amp;gt; &#039;x&#039;,&lt;br /&gt;
&lt;br /&gt;
Restarting:&lt;br /&gt;
&lt;br /&gt;
 sv t /service/httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
====SME10====&lt;br /&gt;
&#039;&#039;&#039;Systemctl&#039;&#039;&#039; is a &#039;&#039;&#039;systemd&#039;&#039;&#039; utility that is responsible for Controlling the &#039;&#039;&#039;systemd&#039;&#039;&#039; system and service manager. &#039;&#039;&#039;Systemd&#039;&#039;&#039; is a collection of system management daemons, utilities, and libraries which serves as a replacement of &#039;&#039;&#039;System V init&#039;&#039;&#039; daemon. Systemd functions as central management and configuration platform&lt;br /&gt;
&lt;br /&gt;
To list all loaded services on your system (whether active; running, exited or failed, use the &#039;&#039;&#039;list-units&#039;&#039;&#039; subcommand and &amp;lt;code&amp;gt;--type&amp;lt;/code&amp;gt; switch with a value of service.&lt;br /&gt;
 # systemctl list-units --type=service&lt;br /&gt;
 OR&lt;br /&gt;
 # systemctl --type=service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But to get a quick glance of all running services (i.e all loaded and actively running services), run the following command.&lt;br /&gt;
 # systemctl list-units --type=service --state=running &lt;br /&gt;
 OR&lt;br /&gt;
 # systemctl --type=service --state=running&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List all failed units.&lt;br /&gt;
 # systemctl --failed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check whether a Unit or Service is running or not?.&lt;br /&gt;
 # systemctl status httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How do I start, restart, stop, reload and check the status of a service (&#039;&#039;&#039;httpd.service&#039;&#039;&#039;) in Linux.&lt;br /&gt;
 # systemctl start httpd-e-smith.service&lt;br /&gt;
 # systemctl restart httpd-e-smith.service&lt;br /&gt;
 # systemctl stop httpd-e-smith.service&lt;br /&gt;
 # systemctl reload httpd-e-smith.service&lt;br /&gt;
 # systemctl status httpd-e-smith.service&lt;br /&gt;
&lt;br /&gt;
===Add a custom service===&lt;br /&gt;
&lt;br /&gt;
see this [[Add_a_custom_service |page]]&lt;br /&gt;
&lt;br /&gt;
==SSL==&lt;br /&gt;
===Test SSL certificate===&lt;br /&gt;
This free online service performs a deep analysis of the configuration of any SSL web server on the public Internet.&lt;br /&gt;
https://www.ssllabs.com/ssltest/&lt;br /&gt;
===SSL diagnostic===&lt;br /&gt;
The s_client command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS. It is a very useful diagnostic tool for SSL servers.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.openssl.org/docs/apps/s_client.html openssl s_client] Documentation&lt;br /&gt;
*on sme&lt;br /&gt;
 openssl s_client -connect localhost:993&lt;br /&gt;
*on a remote host&lt;br /&gt;
 openssl s_client -connect yourdomain:993&lt;br /&gt;
&lt;br /&gt;
===SSL Signature algorithm===&lt;br /&gt;
you can verify the algorithm signature of your certificate&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
 openssl x509 -noout -text -in /home/e-smith/ssl.pem/sme9dev2.mycompany.local.pem&lt;br /&gt;
&lt;br /&gt;
== SSH ==&lt;br /&gt;
&lt;br /&gt;
===Enable SSH===&lt;br /&gt;
* Enable ssh access (the lazy not-so-secure way, but I am assuming for this testing/dev scenario that your external IP is really a local address behind a router)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Bash&amp;quot;&amp;gt;&lt;br /&gt;
db configuration setprop sshd status enabled&lt;br /&gt;
db configuration setprop sshd PermitRootLogin yes&lt;br /&gt;
db configuration setprop sshd acccess public&lt;br /&gt;
db configuration setprop sshd PasswordAuthentication yes&lt;br /&gt;
/sbin/e-smith/signal-event remoteaccess-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Allow ssh in public or private mode : &#039;&#039;&#039;public&#039;&#039;&#039;= all internet &#039;&#039;&#039;private&#039;&#039;&#039;= only your network&lt;br /&gt;
&lt;br /&gt;
 db configuration sshd access public&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
===Access to the terminal of your remote sme===&lt;br /&gt;
&lt;br /&gt;
 ssh root@ip-sme-or-remote-hostname&lt;br /&gt;
or&lt;br /&gt;
 ssh -pX root@ip-sme-or-remote-host (X is the port listened by ssh service)&lt;br /&gt;
&lt;br /&gt;
{{Note box| you need to forward in your router the port 22 (or whatever you decide) to your internal sme&#039;s ip and &#039;&#039;&#039;allow ssh in the server-manager with the root login and Password Authentication&#039;&#039;&#039; (Security/Remote Access menu). &#039;&#039;&#039;You can enhance security by disabling the root connection&#039;&#039;&#039; : Allow administrative command line access over secure shell NO&lt;br /&gt;
Keep in mind that you need &#039;&#039;&#039;to set the service to public access (entire internet)&#039;&#039;&#039; if you want to be accessible by ssh outside of you network (see the [[Denyhosts]] contrib for banning hosts which failed too many login attempts to your ssh deamon.)  }}&lt;br /&gt;
&lt;br /&gt;
===Execute or run a command over ssh to a remote server and auto disconnect after quit===&lt;br /&gt;
&lt;br /&gt;
 ssh -t root@ip-sme-or-remote-hostname command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &#039;command&#039; is the program or command to run. An example could be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ssh -t root@192.168.1.5 top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Access to the server-manager through SSH===&lt;br /&gt;
&lt;br /&gt;
We can access to the server-manager of your remote SME Server by SSH with a tunneling protocol initiated by &amp;quot;ssh -L&amp;quot;. This command has to be done by a superuser in a Terminal like if you want to be connected to your SME Server by SSH. &lt;br /&gt;
{{note box|We assume that ports are forwarded in your router to your sme internal IP (443 and 22) and the root user is allowed to access by ssh to the server.}}&lt;br /&gt;
&lt;br /&gt;
Do this in a root terminal of your Linux computer outside of your network&lt;br /&gt;
&lt;br /&gt;
 ssh -L 443:localhost:443 root@your-static-external-network-IP-or-host.dyndsn.org&lt;br /&gt;
&lt;br /&gt;
host.dyndsn.org could be a free service as [http://dyn.com/dns/ dyndns.org] or [http://www.noip.com/ noip.com]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Keep the terminal open&#039;&#039;&#039;, Then you need to use this specific URL in your WEB Browser to go to the server-manager&lt;br /&gt;
&lt;br /&gt;
 https://localhost/server-manager&lt;br /&gt;
&lt;br /&gt;
{{tip box|msg=It is possible to use putty if you are afraid about some commands in a terminal, you can find a lot of examples by typing this in google [https://www.google.com/search?q=tunneling+by+putty tunneling by putty]}}&lt;br /&gt;
&lt;br /&gt;
====Access with non standard ports====&lt;br /&gt;
In certain cases which you are not root on the local computer, you can not redirect port &amp;lt; 1024, so you have to use port &amp;gt; 1024 as the example below.&lt;br /&gt;
&lt;br /&gt;
 ssh -L 9443:localhost:443 root@your-remote-ip -p 22&lt;br /&gt;
&lt;br /&gt;
 9443 : local port&lt;br /&gt;
 443 : remote https port&lt;br /&gt;
 your-remote-ip : the remote host (could be an ip or a domain name)&lt;br /&gt;
 22 : this is the port where the ssh server is listening, you can change it in accordance with the remote server&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Keep the terminal open&#039;&#039;&#039;, Then you need to use this specific URL in your WEB Browser to go to the server-manager&lt;br /&gt;
&lt;br /&gt;
 https://localhost:9443/server-manager&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Email&amp;diff=87</id>
		<title>SMEServer Email</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Email&amp;diff=87"/>
		<updated>2026-01-10T06:55:10Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Email  {{usefulnote}} {{Languages}} Information on the email subsystem used in SME Server covering sending/recieving, spam filtering, virus checking, webmail, domains and users.   ==Troubleshooting== I am having trouble getting sme to send and receive email.  Sending and receiving email are separate functions. You need to investigate each individually.  ===Sending=== If SME server does not send mail, you need to examine the /var/log/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Email&lt;br /&gt;
&lt;br /&gt;
{{usefulnote}}&lt;br /&gt;
{{Languages}}&lt;br /&gt;
Information on the email subsystem used in SME Server covering sending/recieving, spam filtering, virus checking, webmail, domains and users. &lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
I am having trouble getting sme to send and receive email.&lt;br /&gt;
&lt;br /&gt;
Sending and receiving email are separate functions. You need to investigate each individually.&lt;br /&gt;
&lt;br /&gt;
===Sending===&lt;br /&gt;
If SME server does not send mail, you need to examine the /var/log/qmail/current logs to see what happens when it tries. Most commonly problems can be solved by sending via your ISP&#039;s mail server, possibly using encryption and/or authentication. Read the manual.&lt;br /&gt;
&lt;br /&gt;
===Receiving===&lt;br /&gt;
If SME server does not receive mail, then you need to ensure that SMTP connections reach your SME server (DNS settings, router configuration, ISP port blocks) and then you need to examine /var/log/qpsmtpd/current logs to determine what SME server does with the incoming connections. Most problems are DNS, router or ISP issues, and have nothing to do with SME server operation or configuration.&lt;br /&gt;
&lt;br /&gt;
====qpsmtpd &amp;quot;Connection Timed Out&amp;quot; errors====&lt;br /&gt;
See [[Bugzilla:6888]] and [[Bugzilla:2360]]&lt;br /&gt;
&lt;br /&gt;
A qpsmtpd timeout error may arise, this is not an issue that is caused by SME server directly, however it can become an issue depending on hardware and configuration settings that are contained in and around other enviroments. &lt;br /&gt;
&lt;br /&gt;
It is discussed under various names &lt;br /&gt;
&lt;br /&gt;
*Path MTU Discovery Blackhole http://www.phildev.net/mss/mss-talk.pdf&lt;br /&gt;
*Path MTU Discovery Failures http://www.wand.net.nz/~mluckie/pubs/debugging-pmtud.imc2005.pdf&lt;br /&gt;
*TCP Problems with Path MTU Discovery http://www.ietf.org/rfc/rfc2923.txt&lt;br /&gt;
&lt;br /&gt;
As discussed in [[Bugzilla:6888]] a workaround was found that may help in mitigating the issue.&lt;br /&gt;
&lt;br /&gt;
The [http://linux.die.net/man/8/tracepath tracepath] utility (included with SME 8.0 and SME 7.6) can be used to locate non-standard MTU values between your SME server and any remote host.&lt;br /&gt;
&lt;br /&gt;
You can discover the smallest MTU between you and google.com (for example) by running this command, then locating the smallest value of &amp;quot;pmtu&amp;quot; in the results:&lt;br /&gt;
 tracepath google.com&lt;br /&gt;
&lt;br /&gt;
If tracepath returns any value below 1500 between your SME server and a mail server that you need to receive email from, you may need to reset the MTU on the SME server to match the smallest value returned.&lt;br /&gt;
&lt;br /&gt;
For example, if tracepath returns 1492 (typical for internet connections using PPPoE), you would need to set the MTU on your SME server to the same value (1492) using the following:&lt;br /&gt;
&lt;br /&gt;
 config setprop InternalInterface MTU 1492&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
&lt;br /&gt;
===Webmail broken after upgrade===&lt;br /&gt;
After the usual post-upgrade and reboot, webmail is broken with messages like the following in the messages log:&lt;br /&gt;
&lt;br /&gt;
 Apr 20 17:29:53 mail [4614]: PHP Fatal error:  Call to a member function on a non-object in /home/httpd/html/horde/imp/lib/Block/tree_folders.php on line 65&lt;br /&gt;
 Apr 20 17:29:53 mail [4614]: PHP Warning:  Unknown(): Unable to call () - function does not exist in Unknown on line 0&lt;br /&gt;
&lt;br /&gt;
As workaround, logout of Horde, close the browser, reopen, log in to Horde, Webmail should now be fully functional. (Based on suggested fix in [[Bugzilla:5177]])&lt;br /&gt;
&lt;br /&gt;
==Spam==&lt;br /&gt;
===Spamassassin===&lt;br /&gt;
====Spam filter with Server-Manager====&lt;br /&gt;
Using the Server-Manager Configuration/E-Mail panel, adjust the settings to these reasonable defaults.&lt;br /&gt;
&lt;br /&gt;
*Virus scanning Enabled&lt;br /&gt;
*Spam filtering Enabled&lt;br /&gt;
*Spam sensitivity Custom&lt;br /&gt;
*Custom spam tagging level 4&lt;br /&gt;
*Custom spam rejection level 12&lt;br /&gt;
*Sort spam into junkmail folder Enabled&lt;br /&gt;
*Modify subject of spam messages Enabled&lt;br /&gt;
&lt;br /&gt;
I would also recommend blocking all executable content. To do so, select (highlight) all of the attachment types other than zip files (the last two).&lt;br /&gt;
&lt;br /&gt;
Click Save.&lt;br /&gt;
====How It Works====&lt;br /&gt;
&lt;br /&gt;
When receiving an incoming message, the server first tests for RBL and DNSBL listings, if enabled.  If the sender is blacklisted, the messages are blocked outright and Spamassassin never sees it.&lt;br /&gt;
&lt;br /&gt;
With this configuration, the spammiest messages, those marked as 12 or above, will be rejected at the SMTP level. Those spam messages marked between 4 and 12, will be routed to the users&#039; (IMAP) junkmail folder. This is done so the users can check for false-positives...valid messages that were classified as spam by SpamAssassin.&lt;br /&gt;
&lt;br /&gt;
Users may check their junkmail folders for false-positives via webmail, or, if they are using an IMAP mail client, by simply checking the junkmail folder exposed by their mail client.&lt;br /&gt;
&lt;br /&gt;
 https://servername/webmail&lt;br /&gt;
&lt;br /&gt;
====Enable/Disable Filtering Per-User====&lt;br /&gt;
&lt;br /&gt;
This procedure doesn&#039;t really disable the spam filtering, it just stopps the spam from being routed to the &#039;junkmail&#039; folder.&lt;br /&gt;
&lt;br /&gt;
Per-user filtering is enabled by default.  Disable filtering with the following command, as root:&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop USERNAME SortSpam disabled&lt;br /&gt;
 db accounts show USERNAME                                   # only displays settings&lt;br /&gt;
 signal-event user-modify USERNAME&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Use the Junkmail folder====&lt;br /&gt;
The Default spamassassin behaviour put spams in the inbox which is very convenient for users in case of false positive, but it is not practical for learning, and especially it does not facilitate the life of the user (setting is available via the manager). If you want to put directly spams in the junkmail folder issue the command above.&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin SortSpam enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Message Retention Time====&lt;br /&gt;
Set spamassassin for automatically delete junkmail.&lt;br /&gt;
You can change the &amp;quot;days&amp;quot; that spamassassin sets to automatically delete junkmail, to delete after two months &lt;br /&gt;
&lt;br /&gt;
 db configuration setprop spamassassin MessageRetentionTime 60  &lt;br /&gt;
 signal-event email-update &lt;br /&gt;
&lt;br /&gt;
====Spam score Level and Spam score rejection====&lt;br /&gt;
The &amp;quot;Custom spam rejection level&amp;quot; will only work when &amp;quot;Spam sensitivity&amp;quot; is set to custom.&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Open server-manager.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Click e-mail in the navigation pane (left-hand side).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Click Change e-mail filtering settings.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Change &amp;quot;Spam sensitivity&amp;quot; to custom and adjust the settings to your liking.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This happens because by default, no mail (except for viruses) gets rejected without the admin doing something first.&lt;br /&gt;
&lt;br /&gt;
As a reference, the following setting will have the following behaviours :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Sensitivity!!Spam tagging level!!Spam rejection level&lt;br /&gt;
|-&lt;br /&gt;
|Custom||TagLevel value &amp;lt;br&amp;gt;(Custom spam tagging level)||RejectLevel value &amp;lt;br&amp;gt;(Custom spam rejection level)&lt;br /&gt;
|-&lt;br /&gt;
|veryhigh||2||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|high||3||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|medium||5||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|low||7||No rejection&lt;br /&gt;
|-&lt;br /&gt;
|verylow||9||No rejection&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====X-Spam-Level Header in Email Messages====&lt;br /&gt;
SME does not create an X-Spam-Level header in processed email messages by default.&lt;br /&gt;
&lt;br /&gt;
To enable this capability:&lt;br /&gt;
 /usr/bin/yum install --enablerepo=smecontribs smeserver-qpsmtpd-spamassassinlevelstars&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
(Based on [[Bugzilla:3505]])&lt;br /&gt;
{{note box| as SME8 this functionality seems to be included --[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 09:05, 3 February 2014 (MST)}}&lt;br /&gt;
&lt;br /&gt;
====spamassassin qpsmtpd&#039;s plugins email size limit====&lt;br /&gt;
This db configuration setting sets the maximum email size above which spamassassin will not apply the spam filtering rules as have been set.&lt;br /&gt;
&lt;br /&gt;
The default setting is 500kb, to increase the maximum size, apply the following commands from a root terminal&lt;br /&gt;
&lt;br /&gt;
 db configuration setprop spamassassin MaxMessageSize 2000000 &lt;br /&gt;
increases message size to 2mb, apply the change with &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
(Based on [[Bugzilla:7606]])&lt;br /&gt;
&lt;br /&gt;
====Custom Rule Scores====&lt;br /&gt;
You can customize the score assigned by a specific Spamassassin rule (SARE_ADULT2 in this case) as follows:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf&lt;br /&gt;
 cd /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf&lt;br /&gt;
 echo &amp;quot;score SARE_ADULT2 20.000&amp;quot; &amp;gt;&amp;gt; 20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can now add additional tests and custom scores by editing the newly-created template fragment &#039;&#039;20localscores&#039;&#039; and adding new custom scores using:&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
Each custom score goes on its own line.  If you enter a score surrounded by parentheses, the &amp;quot;custom&amp;quot; score will be added to the default score for the specified test (use &#039;&#039;score TEST_NAME (-1)&#039;&#039; to reduce the score for &#039;TEST_NAME&#039; by 1) &lt;br /&gt;
&lt;br /&gt;
You can remove these customizations using: &lt;br /&gt;
 rm -f /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;br /&gt;
*http://spamassassin.apache.org/full/3.1.x/dist/doc/Mail_SpamAssassin_Conf.html#scoring_options&lt;br /&gt;
*http://spamassassin.apache.org/tests_3_2_x.html&lt;br /&gt;
*http://www.rulesemporium.com/&lt;br /&gt;
&lt;br /&gt;
====SPF mail rejection/flagging policy====&lt;br /&gt;
{{Warning box|Please note that these instructions do not apply to SME9.2 where the version of qpsmtpd (0.96) does all this out of the box. Indeed if &lt;br /&gt;
the custom template below is applied (or left in?) to an SME9.2 system, then you may find that emails are denied when they ought to be accepted!}}&lt;br /&gt;
&lt;br /&gt;
SME server can protect based of SPF records using spamassassin and the &#039;sender_permitted_from&#039; plugin. The following lines will enable the plugin.&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 echo sender_permitted_from spf_deny 1 &amp;gt; 30spf&lt;br /&gt;
 /sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0&lt;br /&gt;
&lt;br /&gt;
Then set your custom rule scores using the [[#Custom_Rule_Scores|Custom Rule Scores]] section of this page. You should base these scores on your settings in server-manager &amp;gt; Configuration &amp;gt; Email &amp;gt; Change e-mail filtering settings  or via db config commands for those with that skillset&lt;br /&gt;
 echo &amp;quot;score SPF_SOFTFAIL 6.000&amp;quot; &amp;gt;&amp;gt; 20localscores &lt;br /&gt;
 echo &amp;quot;score SPF_FAIL 14.000&amp;quot; &amp;gt;&amp;gt; 20localscores&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
In our testing an email that doesn&#039;t match SPF records and the sender domain owner has defined a soft fail, if is attributed 6 points and sorted to junkmail folder. If the sender domain owner has defined a hard fail the email attibuted 14 points and is subsequently rejected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
References (but instructions changed to meet new qmail structure):&lt;br /&gt;
&lt;br /&gt;
*http://forums.contribs.org/index.php?topic=21631.0&lt;br /&gt;
&lt;br /&gt;
====Pyzor Timeout====&lt;br /&gt;
&lt;br /&gt;
See [[Bugzilla: 5973]]&lt;br /&gt;
{{Warning box|SME server 7.# users be aware of an issue that can appear in the /var/log/spamd/current logs&lt;br /&gt;
&amp;quot; pyzor: [5281] error: TERMINATED, signal 15 (000f)&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
This can be mitigated by the adding of a template fragment.&lt;br /&gt;
&lt;br /&gt;
Template fragment to set a pyzor_timeout based on a value in the config db.&lt;br /&gt;
If no value is set, there is no output (so pyzor uses it&#039;s internal default).&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates/etc/mail/spamassassin/local.cf/50pyzor_timeout&lt;br /&gt;
 cd /etc/e-smith/templates/etc/mail/spamassassin/local.cf/50pyzor_timeout&lt;br /&gt;
 nano 50pyzor_timeout&lt;br /&gt;
&lt;br /&gt;
Contents of 50pyzor_timeout&lt;br /&gt;
 &lt;br /&gt;
 {&lt;br /&gt;
   my $pyzor_timeout = ($spamassassin{PyzorTimeout} || 0);&lt;br /&gt;
   if ($pyzor_timeout ne &#039;0&#039;)&lt;br /&gt;
   {&lt;br /&gt;
      return &amp;quot;pyzor_timeout &amp;quot; . ($pyzor_timeout);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Then a value can be set using:&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin PyzorTimeout 15&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Whitelist and Blacklist====&lt;br /&gt;
If mail comes in and it is misclassified as spam by Spamasassin, you can add the sender to the Spamassassin whitelist so that future messages coming in from that sender are not filtered.&lt;br /&gt;
Conversely, you can add a spammer to the Spamassassin blacklist so you never see their spam again.&lt;br /&gt;
Add senders (or their entire domains) to the global whitelist (or blacklist) with commands similar to these (as root):&lt;br /&gt;
&lt;br /&gt;
 db spamassassin setprop wbl.global *@vonage.com White&lt;br /&gt;
 db spamassassin setprop wbl.global *domain2.com White&lt;br /&gt;
 db spamassassin setprop wbl.global user@domain3.com White&lt;br /&gt;
 db spamassassin setprop wbl.global spammer@spamdomain.com Black&lt;br /&gt;
&lt;br /&gt;
you can block an entire TLD but please be aware that you might be denying a legitimate email in the future.&lt;br /&gt;
 db spamassassin setprop wbl.global *@*.xyz Black&lt;br /&gt;
 db spamassassin setprop wbl.global *@*.link Black&lt;br /&gt;
&lt;br /&gt;
expland template and save the configuration to the database&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can view the lists with this command:&lt;br /&gt;
 db spamassassin show&lt;br /&gt;
&lt;br /&gt;
These lists can be also controlled by the server-manager with the wbl contrib http://wiki.contribs.org/Email_Whitelist-Blacklist_Control&lt;br /&gt;
&lt;br /&gt;
====Testing====&lt;br /&gt;
&lt;br /&gt;
You can check the auto-learning statistics with this command. You will be able to note the accumulation of the spam tokens (or not). Note that the Bayesian filtering must receive 200 spam messages before it starts to function, so don&#039;t expect instantaneous results.&lt;br /&gt;
&lt;br /&gt;
 sa-learn --dump magic&lt;br /&gt;
&lt;br /&gt;
You can check the spam filter log with this command:&lt;br /&gt;
&lt;br /&gt;
 tail -50 /var/log/spamd/current | tai64nlocal&lt;br /&gt;
&lt;br /&gt;
Check spamassassin configuration like this:&lt;br /&gt;
&lt;br /&gt;
 spamassassin -D --lint&lt;br /&gt;
&lt;br /&gt;
If you ever see an error such as:&lt;br /&gt;
&lt;br /&gt;
 warn: bayes: cannot open bayes databases /etc/mail/spamassassin/bayes_* R/W: tie failed: Permission denied&lt;br /&gt;
&lt;br /&gt;
Try adjusting some permissions with these commands:&lt;br /&gt;
&lt;br /&gt;
 chown :spamd /var/spool/spamd/.spamassassin/*&lt;br /&gt;
 chmod g+rw /var/spool/spamd/.spamassassin/*&lt;br /&gt;
&lt;br /&gt;
===Real-time Blackhole List (RBL)===&lt;br /&gt;
Enabling RBL&#039;s &amp;lt;br&amp;gt;&lt;br /&gt;
RBL&#039;s are disabled by default to allow maximum accommodation (your ISP may be on a RBL &amp;amp; you may not know it). You can enable RBL&#039;s by:&lt;br /&gt;
 config setprop qpsmtpd DNSBL enabled RHSBL enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
You can see your RBL&#039;s by:&lt;br /&gt;
 config show qpsmtpd&lt;br /&gt;
&lt;br /&gt;
You can add to your RBL&#039;s by:&lt;br /&gt;
 config setprop qpsmtpd RBLList &amp;lt;rbl-list-name&amp;gt;&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Many will argue what&#039;s best, some say the SME defaults are too aggressive and affect some popular free webmail accounts, but most would agree that you can set stable, conservative and non aggressive settings by:&lt;br /&gt;
 config setprop qpsmtpd RBLList zen.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
A conservative setting for the associated DNSBL SBLList is:&lt;br /&gt;
 config setprop qpsmtpd SBLList dbl.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: More information on this topic can be found here:&lt;br /&gt;
[http://wiki.contribs.org/Updating_to_SME_7.2#RHSBL_Servers]&lt;br /&gt;
[http://wiki.contribs.org/Updating_to_SME_7.2#DNSBL_Servers]&lt;br /&gt;
&lt;br /&gt;
====Possible issues with RBL====&lt;br /&gt;
When an external dns provider is set in the console menu, it may interfere with some blacklists activated here (RHSBL and DNSBL). The black.uribl.com is know to bounce all emails in this case with a rejection message delivered to the sender. You can in this case&lt;br /&gt;
&lt;br /&gt;
*Remove the black.uribl.com of your SBLList&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd SBLList multi.surbl.org:rhsbl.sorbs.net:dbl.spamhaus.org&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
*Let the SME Server being the only dns resolver by removing the dns provider/forwarder in the console menu.&lt;br /&gt;
&lt;br /&gt;
See http://uribl.com/about.shtml#abuse for more information about this issue with black.uribl.com&lt;br /&gt;
&lt;br /&gt;
====Obsolete lists====&lt;br /&gt;
These lists can not be used with smeserver. A migrate fragment will remove them from your settings each time you reconfigure your server.&lt;br /&gt;
&lt;br /&gt;
*RBLList&lt;br /&gt;
&lt;br /&gt;
       combined.njabl.org&lt;br /&gt;
       list.dsbl.org&lt;br /&gt;
       multihop.dsbl.org&lt;br /&gt;
       dnsbl.ahbl.org&lt;br /&gt;
&lt;br /&gt;
*SBLLIST&lt;br /&gt;
&lt;br /&gt;
       blackhole.securitysage.com&lt;br /&gt;
       bulk.rhs.mailpolice.com&lt;br /&gt;
       fraud.rhs.mailpolice.com&lt;br /&gt;
       porn.rhs.mailpolice.com&lt;br /&gt;
       adult.rhs.mailpolice.com&lt;br /&gt;
       bogusmx.rfc-ignorant.org&lt;br /&gt;
       ex.dnsbl.org&lt;br /&gt;
&lt;br /&gt;
===Server Only===&lt;br /&gt;
Some of the spam filter rules cannot work unless the SMESERVER knows the external IP of the box. If you put a SMESERVER in server-only mode behind other firewalls, it will lose some of the anti-spam rules.  For example, the rule that blocks attempts where spammers try &amp;quot;HELO a.b.c.d&amp;quot; where a.b.c.d is your external IP address.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, many admins believe that port-forwarding SMTP provides additional security. It doesn&#039;t, it limits the SMESERVER&#039;s ability to apply some rules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===I want to enable GreyListing===&lt;br /&gt;
GreyListing support is under the covers and can easily be enabled for those who know what they are doing. However, many experienced users found that they spent more time looking after the greylisting configuration than they received in benefit.&lt;br /&gt;
see [[Greylisting]]&lt;br /&gt;
&lt;br /&gt;
===Bayesian Filtering===&lt;br /&gt;
From [[wikipedia:Naive_Bayes_spam_filtering|Wikipedia]]:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Naive Bayes classifiers work by correlating the use of tokens (typically words, or sometimes other things), with spam and non-spam e-mails and then using Bayes&#039; theorem to calculate a probability that an email is or is not spam.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SME server supports bayesian filtering, but does not have it enabled by default.&lt;br /&gt;
&lt;br /&gt;
Enabling bayesian filtering, autolearning, and spam/ham training allows spamassassin to learn from received email and improve spam filter performance. [[Bugzilla: 6822]]&lt;br /&gt;
&lt;br /&gt;
====Bayesian Autolearning====&lt;br /&gt;
The following command will enable the bayesian learning filter and set thresholds for the bayesian filter.&lt;br /&gt;
 config setprop spamassassin UseBayes 1&lt;br /&gt;
 config setprop spamassassin BayesAutoLearnThresholdSpam 6.00&lt;br /&gt;
 config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10&lt;br /&gt;
 config setprop spamassassin UseBayesAutoLearn 1&lt;br /&gt;
 expand-template /etc/mail/spamassassin/local.cf&lt;br /&gt;
 sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex&lt;br /&gt;
 chmod 640 /var/spool/spamd/.spamassassin/bayes_* &lt;br /&gt;
 config setprop spamassassin status enabled&lt;br /&gt;
 config setprop spamassassin RejectLevel 12&lt;br /&gt;
 config setprop spamassassin TagLevel 4&lt;br /&gt;
 config setprop spamassassin Sensitivity custom&lt;br /&gt;
 config setprop spamd SpamLearning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
These commands will:&lt;br /&gt;
&lt;br /&gt;
*enable spamassassin&lt;br /&gt;
*configure spamassassin to reject any email with a score above 12&lt;br /&gt;
*tag spam scored between 4 and 12 in the email header&lt;br /&gt;
*enable bayesian filter&lt;br /&gt;
*&#039;autolearn&#039; as SPAM any email with a score above 6.00&lt;br /&gt;
&lt;br /&gt;
 Note: SpamAssassin requires at least 3 points from the header, and 3 points from the body&lt;br /&gt;
 to auto-learn as spam.&lt;br /&gt;
 Therefore, the minimum working value for this option is 6, to be changed in increments of 3,&lt;br /&gt;
 12 considered to be a good working value..&lt;br /&gt;
&lt;br /&gt;
*&#039;autolearn&#039; as HAM any email with a score below 0.10&lt;br /&gt;
&lt;br /&gt;
Check the bayes stats with the command:&lt;br /&gt;
 sa-learn --dump magic&lt;br /&gt;
&lt;br /&gt;
The database is located in /var/spool/spamd/.spamassassin/bayes&lt;br /&gt;
&lt;br /&gt;
====LearnAsSpam / LearnAsHam (spam/ham training)====&lt;br /&gt;
&lt;br /&gt;
LearnAsSpam &amp;amp; LearnAsHam are scripts that can be installed on your server to allow users to manually &amp;quot;train&amp;quot; the bayes database.  Training is done by users moving Spam from their Inbox to the &amp;quot;LearnAsSpam&amp;quot; folder, and by COPYING real email that was delivered to junkmail into the &amp;quot;LearnAsHam&amp;quot; folder.  All messages in both LearnAsSpam and LearnAsHam are deleted once they have been processed and their tokens have been added to the bayes database.&lt;br /&gt;
&lt;br /&gt;
To install:&lt;br /&gt;
&lt;br /&gt;
* Enable bayes database as described in [[Email#Bayesian_Autolearning | Bayesian Autolearning]] (not the best approach, prefer manual learn by user), or&lt;br /&gt;
* Install smeserver-learn as per wiki page [[Learn]](and keep auto-learning off), then &lt;br /&gt;
* Instruct your users to move any SPAM they find from their Inbox to their LearnAsSpam folder, and to COPY any non-spam (ham) they find in their junkmail folder into their LearnAsHam folder.&lt;br /&gt;
&lt;br /&gt;
This is a really efficient way to reduce impact of SPAM to your particular installation. Do not fear to run again files that are tagged as SPAM, as they will either get ignored if all their patterns are known, or the Bayes might catch one more pattern that could help you to get ride of the next incoming SPAM to even get accepted.&lt;br /&gt;
&lt;br /&gt;
If you want, the code below counts how many e-mail are in LearnAsSpam and LearnAsHam directories (of all users). It&#039;s useful to know if your users are using those folders. However Learn will send you a report after each pass. If you are interested on the number of emails lefts in the junkmail directory without any attention, you could install [[mailstats | smeserver-mailstats]] and activate the option to account for them&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#  ContaLearn.sh&lt;br /&gt;
&lt;br /&gt;
#for compatibility with older versions without rpm, testing&lt;br /&gt;
[  `/sbin/e-smith/db configuration getprop LearnAsSpam dir` ] &amp;amp;&amp;amp;&lt;br /&gt;
LearnAsSpam=`/sbin/e-smith/db configuration getprop LearnAsSpam dir` || LearnAsSpam=&#039;LearnAsSpam&#039;;&lt;br /&gt;
[  `/sbin/e-smith/db configuration getprop LearnAsHam dir` ] &amp;amp;&amp;amp;&lt;br /&gt;
LearnAsHam=`/sbin/e-smith/db configuration getprop LearnAsHam dir` || LearnAsHam=&#039;LearnAsSpam&#039;;&lt;br /&gt;
JunkMail=&#039;junkmail&#039;;&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
date&lt;br /&gt;
declare -i tspam&lt;br /&gt;
declare -i tham&lt;br /&gt;
declare -i tleft&lt;br /&gt;
declare -i tnseen&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;%-25s %-11s %-11s %-11s %-11s \n&amp;quot; &amp;quot;User&amp;quot; &amp;quot;LearnAsSpam&amp;quot; &amp;quot;LearnAsHam&amp;quot; &amp;quot;JunkMail&amp;quot; &amp;quot;NotSeen&amp;quot;&lt;br /&gt;
pushd /home/e-smith/files/users/ &amp;gt;&amp;gt;/dev/nul&lt;br /&gt;
for u in `ls ` #| grep -v admin`&lt;br /&gt;
do&lt;br /&gt;
[ &amp;quot;$u&amp;quot; = &amp;quot;admin&amp;quot; ] &amp;amp;&amp;amp; mailpath=&amp;quot;/home/e-smith/&amp;quot; ||  mailpath=&amp;quot;/home/e-smith/files/users/$u&amp;quot; ;&lt;br /&gt;
  spam=`ls -1 $mailpath/Maildir/.$LearnAsSpam/cur |wc -l`&lt;br /&gt;
  ham=`ls -1 $mailpath/Maildir/.$LearnAsHam/cur |wc -l`&lt;br /&gt;
  left=`ls -1 $mailpath/Maildir/.$JunkMail/cur |wc -l`&lt;br /&gt;
  nseen=`ls -1 $mailpath/Maildir/.$JunkMail/new |wc -l`&lt;br /&gt;
  if  [[ $spam &amp;gt; 0 ]] || [[ $ham &amp;gt; 0 ]] || [[ $left &amp;gt; 0 ]] || [[ $nseen &amp;gt; 0 ]];   then&lt;br /&gt;
     printf &amp;quot;%-25s %-11d %-11d %-11d %-11d \n&amp;quot; $u $spam $ham $left $nseen&lt;br /&gt;
  fi&lt;br /&gt;
  tspam=$tspam+$spam&lt;br /&gt;
  tham=$tham+$ham&lt;br /&gt;
  tleft=$tleft+$left&lt;br /&gt;
  tnseen=$tnseen+$nseen&lt;br /&gt;
done&lt;br /&gt;
echo &amp;quot;----------------------------------------------------------------------&amp;quot;&lt;br /&gt;
printf &amp;quot;%-25s %-11d %-11d %-11d %-11d \n&amp;quot; &amp;quot;Total:&amp;quot; $tspam $tham $tleft $tnseen&lt;br /&gt;
echo&lt;br /&gt;
popd &amp;gt;&amp;gt;/dev/nul&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Learn Contrib====&lt;br /&gt;
The [[Learn]] contrib is intended to install and configure the bayes training tools LearnAsSpam &amp;amp; LearnAsHam.&lt;br /&gt;
&lt;br /&gt;
====Reset the Bayes Database====&lt;br /&gt;
Based on this forum post http://forums.contribs.org/index.php/topic,50712.msg258844.html#msg258844 it may be advantageous to remove the bayes database every few years &amp;amp; recreate it, in order to improve spam filtering performance. &lt;br /&gt;
&lt;br /&gt;
Follow these instructions to turn bayes OFF, delete the database, create an empty database, and turn bayes back on:&lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin UseBayes 0&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 &#039;rm&#039; /var/spool/spamd/.spamassassin/bayes* &lt;br /&gt;
&lt;br /&gt;
 config setprop spamassassin UseBayes 1&lt;br /&gt;
 expand-template /etc/mail/spamassassin/local.cf&lt;br /&gt;
 sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*&lt;br /&gt;
 chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex&lt;br /&gt;
 chmod 640 /var/spool/spamd/.spamassassin/bayes_* &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Updates to smeserver-spamassasin now require two new config db settings to have bayesian autolearning enabled.  See forum post https://forums.contribs.org/index.php/topic,54320.msg284208.html#msg284208&lt;br /&gt;
&lt;br /&gt;
===The Sonora Communications &amp;quot;Spam Filter Configuration for SME 7&amp;quot; howto===&lt;br /&gt;
&lt;br /&gt;
http://www.sonoracomm.com/support/19-inet-support/49-spam-filter-configuration-for-sme-7&lt;br /&gt;
&lt;br /&gt;
===GeoIP: spam blocking based on geographical information===&lt;br /&gt;
&lt;br /&gt;
The GeoIP plugin for Spamassasin lets us know where our mail server is receiving mail from. If we&#039;re receiving too much spam from a particular location, this will help track it down. We can then use that info to reject connections from that place taking the load off our server.&lt;br /&gt;
&lt;br /&gt;
{{Note box | This can be a crude way of blocking spam and potentially also block legitimate users!}}&lt;br /&gt;
&lt;br /&gt;
You can find information how to install and use it on the [[GeoIP]] page.&lt;br /&gt;
&lt;br /&gt;
==Anti Virus==&lt;br /&gt;
SME Server uses Clam AntiVirus (http://www.clamav.net) as the default and built-in anti virus engine.&lt;br /&gt;
&lt;br /&gt;
===Signatures===&lt;br /&gt;
By default SME Server will automatically get virus signature database updates from ClamAV.&lt;br /&gt;
&lt;br /&gt;
Other people and organizations have developed additional signatures which can also be used with ClamAV to provide extra protection. Databases of these signatures can be downloaded and installed on SME Server, and used by ClamAV&lt;br /&gt;
&lt;br /&gt;
In order to automate the download and installation of the additional databases, as well as control which databases you use, follow the instruction in the [[Virus:Additional_Signatures|Virus:Additional Signatures]] Howto&lt;br /&gt;
&lt;br /&gt;
===Heuristic Scan===&lt;br /&gt;
HeuristicScanPrecedence is a new option in clamav 0.94.&lt;br /&gt;
&lt;br /&gt;
When enabled, if a heuristic scan (such as phishingScam) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time.&lt;br /&gt;
&lt;br /&gt;
To enable this feature:&lt;br /&gt;
 config setprop clamav HeuristicScanPrecedence yes&lt;br /&gt;
 expand-template /etc/clamd.conf&lt;br /&gt;
 sv t clamd&lt;br /&gt;
&lt;br /&gt;
Default is disabled.&lt;br /&gt;
&lt;br /&gt;
===Attachment Filtering===&lt;br /&gt;
The functionality to block possible executable and virus files attached to emails has been incorporated into SME Server v7.x. See the [[SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Filtering|Email]] panel in server manager.&lt;br /&gt;
&lt;br /&gt;
Additional file signature patterns can be added to the SME defaults. See the [[Virus:Email_Attachment_Blocking|Virus:Email Attachment Blocking]] Howto for further information&lt;br /&gt;
&lt;br /&gt;
==Email Clients==&lt;br /&gt;
===&amp;quot;concurrency limit reached&amp;quot; when using IMAP===&lt;br /&gt;
Sometime shows as Thunderbird giving this error message,&lt;br /&gt;
&#039;&#039;This Mail-server is not a imap4 mail-server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To workaround thunderbirds limitations change, this thunderbird setting to false&lt;br /&gt;
&lt;br /&gt;
*Preferences, Advanced, Config editor (aka about:config): filter on tls.&lt;br /&gt;
*set security.enable_tls to false&lt;br /&gt;
&lt;br /&gt;
If the total concurrency limit is reached, it&#039;ll look like this in /var/log/dovecot/current:&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c1f19c9381c master: Warning: service(imap): process_limit (2) reached, client connections are being dropped&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c291a4712dc imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c291a471aac imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the per IP concurrency limit, it&#039;ll be like this:&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c6214542b94 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=&amp;lt;someone&amp;gt;, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=&amp;lt;abcdefgh&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@400000005a1c2c6233f1bcb4 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=&amp;lt;someone&amp;gt;, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=&amp;lt;ijklmnop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following commands will give your the current value:&lt;br /&gt;
 db configuration getprop imap ConcurrencyLimit || echo 400&lt;br /&gt;
 db configuration getprop imap ConcurrencyLimitPerIP || echo 12&lt;br /&gt;
&lt;br /&gt;
You can also  increase the ConcurrencyLimitPerIP  and/or ConcurrencyLimit value for imap and/or imaps (secure)&lt;br /&gt;
 config setprop imap ConcurrencyLimitPerIP 20&lt;br /&gt;
 config setprop imaps ConcurrencyLimitPerIP 20&lt;br /&gt;
 signal-event post-upgrade; signal-event reboot&lt;br /&gt;
{{Note box| for sme9, only the key imap has properties ConcurrencyLimitPerIP,checkConcurrencyLimit,ProcessMemoryLimit. If you set these properties to the key imaps, a migrate fragment will remove them automatically.}}&lt;br /&gt;
To see configuration:&lt;br /&gt;
 config show imap&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/dovecot/current | tai64nlocal  #out of date&lt;br /&gt;
&lt;br /&gt;
More detail can be found [http://forums.contribs.org/index.php?topic=33124.0 here] or [https://forums.contribs.org/index.php/topic,51872.0 here].&lt;br /&gt;
&lt;br /&gt;
{{Tip box|You can see if you are running out of the number of available connections in your log file /var/log/imaps/current and look for messages like the log extract below where the ConcurrencyLimitPerIP was set to 20. A 21st connection was attempted and was denied.&lt;br /&gt;
&lt;br /&gt;
 tcpsvd: info: pid 30693 from 10.1.0.104&lt;br /&gt;
 tcpsvd: info: concurrency 30693 10.1.0.104 21/20&lt;br /&gt;
 tcpsvd: info: deny 30693 0:10.1.0.21 ::10.1.0.104:49332 ./peers/10.1.0&lt;br /&gt;
}}&lt;br /&gt;
{{Tip box|Mobile devices have a tendency to frequently disconnect and connect from the network. When this disconnect happens, the sessions on the server are not always immediately cleaned up (they get cleaned up after a time out of some minutes). When the email client reconnects, they create new network connections and you get into the situation that these new connections get denied because of the concurrency limit. On the mobile device this may be noted as a &amp;quot;Unable to connect to server&amp;quot; message.}}&lt;br /&gt;
{{Tip box|Some email clients use a separate connection per imap folder, so the concurrency limits may occur for users that have many imap folders.}}&lt;br /&gt;
&lt;br /&gt;
===Mail server is not an IMAP4 mail server===&lt;br /&gt;
This is a bug in Thunderbird, the previous tips may help.&lt;br /&gt;
&lt;br /&gt;
===The Bat===&lt;br /&gt;
The gives this error message, but they are wrong.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;This server uses TLS v3.0 which is considered to be obsolete and insecure. &lt;br /&gt;
The server must use TLS v3.1 or above.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Outlook/Outlook Express give error 10060/0x800CCC90===&lt;br /&gt;
Most likely OUTLOOK (EXPRESS) isn&#039;t configured correctly.&lt;br /&gt;
 &lt;br /&gt;
 -open OUTLOOK&lt;br /&gt;
 -click TOOLS &amp;gt; ACCOUNTS&lt;br /&gt;
 -click CHANGE (on the right-hand side)&lt;br /&gt;
 -find INCOMING MAIL SERVER &amp;amp; OUTGOING MAIL SERVER (on right-hand side)&lt;br /&gt;
 -type: mail.yourdomain.tld (in both places)&lt;br /&gt;
 -click MORE SETTINGS (on bottom-right)&lt;br /&gt;
 -click OUTGOING SERVER tab (at the top)&lt;br /&gt;
 -checkmark &amp;quot;MY OUTGOING SERVER REQUIRES AUTHENTICATION&amp;quot;&lt;br /&gt;
 -bullet &amp;quot;USE SAME SETTINGS AS INCOMING MAIL SERVER&amp;quot;&lt;br /&gt;
 -click ADVANCED tab (at the top)&lt;br /&gt;
 -find OUTGOING SERVER&lt;br /&gt;
 -checkmark &amp;quot;THIS SERVER REQUIRES A SECURE CONNECTION&amp;quot; (under outgoing server)&lt;br /&gt;
 -change 25 to 465&lt;br /&gt;
 -[possibly required, secure IMAP is 993]&lt;br /&gt;
 -click OK &amp;gt; NEXT &amp;gt; FINISHED&lt;br /&gt;
 -you&#039;re finished, your email should work now&lt;br /&gt;
&lt;br /&gt;
===Outlook 2013 on Windows 10 gives &amp;quot;An unknown error occurred, error code 0x8004011c&amp;quot; when attempting an IMAP connection for a DOMAIN user===&lt;br /&gt;
This is a known issue with the above combination of Windows and Outlook version as of 2015-02-18 (see: [http://bugs.contribs.org/show_bug.cgi?id=9618 Bug 9618]).&lt;br /&gt;
&lt;br /&gt;
The following registry key resolves the issue:&lt;br /&gt;
To work around this problem, set the value of the ProtectionPolicy registry entry to 1 to enable local backup of the MasterKey instead of requiring a RWDC in the following registry subkey:&lt;br /&gt;
&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb] &lt;br /&gt;
 &amp;quot;ProtectionPolicy&amp;quot;=dword:00000001&lt;br /&gt;
&lt;br /&gt;
The PortectionPolicy entry may need to be created&lt;br /&gt;
&lt;br /&gt;
===Outlook 2013 on Windows 8.1 gives error 0x800CCC1A when sending over SMTP port 465===&lt;br /&gt;
This is a known issue with the above combination of Windows and Outlook version as of 2015-02-18 (see: [http://bugs.contribs.org/show_bug.cgi?id=8854 Bug 8854]).&lt;br /&gt;
&lt;br /&gt;
The following client-side workaround has been suggested on the [http://www.dovecot.org/list/dovecot/2014-May/096029.html dovecot mailinglist]:&lt;br /&gt;
&lt;br /&gt;
Disable TLS1.2 on the Windows 8.1 client, using a registry entry:&lt;br /&gt;
&lt;br /&gt;
  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS1.2\Client]&lt;br /&gt;
  &amp;quot;DisabledByDefault&amp;quot;=dword:00000001&lt;br /&gt;
  &amp;quot;Enabled&amp;quot;=dword:00000000&lt;br /&gt;
&lt;br /&gt;
If the registry entry above does not exist on your system, you will have to create it manually.&lt;br /&gt;
&lt;br /&gt;
Whether this is OpenSSL or Microsoft&#039;s &amp;quot;fault&amp;quot; is currently not answered.&lt;br /&gt;
&lt;br /&gt;
===Outlook test message doesn&#039;t come through===&lt;br /&gt;
You clicked the TEST ACCOUNT SETTINGS in OUTLOOK didn&#039;t you? This is a bug in OUTLOOK. The test message sends a test email with &#039;no Date header&#039;. As the name suggests, this means a message without any date. Since the server doesn&#039;t accept mail with &#039;no Date header&#039; (because it&#039;s required) the message is rejected. To test, send an actual message from OUTLOOK.&lt;br /&gt;
&lt;br /&gt;
If you want, you can try THUNDERBIRD. It&#039;s like OUTLOOK but made by a different company. It&#039;s completely free and works very well at home and at the office.&lt;br /&gt;
&lt;br /&gt;
===I can&#039;t receive/send email from my application (ACT!, vTiger, MS Outlook, etc)===&lt;br /&gt;
Most likely, this is a bug the application you&#039;re using and not a problem with the SMESERVER. The application sends an email with &#039;no Date header&#039;. As the name suggests, this means a message without any date. Since the server doesn&#039;t accept mail with &#039;no Date header&#039; (because it&#039;s required) the message is rejected. &lt;br /&gt;
&lt;br /&gt;
As a workaround you can disable the check for the &#039;Date header&#039;.&lt;br /&gt;
To disable this check on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; \&lt;br /&gt;
 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To disable this check for the external interface: &lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; \&lt;br /&gt;
 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===After I upgrade my SME Server, my email folders have disappeared when using IMAP===&lt;br /&gt;
After upgrade, if there are missing IMAP folders, the client may need to re-subscribe to folders.  This may affect either webmail users or users who use an IMAP email client.&lt;br /&gt;
&lt;br /&gt;
===Entourage: Using SME&#039;s Self-Signed Certificate for SSL Connections from Entourage on OS X 10.4===&lt;br /&gt;
The main problem here is that Entourage will only support trusted, PEM Base-64 Encoded certificates.  To use IMAPS or SMTPS from Entourage with your SME server, you will need to:&lt;br /&gt;
 1. Login to your Mac as a user with administrative privileges&lt;br /&gt;
 &lt;br /&gt;
 2. Open Safari and browse to https://&#039;&#039;smeserver&#039;&#039;/server-manager.  &lt;br /&gt;
    When you receive the warning about your certificate:&lt;br /&gt;
    - click on &amp;quot;Show Certificate&amp;quot;&lt;br /&gt;
    - click and drag the gold-rimmed image of a certificate to your desktop.  &lt;br /&gt;
    You will now have &#039;&#039;myserver.mydomain.tld.cer&#039;&#039; on your desktop.&lt;br /&gt;
 &lt;br /&gt;
 3. Locate and open the &#039;&#039;&#039;Microsoft Cert Manager&#039;&#039;&#039;&lt;br /&gt;
    - &amp;quot;Import&amp;quot; the certificate you downloaded in step 2.&lt;br /&gt;
 &lt;br /&gt;
 4. Highlight the imported certificate and &amp;quot;Export&amp;quot; it. &lt;br /&gt;
    - Select the &amp;quot;PEM...&amp;quot; format&lt;br /&gt;
    - add &amp;quot;&#039;&#039;pem.&#039;&#039;&amp;quot; to the beginning of the filename&lt;br /&gt;
    - export it to your Desktop&lt;br /&gt;
 &lt;br /&gt;
 5. Double-click on the new &#039;&#039;pem.myserver.mydomain.tld.cer&#039;&#039;  &lt;br /&gt;
    - Apple&#039;s &#039;&#039;&#039;Keychain Access&#039;&#039;&#039; application will open.&lt;br /&gt;
    - Select the &#039;&#039;&#039;X509Anchors&#039;&#039;&#039; Keychain and click &amp;quot;OK&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 6. While still in Apple&#039;s &#039;&#039;&#039;Keychain Access&#039;&#039;&#039;, select the &amp;quot;Certificates&amp;quot; category&lt;br /&gt;
    - Drag &#039;&#039;pem.myserver.mydomain.tld.cer&#039;&#039; into the certificates window.&lt;br /&gt;
&lt;br /&gt;
You should now be able to connect to your SME from your Entourage using IMAPS.  &lt;br /&gt;
&lt;br /&gt;
If you are accessing your SME server using a different name than the one encoded in the certificate you will still receive a security warning from Entourage, but &amp;quot;OK&amp;quot; will now grant access to your folders.&lt;br /&gt;
&lt;br /&gt;
Notes: &lt;br /&gt;
&lt;br /&gt;
*Procedure mostly taken from http://www.kerio.com/manual/kmsug/en/ch09s06.html&lt;br /&gt;
*I still get various other IMAP errors due, I suspect, to the &amp;quot;concurrency limit reached&amp;quot; issue.&lt;br /&gt;
*Click on &amp;quot;Show Keychains&amp;quot; in Apple&#039;s &amp;quot;Keychain Access&amp;quot; if you need to delete a certificate and try again.&lt;br /&gt;
&lt;br /&gt;
===How do I get my e-mail to show the correct From Address===&lt;br /&gt;
&lt;br /&gt;
The From address on an e-mail is not supplied by the server. It is supplied by the e-mail client.&lt;br /&gt;
&lt;br /&gt;
*Configure your Account in your e-mail client with the correct FROM address.&lt;br /&gt;
*You can change the FROM address in webmail with the following:&lt;br /&gt;
**Login to webmail as the user, go to &#039;&#039;options-personal information&#039;&#039; and change the &#039;&#039;identity&#039;&#039; to have the correct FROM address. You can have multiple identities with a single user.&lt;br /&gt;
&lt;br /&gt;
Some system generated email is created by the server, some contribs may send mail externally, in these cases you need a valid domain name for the server, buy one or use a free provider like dyndns.org&lt;br /&gt;
&lt;br /&gt;
===Outlook 365 / Outlook 2019 IMAP Configuration===&lt;br /&gt;
&lt;br /&gt;
Microsoft has disabled the ability to enter the IMAP/SMTP username in the account setup wizard in Outlook 365 / 2019 for Windows.  The wizard used within Outlook requires that the IMAP/SMTP username be the full email address.&lt;br /&gt;
&lt;br /&gt;
To work around this issue, setup the account using &amp;quot;Mail (Microsoft Outlook 2016)&amp;quot; in the Windows control panel:&lt;br /&gt;
[[File:Screen Shot 2019-12-04 at 6.44.18 AM.png|450px]]&lt;br /&gt;
&lt;br /&gt;
==Server Settings==&lt;br /&gt;
===qmail ConcurrencyLocal===&lt;br /&gt;
The default value for /var/qmail/control/concurrencylocal is 20. This setting controls the maximum amount of simultaneous local deliveries.&lt;br /&gt;
&lt;br /&gt;
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyLocal for qmail in the config database. The ConcurrencyLocal property changes the value stored in /var/qmail/control/concurrencylocal.&lt;br /&gt;
&lt;br /&gt;
It can be set, for example to decrease the local concurrency limit&lt;br /&gt;
 config setprop qmail ConcurrencyLocal 6&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===qmail ConcurrencyRemote===&lt;br /&gt;
The default value for /var/qmail/control/concurrencyremote is 20. This setting controls the maximum amount of simultaneous remote deliveries.&lt;br /&gt;
&lt;br /&gt;
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyRemote for qmail in the config database. The ConcurrencyRemote property changes the value stored in /var/qmail/control/concurrencyremote. &lt;br /&gt;
&lt;br /&gt;
It can be set, for example to decrease the remote concurrency limit&lt;br /&gt;
 config setprop qmail ConcurrencyRemote 10&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Refer also this comment by CB&lt;br /&gt;
&lt;br /&gt;
http://forums.contribs.org/index.php/topic,50091.msg251320.html#msg251320&lt;br /&gt;
&lt;br /&gt;
===How long retry before return e-mail as undeliverable===&lt;br /&gt;
To configure how long SME server will try to delivery a message before return a permanent error&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
The default value is 604800 seconds, or one week.&amp;lt;br&amp;gt;&lt;br /&gt;
The example above shows 172800 seconds, or two days (a weekend for infra upgrade!)&lt;br /&gt;
&lt;br /&gt;
source: http://forums.contribs.org/index.php/topic,47471.0.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Double bounce messages===&lt;br /&gt;
To stop admin receiving double bounce messages&lt;br /&gt;
&lt;br /&gt;
 config setprop qmail DoubleBounceTo someoneuser&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Or just delete them. You risk losing legitimate double bounces (which are&lt;br /&gt;
rare, but you want to look at them when they do occur)&lt;br /&gt;
&lt;br /&gt;
 config setprop qmail DoubleBounceTo devnull&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
see a longer explaination [[Email_delete_double-bounce_messages | here]]&lt;br /&gt;
&lt;br /&gt;
===Keep a copy of all emails===&lt;br /&gt;
You may need to keep a copy of all emails sent to or from your email server.&lt;br /&gt;
This may be for legal, or other reasons.&lt;br /&gt;
&lt;br /&gt;
The following instructions will create a new user account (default is maillog) and forward every email that goes through your SME server to it.&lt;br /&gt;
&lt;br /&gt;
First, log onto the server-manager and create the user &#039;&#039;&#039;maillog&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Go to the SME Command Line (logon as root) and issue the following commands:&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd Bcc enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Optionally make the forwarding of the emails invisible to the end user. Without it, there will be an X-Copied-To: header in each email. Run this command before the signal-event&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd BccMode bcc&lt;br /&gt;
&lt;br /&gt;
If you want to view the emails, point your email client at the SME and log on as maillog.&lt;br /&gt;
&lt;br /&gt;
You can modify the default user:&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd BccUser someuser&lt;br /&gt;
&lt;br /&gt;
====Keep a copy of outgoing emails only====&lt;br /&gt;
In addition to the commands in the [[#Keep_a_copy_of_all_emails | previous section]] we will also have to create a custom template as follows:&lt;br /&gt;
&lt;br /&gt;
Log in as root or a user with root privileges&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cp /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/13bcc /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/&lt;br /&gt;
 nano -w 13bcc&lt;br /&gt;
&lt;br /&gt;
change the code to:&lt;br /&gt;
 {&lt;br /&gt;
      return &amp;quot;# bcc disabled&amp;quot; unless ($qpsmtpd{Bcc} eq &amp;quot;enabled&amp;quot;);&lt;br /&gt;
      return &amp;quot;bcc mode &amp;quot; . $qpsmtpd{BccMode} . &amp;quot; outgoing &amp;quot; . $qpsmtpd{BccUser};&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Save by pressing Ctrl x at the same time and confirm with y&lt;br /&gt;
&lt;br /&gt;
Then enable the changes with&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
More info:&lt;br /&gt;
 perldoc /usr/share/qpsmtpd/plugins/bcc&lt;br /&gt;
&lt;br /&gt;
===Set Helo hostname===&lt;br /&gt;
Default is set to the hostname.domain, but sometime you might want to have something else to answer with the same as your reverseDNS. You can do one of the followings to only adjust the helo name:&lt;br /&gt;
 &lt;br /&gt;
 config setprop smtpd HeloHost mydomainname&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
or the following to adjust the way your server will present itself everywhere (httpd, qpsmtd...) This might trigger the generation of new ssl certificate, so use it only if you are sure this is what you want to do.&lt;br /&gt;
&lt;br /&gt;
 config set DomainName mydomainname&lt;br /&gt;
 signal-event domain-modify&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Set max email size===&lt;br /&gt;
&lt;br /&gt;
*IMPORTANT: [[bugzilla: 7876]] points out that if your system has &#039;&#039;/var/service/qpsmtpd/config/databytes&#039;&#039; it should be deleted. (Fixed as of smeserver-qpsmtpd-2.4.0-7.el6.sme.noarch - see [[bugzilla: 8329]]).&lt;br /&gt;
&lt;br /&gt;
There are several components involved in sending email on a SME server.  Each component has a size limit that may affect an email message that passes through the server.&lt;br /&gt;
&lt;br /&gt;
Be aware that &#039;&#039;email size&#039;&#039; is not the same thing as &#039;&#039;attachment size&#039;&#039;.  Binary attachments to email are encoded using techniques that result in email sizes that can be as much as 30% larger than the original attachment. Most major email clients (Thunderbird, Apple Mail, Outlook) allow you to enable a &amp;quot;message size&amp;quot; column in the message list that will show you the size of your email messages ([http://forums.contribs.org/index.php/topic,48366.msg241720.html#msg241720 More]).&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Subsystem&lt;br /&gt;
!Function&lt;br /&gt;
!Default Limit&lt;br /&gt;
!Command to change size&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|qmail&lt;br /&gt;
|Delivers email to local mailboxes and to remote servers&lt;br /&gt;
|15000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;qmail&amp;amp;nbsp;MaxMessageSize&amp;amp;nbsp;xx000000&lt;br /&gt;
|Value is in BYTES. 15000000 equals approximately 15MB.&amp;lt;br&amp;gt;No value means no limit.&lt;br /&gt;
|-&lt;br /&gt;
|clamav&lt;br /&gt;
|Used to scan emails and attachments&lt;br /&gt;
|15M&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;clamav&amp;amp;nbsp;MaxFileSize&amp;amp;nbsp;15M&lt;br /&gt;
|Value includes human-readable abbreviations.  &amp;quot;15M&amp;quot; equals 15 MegaBytes.&lt;br /&gt;
|-&lt;br /&gt;
|clamd&lt;br /&gt;
|Involved in attachment virus scanning&lt;br /&gt;
|1400000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;clamd&amp;amp;nbsp;MemLimit&amp;amp;nbsp;1400000000&lt;br /&gt;
|May require increase per [https://forums.contribs.org/index.php?topic=54070.0;topicseen this forum topic]&lt;br /&gt;
|-&lt;br /&gt;
|qpsmtpd&lt;br /&gt;
|The clamav plugin to qpsmtpd is called with a specified size limit.&lt;br /&gt;
|25000000&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;qpsmtpd&amp;amp;nbsp;MaxScannerSize&amp;amp;nbsp;xx000000&lt;br /&gt;
|Value is in BYTES.&amp;lt;br&amp;gt;Question: does this value override the setting of &#039;MaxFileSize&#039;, or will the smaller value prevail?&lt;br /&gt;
|-&lt;br /&gt;
|php&lt;br /&gt;
|The php maximum file upload size will determine the largest file you can attach to an email message using horde (or any other php email client)&lt;br /&gt;
|10M&lt;br /&gt;
|config&amp;amp;nbsp;setprop&amp;amp;nbsp;php&amp;amp;nbsp;UploadMaxFilesize&amp;amp;nbsp;10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
====clamav====&lt;br /&gt;
A note about clamav:&amp;lt;br&amp;gt;&lt;br /&gt;
ClamAV includes settings to prevent the scanning of archives that could cause problems if fully expanded; if an attachment cannot be scanned, it will be rejected.&lt;br /&gt;
&lt;br /&gt;
In order for changes to take effect, run:&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
These attributes could result in the rejection of a  compressed attachment on a SME server:&lt;br /&gt;
&lt;br /&gt;
*ArchiveMaxCompressionRatio (default 300)&lt;br /&gt;
*MaxFiles (default 1500)&lt;br /&gt;
*MaxRecursion (default 8)&lt;br /&gt;
&lt;br /&gt;
====spamassassin====&lt;br /&gt;
By default the qpsmtpd &#039;spamassassin&#039; plugin does not pass any messages over 500,000 bytes to spamassassin for scanning. &lt;br /&gt;
&lt;br /&gt;
To change this behavior:&lt;br /&gt;
  db configuration setprop spamassassin MaxMessageSize 2000000 &lt;br /&gt;
increases message size to 2,000,000 bytes.  Apply the change with &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Change Horde Webmail Login Page &#039;Welcome To&#039; Title===&lt;br /&gt;
The login page for Webmail defaults to &amp;quot;Welcome to Horde Webmail&amp;quot;. In order to change this to something like &amp;quot;Welcome to MyDomain Mail&amp;quot;&lt;br /&gt;
 config setprop horde Name &amp;quot;MyDomain Mail&amp;quot;&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;br /&gt;
Other configurable Horde settings [[DB_Variables Configuration#Horde_(webmail)]]&lt;br /&gt;
&lt;br /&gt;
Forum post [http://forums.contribs.org/index.php/topic,31093.0.html 31093]&lt;br /&gt;
&lt;br /&gt;
===Add the admin user as an administrator for Horde===&lt;br /&gt;
&lt;br /&gt;
 config setprop horde Administration enabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Large attachments not displaying in webmail===&lt;br /&gt;
Due to limits set in the PHP configuration it might be that webmail will not display large attachments (see also [[bugzilla:3990]]). The following entries are related to the error and can be found in the log files:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/var/log/messages&#039;&#039;&#039;&lt;br /&gt;
 Mar 13 00:00:12 box1 httpd: PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 154 bytes) in /home/httpd/html/horde/imp/lib/MIME/Contents.php on line 173&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/var/log/httpd/error_log&#039;&#039;&#039;&lt;br /&gt;
 Allowed memory size of 33554432 bytes exhausted (tried to allocate 0 bytes)&lt;br /&gt;
&lt;br /&gt;
The default MemoryLimit setting in PHP is set to 32M the value can be changed using the commands below replacing &#039;&#039;XX&#039;&#039; with the value you desire.&lt;br /&gt;
{{Note box|You can set the MemoryLimit any value you like but be sure to add the capital M as a suffix for Megabytes.}}&lt;br /&gt;
 db configuration setprop php MemoryLimit XXM&lt;br /&gt;
 expand-template /etc/php.ini&lt;br /&gt;
 sv t httpd-e-smith&lt;br /&gt;
&lt;br /&gt;
===Disable mail to a user from an external network===&lt;br /&gt;
However, this seems to only affect /var/qmail/control/badrcptto - denying external delivery to your users but allowing outbound emails:&lt;br /&gt;
http://forums.contribs.org/index.php?topic=40449.5&lt;br /&gt;
&lt;br /&gt;
Can be either a user, pseudonym or group&lt;br /&gt;
 db accounts setprop groupname/username/pseudonym Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to remove &lt;br /&gt;
 db accounts delprop groupname/username/pseudonym Visible&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
*If you need to restrict emails for all users you can perform this command line&lt;br /&gt;
&lt;br /&gt;
 db accounts show | awk -F &amp;quot;=&amp;quot;  &#039;/\=user/ {print $1}&#039; |while read USER; do db accounts setprop $USER Visible internal; done&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to remove &lt;br /&gt;
 db accounts show | awk -F &amp;quot;=&amp;quot;  &#039;/\=user/ {print $1}&#039; |while read USER; do db accounts delprop $USER Visible; done&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
{{Note box|Please note that admin and other system accounts can not be hidden from external network this way.&lt;br /&gt;
&lt;br /&gt;
Also note that Pseudonyms can be set to internal only using the server-manager.}}&lt;br /&gt;
&lt;br /&gt;
===I can&#039;t receive mail at: user@mail.domain.tld===&lt;br /&gt;
Add mail.domain.tld as a virtualdomain.&lt;br /&gt;
 -login to SERVER-MANAGER&lt;br /&gt;
 -click DOMAINS (on the left)&lt;br /&gt;
 -click ADD&lt;br /&gt;
 -type: mail.domain.tld&lt;br /&gt;
&lt;br /&gt;
===How do I find out who is logged into webmail and what IP number.===&lt;br /&gt;
This is logged is in /var/log/messages.&lt;br /&gt;
&lt;br /&gt;
===Allow SMTP relay of mail without encryption/authentication===&lt;br /&gt;
&lt;br /&gt;
Change the configuration of the system from the default, so that it no longer requires encryption/authentication before allowing relaying of mail.&lt;br /&gt;
&lt;br /&gt;
* For most case, you really want to allow few specific clients on your LAN or trusted networks, this is done by setting a coma separated list of ip this way (replace IP1, IP2, IP3 by valid ips). &lt;br /&gt;
 config set qpsmtpd UnauthenticatedRelayClients IP1,IP2,IP3&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* In some case you would have a whole dedicated network with appliances needing to send email without auth, this is done this way&lt;br /&gt;
 db networks setprop {$network} RelayRequiresAuth disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* In case you needs are not fulfilled because you need to accommodate a list of remote IP or a sub network of a larger trusted network, you can create a custom template. Here for reference the accepted formats:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients&lt;br /&gt;
 # a subnetwork by only using a prefix of full ip&lt;br /&gt;
 echo &amp;quot;10.10.0.&amp;quot;&amp;gt;&amp;gt;  /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 # an external ip&lt;br /&gt;
 echo &amp;quot;99.10.1.23&amp;quot; &amp;gt;&amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 # an external network you control&lt;br /&gt;
 echo &amp;quot;164.163.12.1/30&amp;quot; &amp;gt;&amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
* Disable smtp authentication on all local interfaces as shown in [[Bugzilla: 6522]]&lt;br /&gt;
&lt;br /&gt;
 config setprop qpsmtpd RelayRequiresAuth disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===SMTP Authentication TLS before Auth disable &amp;amp; enable===&lt;br /&gt;
Since SME v7.5 the default for SMTP Authentication is &#039;requires TLS before Auth&#039; to increase security.&lt;br /&gt;
Where a SME7.4 or earlier server with SMTP &amp;amp; SSMTP authentication enabled has been upgraded, users are now unable to send mail.&lt;br /&gt;
Users will need to enable TLS or Auto for the Authentication encryption setting in their email clients. Some older email clients and devices do not support TLS.&lt;br /&gt;
&lt;br /&gt;
A fix was released in SME7.5.1 to allow this setting to be disabled (ie revert to SME7.4 functionality). Upgrade to SME7.5.1 before using these commands.&lt;br /&gt;
&lt;br /&gt;
To disable this (AUTH without TLS) &amp;amp; revert to SME7.4 defaults do&lt;br /&gt;
 config setprop qpsmtpd TlsBeforeAuth 0&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To change back to the sme7.5 &amp;amp; greater default (AUTH with TLS) do &lt;br /&gt;
 config setprop qpsmtpd TlsBeforeAuth 1&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
See http://forums.contribs.org/index.php/topic,46218.0.html&lt;br /&gt;
&lt;br /&gt;
http://bugs.contribs.org/show_bug.cgi?id=5997&lt;br /&gt;
&lt;br /&gt;
===Internet provider&#039;s outgoing port 25 is blocked: How to set an alternative outgoing port for the SMTP server===&lt;br /&gt;
If your Internet provider is blocking outgoing smtp port 25 on your internet connection but your provider is offering an alternative outgoing port (or when using some relay service) you can simply set this alternative port by adding it to the &#039;Address of Internet provider&#039;s mail server&#039; value in the &#039;E-mail delivery settings&#039; screen of the server-manager like this:&lt;br /&gt;
 &amp;lt;internet providers mail server name or ip-address&amp;gt;:&amp;lt;alternative port&amp;gt;&lt;br /&gt;
For example:  mail.mydomain.com:587&lt;br /&gt;
&lt;br /&gt;
This setting does not alter the incoming smtp mail server port on SME server, which will still use port 25. Refer to a workaround in http://wiki.contribs.org/PortRedirect&lt;br /&gt;
&lt;br /&gt;
===How do I enable and configure a disclaimer in email messages===&lt;br /&gt;
A disclaimer message can be added to the footer of all outgoing email messages.&lt;br /&gt;
&lt;br /&gt;
The message can be the same for all domains or it can be different for all domains.&lt;br /&gt;
&lt;br /&gt;
This functionality is part of sme7.2 release so make sure you have upgraded before doing this.&lt;br /&gt;
&lt;br /&gt;
To create a general disclaimer for all domains on your sme server&lt;br /&gt;
 config setprop smtpd disclaimer enabled&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer&lt;br /&gt;
Enter the required disclaimer text &lt;br /&gt;
&lt;br /&gt;
To save &amp;amp; exit&lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
To make the changes take effect&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create domain specific disclaimers, create seperate domain based disclaimer text files&lt;br /&gt;
&lt;br /&gt;
Delete the general (all domains) disclaimer file if you have already created it&lt;br /&gt;
 rm  /service/qpsmtpd/config/disclaimer&lt;br /&gt;
 config setprop smtpd disclaimer enabled&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain1.com.au&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain2.com&lt;br /&gt;
 nano -w /service/qpsmtpd/config/disclaimer_domain3.org&lt;br /&gt;
&lt;br /&gt;
Enter the required text in each disclaimer file&lt;br /&gt;
&lt;br /&gt;
To save &amp;amp; exit&lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
After making any changes remember to do&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note if you only wish to have a disclaimer for some domains, then only create a disclaimer text file for those domains &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note also the criteria for when a disclaimer is attached &lt;br /&gt;
&lt;br /&gt;
(see http://bugs.contribs.org/show_bug.cgi?id=2648)&lt;br /&gt;
&lt;br /&gt;
eg a disclaimer is added to internal to external messages but not internal to internal messages.&lt;br /&gt;
&lt;br /&gt;
To disable the disclaimer function for all domains on your sme server&lt;br /&gt;
 config setprop smtpd disclaimer disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Email WBL server manager panel===&lt;br /&gt;
&lt;br /&gt;
There is a server-manager contrib to allow GUI control of email white and black lists, detailed in the wiki article: [[:Email_Whitelist-Blacklist_Control]].&lt;br /&gt;
&lt;br /&gt;
The panel allows easy configuration of functionality that is built into qmail, qpsmtpd and spamassassin. For more information google for qmail &amp;amp; qpsmtpd, read the spamassassin section in this wiki article and see [[:Email#Default_Plugin_Configuration default qpsmtpd plugin confguration]]).&lt;br /&gt;
&lt;br /&gt;
There are two main sections, Blacklist and Whitelist, where you can control settings.&lt;br /&gt;
&lt;br /&gt;
Note that there are subtle differences in syntax between whitelist and blacklist entries&lt;br /&gt;
&lt;br /&gt;
Blacklist - Black lists are used for rejecting e-mail traffic&lt;br /&gt;
&lt;br /&gt;
  DNSBL status      - DNSBL is an abbreviation for &amp;quot;DNS blacklist&amp;quot;. &lt;br /&gt;
                      It is a list of IP addresses known to be spammers.&lt;br /&gt;
  RHSBL status      - RHSBL is an abbreviation for &amp;quot;Right Hand Side Blacklist&amp;quot;. &lt;br /&gt;
                      It is a list of domain names known to be spammers.&lt;br /&gt;
  qpsmtpd badhelo   - Check a HELO message delivered from a connecting host. &lt;br /&gt;
                      Reject any that appear in badhelo during the &#039;helo&#039; stage.&lt;br /&gt;
  qmail badmailfrom - Check envelope sender addresses. &lt;br /&gt;
                      Reject any that appear (@host or user@host) in badmailfrom during the &#039;mail&#039;           &lt;br /&gt;
                      stage.&lt;br /&gt;
  spamassassin blacklist_from - Any envelope sender of a mail (*@host or user@host) matching an &lt;br /&gt;
                                entry in blacklist_from will be rejected by spamassassin.&lt;br /&gt;
&lt;br /&gt;
Whitelists - White lists are used for accepting e-mail traffic&lt;br /&gt;
&lt;br /&gt;
  Whitelists status           - White Lists: ACCEPT&lt;br /&gt;
  qpsmtpd whitelisthosts      - Any IP address listed in whitelisthosts will be exempted &lt;br /&gt;
                                from any further validation during the &#039;connect&#039; stage.&lt;br /&gt;
  qpsmtpd whitelisthelo       - Any host that issues a HELO matching an entry in whitelisthelo &lt;br /&gt;
                                will be exempted from further validation during the &#039;helo&#039; stage.&lt;br /&gt;
  qpsmtpd whitelistsenders    - Any envelope sender of a mail (host or user@host) matching an &lt;br /&gt;
                                entry in whitelistsenders will be exempted from further validation&lt;br /&gt;
                                during the &#039;mail&#039; stage.&lt;br /&gt;
  spamassassin whitelist_from - Any envelope sender of a mail (*@host or user@host) matching an &lt;br /&gt;
                                entry in whitelist_from will be exempted from spamassassin rejection.&lt;br /&gt;
&lt;br /&gt;
===How to block email from one address to another address with check_badmailfromto plugin===&lt;br /&gt;
&lt;br /&gt;
Enable the check_badmailfromto plugin. Adapted from [http://forums.contribs.org/index.php/topic,35667.0.html this Forum post]&lt;br /&gt;
&lt;br /&gt;
This is based heavily on the similar check_badmailfrom, but this plugin references both the&lt;br /&gt;
FROM: and TO: lines, and if they both are present in the badmailfromto&lt;br /&gt;
config file (a tab delimited list of FROM/TO pairs), then the message is&lt;br /&gt;
blocked as if the recipient (TO) didn&#039;t exist.  This is specifically designed&lt;br /&gt;
to not give the impression that the sender is blocked (good for cases of&lt;br /&gt;
harassment). &lt;br /&gt;
&lt;br /&gt;
====Prior SME9.2 : qpsmtpd check_badmailfromto plugin====&lt;br /&gt;
To control mail from external locations to internal locations do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins&lt;br /&gt;
 echo &amp;quot;check_badmailfromto&amp;quot; &amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To control mail sent from internal locations to internal locations, in addition to the above also do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Since SME9.2 : qpsmtpd badmailfromto plugin====&lt;br /&gt;
remove previous templates, if you are updating&lt;br /&gt;
 rm /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto \&lt;br /&gt;
 /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto \&lt;br /&gt;
 /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto&lt;br /&gt;
&lt;br /&gt;
To control mail from external locations to internal locations do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins&lt;br /&gt;
 echo &amp;quot;badmailfromto&amp;quot; &amp;gt; /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
To control mail sent from internal locations to internal locations, in addition to the above also do&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31badmailfromto&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====For Qmail====&lt;br /&gt;
 &lt;br /&gt;
Create and configure the badmailfromto custom template fragment&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control/badmailfromto&lt;br /&gt;
 nano -w /etc/e-smith/templates-custom/var/qmail/control/badmailfromto/template-begin&lt;br /&gt;
&lt;br /&gt;
Type in the From and To pairs that you want to stop email delivery for, with a tab between them and a carriage return at the end of the line, with additional pairs on a new line ie&lt;br /&gt;
 user@bad-domain.com tab user@yourdomain.com enter&lt;br /&gt;
 user@bad-domain2 tab user2@yourdomain enter&lt;br /&gt;
&lt;br /&gt;
Note also that wildcards or blank spaces are not supported&lt;br /&gt;
&lt;br /&gt;
eg&lt;br /&gt;
 john@aol.com      mary@yourdomain&lt;br /&gt;
 bill@yahoo.com      paul@yourdomain.com&lt;br /&gt;
&lt;br /&gt;
then save using &lt;br /&gt;
 Ctrl o&lt;br /&gt;
 Ctrl x&lt;br /&gt;
&lt;br /&gt;
Expand the template to update the /var/qmail/control/badmailfromto config file&lt;br /&gt;
 expand-template /var/qmail/control/badmailfromto&lt;br /&gt;
&lt;br /&gt;
Restart mail services&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Redirect mail.domain.net to Webmail===&lt;br /&gt;
Setup external dns records&lt;br /&gt;
&lt;br /&gt;
Add mail.domain.net in Domains panel in server-manager&lt;br /&gt;
 db domains setprop mail.dom.ain TemplatePath ProxyPassVirtualHosts ProxyPassTarget http://sme.dom.ain/webmail&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
&lt;br /&gt;
where http://sme.dom.ain/webmail is servername.domainname/webmail&lt;br /&gt;
&lt;br /&gt;
===E-mail Retrieval===&lt;br /&gt;
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Retrieval&lt;br /&gt;
&lt;br /&gt;
If your ISP does not provide a custom sort field and you experience the following errors occuring when Multidrop is enabled and the &amp;quot;Select Sort Method (for multi-drop)&amp;quot; is set to Default: &lt;br /&gt;
&lt;br /&gt;
 fetchmail: warning: multidrop for pop3.mypopserver.com requires envelope option!&lt;br /&gt;
 fetchmail: warning: Do not ask for support if all mail goes to postmaster!&lt;br /&gt;
&lt;br /&gt;
and/or&lt;br /&gt;
&lt;br /&gt;
 fetchmail: warning: multidrop for my.isp.domain requires envelope option! &lt;br /&gt;
 fetchmail: warning: Do not ask for support if all mail goes to postmaster! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set &amp;quot;Select Sort Method (for multi-drop) to &#039;Received&#039; or &#039;for&#039;&lt;br /&gt;
As described at [[bugzilla:5602]] [[bugzilla:6483]]&lt;br /&gt;
&lt;br /&gt;
===Domain Authentication===&lt;br /&gt;
{{WIP box|trex1512}}&lt;br /&gt;
Major mail hosting companies (Google, Yahoo, Microsoft) have made domain-authentication mandatory so as to not mark incoming mail as spam.&lt;br /&gt;
&lt;br /&gt;
To facilitate this support for DomainKeys and DKIM signing needs to be enabled in SME&#039;s mail subsystem. These techniques require the adding of records in the DNS zone for the user&#039;s domain. The DKIM/DK/SPF/SenderID configuration has to be added to your your DNS server / registrar.&lt;br /&gt;
&lt;br /&gt;
===How do I remove an email address from the everyone group===&lt;br /&gt;
By default, all users are automatically added to the user group &amp;quot;everyone&amp;quot;. If you would like to remove a user from this group, connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop username EveryoneEmail no&lt;br /&gt;
 signal-event user-modify username&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I remove an email address from any regular group===&lt;br /&gt;
By default, all users member of a group &amp;quot;group1&amp;quot; are automatically added as recipients of mail sent to group1@domain. If you would like to remove a user from this group, connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop group1 EmailExcludeUsers tom,jack &lt;br /&gt;
 signal-event group-modify group1&lt;br /&gt;
&lt;br /&gt;
If you want to prevent all the user members from another group &amp;quot;group2&amp;quot; from receiving emails addressed to group1@domain while they are also member of group1, you could connect to the server using SSH or locally log in to the server and issue the commands below. Be sure to substitute the name of the user you want to remove for the word username.&lt;br /&gt;
&lt;br /&gt;
 db accounts setprop group1  EmailExcludeGroups group2&lt;br /&gt;
 signal-event group-modify group1&lt;br /&gt;
&lt;br /&gt;
All members of the group will still be member for all other purpose (samba access to ibays as an example)&lt;br /&gt;
&lt;br /&gt;
This behaviour is only available as per e-smith-qmail-2.4.0-7.sme see bug #9540&lt;br /&gt;
&lt;br /&gt;
===Change the number of logs retained for qpsmtpd and/or sqpsmtpd===&lt;br /&gt;
The normal retention is 5 logs for both qpsmptd and sqpsmtpd. This may or may not fit all installations. This information is pulled from bugzilla.&lt;br /&gt;
&lt;br /&gt;
Check your config to see if any change has been made to the default log retention rules. Note there are different rules for qpsmtpd and sqpsmtpd. You have to make changes to both as you require.&lt;br /&gt;
 config show qpsmtpd&lt;br /&gt;
If the KeepLogFiles property isn&#039;t listed, the default rules apply. Determine how many logs you would like to keep and apply that to the following example. In the command below, 15 is used to keep 15 qpsmtpd logs.&lt;br /&gt;
 db configuration setprop qpsmtpd KeepLogFiles 15&lt;br /&gt;
Restart multilog with the following.&lt;br /&gt;
 sv t /service/qpsmtpd/log&lt;br /&gt;
Check that your setting saved.&lt;br /&gt;
 ps aux | grep qpsmtpd | grep multi&lt;br /&gt;
Look for the line that ends with /var/log/qpsmtpd and verify the number after n equals your KeepLogFiles property from above.&lt;br /&gt;
&lt;br /&gt;
==DKIM Setup - qpsmtpd version&amp;lt;0.96==&lt;br /&gt;
&lt;br /&gt;
A plugin has been written and is available in SME&lt;br /&gt;
&lt;br /&gt;
To activate it manually follow the steps below, or download a shell script that will do the server based stuff for you &amp;amp; guide you on the DNS stuff [ftp://ftp.gfitc.com.au:2121/e-smith/setup_dkim.sh setup_dkim.sh]:-&lt;br /&gt;
&lt;br /&gt;
Note:  I&#039;d recommend reviewing the script first to make sure you&#039;re happy to run it on your system&lt;br /&gt;
&lt;br /&gt;
Create a folder:&lt;br /&gt;
 mkdir /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
Then:&lt;br /&gt;
 cd /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
 openssl genrsa -out dkim.private 1024&lt;br /&gt;
 openssl rsa -in dkim.private -pubout -out dkim.public&lt;br /&gt;
 chown qpsmtpd:qpsmtpd -R /var/service/qpsmtpd/config/dkimkeys/&lt;br /&gt;
 chmod 0700 dkim.private&lt;br /&gt;
For each domain you want to sign:&lt;br /&gt;
 cp -a dkim.private &amp;lt;fully qualified domain name&amp;gt;.private (less the &amp;lt;&amp;gt; brackets)&lt;br /&gt;
Then create a template fragment:&lt;br /&gt;
 mkdir --parent /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;dkim_sign keys dkim&amp;quot;&amp;gt;/etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Finally propagate your public key &amp;quot;dkim.public&amp;quot; content (&amp;lt;key text&amp;gt;) to your DNS.&lt;br /&gt;
&lt;br /&gt;
Check with your DNS server / registrar. Something similar to the following should work but it varies depending on provider - replace &amp;lt;fully qualified domain name&amp;gt; with your doman details e.g &amp;quot;mydomain.org&amp;quot; (less the &amp;lt;&amp;gt; brackets):&lt;br /&gt;
&lt;br /&gt;
When extracting the key text from the dkim.public file it&#039;s on multiple lines.  For the key to work for us in the DNS TXT record we need to exclude the header &amp;amp; footer lines &amp;amp; have just the key text as a single line string (the setup_dkim.sh script provides this info in the format required).&lt;br /&gt;
&lt;br /&gt;
default._domainkey.&amp;lt;fully qualified domain name&amp;gt; IN TXT &amp;quot;k=rsa; p=&amp;lt;key text&amp;gt;; t=y&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With Zonedit the following works within your Zone :&lt;br /&gt;
&lt;br /&gt;
Subdomain : default._domainkey&lt;br /&gt;
&lt;br /&gt;
Type : TXT&lt;br /&gt;
&lt;br /&gt;
Text : &amp;quot;v=DKIM1;k=rsa; p=&amp;lt;key text&amp;gt;; t=y&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to customize the signing you can add parameters to the line in /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign. Parameters and value are separated by a space only.&lt;br /&gt;
&lt;br /&gt;
#keys : &amp;quot;dk&amp;quot; or &amp;quot;domainkeys&amp;quot; for domainkey signature only, &amp;quot;dkim&amp;quot; for DKIM signature only, default &amp;quot;both&amp;quot; (n.b. above template example is dkim ONLY)&lt;br /&gt;
#dk_method : for domainkey method , default &amp;quot;nofws&amp;quot;&lt;br /&gt;
#selector : the selector you want, default &amp;quot;default&amp;quot;&lt;br /&gt;
#algorithm : algorithm for DKIM signing, default &amp;quot;rsa-sha1&amp;quot;&lt;br /&gt;
#dkim_method : for DKIM, default &amp;quot;relaxed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NB: key files can not be defined in parameters, they need to be in /var/service/qpsmtpd/config/dkimkeys/{SENDER_DOMAIN}.private&lt;br /&gt;
&lt;br /&gt;
{{Tip box|msg=You can verify that your settings are correct by sending an email to [mailto:check-auth@verifier.port25.com check-auth@verifier.port25.com], a free service the purpose of which is to verify if your domain does not contradict mail policies. Please check the answer carefully. See [[bugzilla:4558#c6]] }}&lt;br /&gt;
&lt;br /&gt;
See also : [[bugzilla:8251]] [[bugzilla:8252]]&lt;br /&gt;
&lt;br /&gt;
==DKIM Setup - qpsmtpd version &amp;gt;= 0.96==&lt;br /&gt;
&lt;br /&gt;
Version 0.96 and above supports DKIM natively without the need for extra plugins.&lt;br /&gt;
&lt;br /&gt;
All you have to do is to enable the DKIM signing and promulgate the DNS TXT entries to support it.&lt;br /&gt;
&lt;br /&gt;
Enable the signing:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
and then run:&lt;br /&gt;
 qpsmtpd-print-dns &amp;lt;domain name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to show the DNS entry(s) required.&lt;br /&gt;
&lt;br /&gt;
Then you have to update your DNS.&lt;br /&gt;
&lt;br /&gt;
{{Tip box|msg=You can verify that your settings are correct by sending an email to [mailto:check-auth@verifier.port25.com check-auth@verifier.port25.com], a free service the purpose of which is to verify if your domain does not contradict mail policies. Please check the answer carefully. See [[bugzilla:4558#c6]] }}&lt;br /&gt;
&lt;br /&gt;
also see [[bugzilla:9694]] and https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation&lt;br /&gt;
&lt;br /&gt;
More details are available [https://wiki.contribs.org/Email#Inbound_DKIM_.2F_SPF_.2F_DMARC here]&lt;br /&gt;
&lt;br /&gt;
Incoming DKIM checking is also enabled out of the box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case you got a problem using the DKIM field provided with your DNS provider /registrar, please first contact them to ensure the problem is not how you try to enter the information. In the likelihood, you got &amp;quot;invalid field&amp;quot; or &amp;quot;too long field&amp;quot; errors and your provider is not able to help you or update its interface, you can generate a shorter DKIM key (with 1024 instead of the default 2048) this way: &lt;br /&gt;
&lt;br /&gt;
 cd /home/e-smith/dkim_keys/default&lt;br /&gt;
 mv private private.long&lt;br /&gt;
 mv public public.long&lt;br /&gt;
 openssl genrsa -out private 1024&lt;br /&gt;
 openssl rsa -in private -pubout -out public&lt;br /&gt;
 chown qpsmtpd:qpsmtpd private&lt;br /&gt;
 chown root:qpsmtpd public&lt;br /&gt;
 chmod 0400 private&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 qpsmtpd-print-dns&lt;br /&gt;
&lt;br /&gt;
===Outbound DKIM signing / SPF / DMARC policy FOR MULTIPLE DOMAINS===&lt;br /&gt;
The default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domains that you manage:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
If you want to disable dkim signing for a domain, you can use:&lt;br /&gt;
 db domains setprop domain.com DKIMSigning disabled &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:&lt;br /&gt;
 cd /home/e-smith/dkim_keys &lt;br /&gt;
 mkdir domain.net &lt;br /&gt;
 cd domain.net &lt;br /&gt;
 echo default &amp;gt; selector &lt;br /&gt;
 openssl genrsa -out private 2048 &lt;br /&gt;
 openssl rsa -in private -out public -pubout &lt;br /&gt;
 chown qpsmtpd:qpsmtpd private &lt;br /&gt;
 chmod 400 private &lt;br /&gt;
 signal-event email-update&lt;br /&gt;
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.&lt;br /&gt;
&lt;br /&gt;
==Domain Keys==&lt;br /&gt;
&lt;br /&gt;
There is a plugin to check incoming mail has been signed&lt;br /&gt;
&lt;br /&gt;
Please read here for more details : http://bugs.contribs.org/show_bug.cgi?id=4569&lt;br /&gt;
&lt;br /&gt;
{{Warning box|msg=There is a plugin for signing with DomainKeys but it is not installed by default. It has not been tested on Koozali SME Server:&lt;br /&gt;
&lt;br /&gt;
http://wiki.qpsmtpd.org/doku.php?id=plugins:spam:domainkeys_sign}} &lt;br /&gt;
&lt;br /&gt;
==Other information==&lt;br /&gt;
&lt;br /&gt;
DomainKeys seem to be deprecated in favour of DKIM.&lt;br /&gt;
&lt;br /&gt;
The DomainKeys plugin only CHECKS incoming email. Spamassassin checks for DKIM.&lt;br /&gt;
&lt;br /&gt;
===Temporary_error_on_maildir_delivery===&lt;br /&gt;
&lt;br /&gt;
In certains cases you have some mailboxes which can&#039;t delivery messages and the qmail log say:&lt;br /&gt;
&lt;br /&gt;
 deferral: Temporary_error_on_maildir_delivery._(#4.3.0)/&lt;br /&gt;
&lt;br /&gt;
It is probably that your users  want to go beyond the upper limit of their quota, [[SME_Server:Documentation:Administration_Manual:Chapter9#Quotas|so you have to increase it]]. This could solve their problems.&lt;br /&gt;
&lt;br /&gt;
==External Access==&lt;br /&gt;
===Allow external IMAP mail access===&lt;br /&gt;
There was a deliberate decision to remove non-SSL protected username/password&lt;br /&gt;
services from the external interface.&lt;br /&gt;
&lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
&lt;br /&gt;
to allow &#039;&#039;&#039;unsecure IMAP access&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 config setprop imap access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
But before you do this try to use secure IMAP (IMAPS or imap over ssl) with port 993&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===POP3 &amp;amp; webmail HTTP===&lt;br /&gt;
I want to set my SMESERVER to allow POP3 (or webmail HTTP) but it&#039;s not an option, I only see POP3S (or webmail HTTPS).&lt;br /&gt;
&lt;br /&gt;
The SMESERVER is secure by design. POP3 (or webmail HTTP) is viewed as inadequate security and removed as an option from a standard installation to encourage unknowing administrators to select the &#039;best practice&#039; option -a secure connection with POP3S, IMAPS, or HTTPS.&lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
You can still set your SMESERVER to allow POP3 settings by:&lt;br /&gt;
 config setprop pop3 access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
===Allow external pop3 access===&lt;br /&gt;
&lt;br /&gt;
Email settings &amp;gt; POP3 server access in SME 7.1 server-manager allows only pop3s protocol for clients outside the LAN.  Some email clients (eg The Bat! v3.98.4) won&#039;t allow pop3s connections to SME 7.1 because of ssl version conflict.  Until this is sorted out, a workaround is to hack SME to allow regular pop3 on the external interface using the following commands. &lt;br /&gt;
{{Warning box|Keep in mind that your passwords, your data won&#039;t be protected and will be in clear text over Internet}}&lt;br /&gt;
 config setprop pop3 access public&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
 svc -t /service/pop3s  &lt;br /&gt;
&lt;br /&gt;
more information [[bugzilla:2620]]&lt;br /&gt;
&lt;br /&gt;
==Imap==&lt;br /&gt;
===Folders with a dot in name===&lt;br /&gt;
Email folder names that have a period (&#039;.&#039;) in the folder name, will be split into sub-folders.&lt;br /&gt;
e.g. folder name &#039;www.contribs.org&#039; is created as&lt;br /&gt;
 www&lt;br /&gt;
   contribs&lt;br /&gt;
         org&lt;br /&gt;
===Dovecot Idle_Notify===&lt;br /&gt;
Poor battery consumption issues has been reported with K9-mail on recent Android systems. It is apparent one way of helping this is to modify the imap_idle_notify setting. The default is in Dovecot, and therefore on SME is 2 minutes.&lt;br /&gt;
&lt;br /&gt;
K9 has an idle refresh of 24 mins but it seems with Dovecot defaults at 2 mins it causes lots of wake ups and battery drain.&lt;br /&gt;
&lt;br /&gt;
This is configurable via a config db property.&lt;br /&gt;
&lt;br /&gt;
Default on install&lt;br /&gt;
 # config show dovecot&lt;br /&gt;
  dovecot=service&lt;br /&gt;
    Quotas=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Set dovecot Idle_Notify to 20 minutes&lt;br /&gt;
&lt;br /&gt;
 # config setprop dovecot Idle_Notify 20&lt;br /&gt;
 # config show dovecot&lt;br /&gt;
  dovecot=service&lt;br /&gt;
    Idle_Notify=20&lt;br /&gt;
    Quotas=enabled&lt;br /&gt;
    status=enabled&lt;br /&gt;
&lt;br /&gt;
Expand template to update *.conf (can also issue a full reconfigure/reboot)&lt;br /&gt;
&lt;br /&gt;
 # expand-template /etc/dovecot/dovecot.conf&lt;br /&gt;
 # dovecot -a |grep imap_idle_notify_interval&lt;br /&gt;
   imap_idle_notify_interval = 20 mins&lt;br /&gt;
&lt;br /&gt;
==qpsmtpd==&lt;br /&gt;
SME uses the [http://smtpd.develooper.com qpsmtpd] smtp daemon.&lt;br /&gt;
&lt;br /&gt;
===Official Description===&lt;br /&gt;
qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core SMTP features, all functionality is implemented in small &amp;quot;extension plugins&amp;quot; using the easy to use object oriented plugin API.&lt;br /&gt;
&lt;br /&gt;
qpsmtpd was originally written as a drop-in qmail-smtpd replacement, but now it also includes smtp forward, postfix, exim and maildir &amp;quot;backends&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
qpsmtpd wiki: http://wiki.qpsmtpd.org&lt;br /&gt;
&lt;br /&gt;
===Log watching tool===&lt;br /&gt;
qplogtail is a script to to monitor /var/log/qpsmtpd/current, see [[bugzilla:3418]]&lt;br /&gt;
&lt;br /&gt;
===Qpsmtpd for SME versions 9.1 and earlier===&lt;br /&gt;
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsptpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.1 and earlier, except where the plugin has been retained, See the next section for the new details.}}&lt;br /&gt;
====Default Plugin Configuration====&lt;br /&gt;
SME uses the following [http://wiki.qpsmtpd.org/plugins qpsmtpd plugins] to evaluate each incoming email. &lt;br /&gt;
&lt;br /&gt;
SME maintains 2 distinct configurations: one for the &#039;local&#039; networks (as defined in server-manager::Security::Local networks) and another for &#039;remote&#039; networks (everyone else).&lt;br /&gt;
&lt;br /&gt;
The default configuration of each plugin is indicated in the &#039;Default Status&#039; column.&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Plugin&lt;br /&gt;
!Purpose&lt;br /&gt;
!Default Status&lt;br /&gt;
|-&lt;br /&gt;
|hosts_allow&lt;br /&gt;
|Prohibit more than &amp;quot;InstancesPerIP&amp;quot; connections from any single host (change with &#039;config setprop smtpd InstancesPerIP&#039;).  Allow or deny connections according to the contents of /var/service/qpsmtpd/config/hosts_allow.  See [http://svn.perl.org/qpsmtpd/trunk/plugins/hosts_allow hosts_allow SVN code] for more details.&lt;br /&gt;
|[http://bugs.contribs.org/show_bug.cgi?id=3352 enabled]&lt;br /&gt;
|-&lt;br /&gt;
|peers&lt;br /&gt;
|Allow different plugin configuration based on the sending computer&#039;s IP address.  By default SME maintains different configurations for the local networks (in /var/service/qpsmtpd/config/peers/local) and for everyone else (in /var/service/qpsmtpd/config/peers/0)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|logging/logterse&lt;br /&gt;
|Allow greater logging detail using smaller log files.  Optionally supports [[Email_Statistics#qplogsumm.pl|qplogsumm.pl]] to compile qpsmtpd statistics.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|auth/auth_cvm_unix_local&lt;br /&gt;
|Allow authenticated smtp relay&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[qpsmtpd_check_earlytalker|check_earlytalker]]&lt;br /&gt;
|reject email from servers that talk out of turn&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|count_unrecognized_commands&lt;br /&gt;
|reject email from servers that issue &#039;&#039;X&#039;&#039; invalid commands&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|bcc&lt;br /&gt;
|bcc all email to a specific address for archiving&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_relay&lt;br /&gt;
|Check to see if relaying is allowed (in case the recipient is not listed in one of SME&#039;s local domains)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_norelay&lt;br /&gt;
|Check to see if the sending server is specifically forbidden to relay through us.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|require_resolvable_fromhost&lt;br /&gt;
|Check that the domain listed in the sender&#039;s email address is resolvable&lt;br /&gt;
|enabled (remote)&amp;lt;br&amp;gt;&#039;&#039;&#039;disabled (local)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_basicheaders&lt;br /&gt;
|reject email that lacks either a From: or Date: header&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|rhsbl&lt;br /&gt;
|Reject email if the sender&#039;s email domain has a reputation for disregarding smtp RFCs.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;(always disabled for local connections)&lt;br /&gt;
|-&lt;br /&gt;
|dnsbl&lt;br /&gt;
|Reject email from hosts listed in your configured dnsbl servers&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|check_badmailfrom&lt;br /&gt;
|Reject email where the sender address is listed in /var/service/qpsmtpd/config/badmailfrom&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_badrcptto_patterns&lt;br /&gt;
|Reject email addressed to any address matching an expression listed in /var/service/qpsmtpd/config/badrcptto_patterns&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_badrcptto&lt;br /&gt;
|Reject email addressed to any address listed in /var/service/qpsmtpd/config/badrcptto&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_spamhelo&lt;br /&gt;
|Reject email from hosts that say &#039;helo ...&#039; using a value in /var/service/qpsmtpd/config/badhelo&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|check_smtp_forward&lt;br /&gt;
|If &#039;&#039;config show DelegateMailServer&#039;&#039; or &#039;&#039;db domains show &amp;lt;domainname&amp;gt; MailServer&#039;&#039; is set (telling SME to deliver email for all domains or just &amp;lt;domainname&amp;gt; to another server), check_smtp_forward will connect to the specified server and will reject the message outright if the internal mail server would also reject it.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;unless an internal mail server is configured.&lt;br /&gt;
|-&lt;br /&gt;
|check_goodrcptto&lt;br /&gt;
|Accept email only if the recipient address matches an entry in /var/service/qpsmtpd/config/goodrcptto.  For domains that are configured to use an internal mail server, the entire domain name will be added to .../goodrcptto.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|rcpt_ok&lt;br /&gt;
|Return &#039;OK&#039; if none of the other host checks has returned &#039;DENY&#039; (??)&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|pattern_filter&lt;br /&gt;
|Reject email according to content patterns (??)&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|tnef2mime&lt;br /&gt;
|Convert MS TNEF (winmail.dat) and uuencoded attachments to MIME&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|disclaimer&lt;br /&gt;
|Add a configurable disclaimer to email messages&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|spamassassin&lt;br /&gt;
|Check email using spamassassin, and optionally reject it completely if the score exceeds a configurable value.&lt;br /&gt;
|&#039;&#039;&#039;disabled&#039;&#039;&#039;&amp;lt;br&amp;gt;(always disabled for local connections)&lt;br /&gt;
|-&lt;br /&gt;
|virus/clamav&lt;br /&gt;
|Scan incoming email with ClamAV&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|queue/qmail-queue&lt;br /&gt;
|Deliver the incoming message to qmail for delivery.&lt;br /&gt;
|enabled&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Qpsmtpd for SME versions 9.2 and Later===&lt;br /&gt;
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsmtpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.2 and later version, see the previous section for the details.}}&lt;br /&gt;
&lt;br /&gt;
This section has been taken from the notes prepared by the dev who made the changes, the wiki is [https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation here]. &lt;br /&gt;
&lt;br /&gt;
Here is a list of the plugins in use, and a note of any changes that might have occurred:&lt;br /&gt;
&lt;br /&gt;
*logterse: no change&lt;br /&gt;
*tls: no change&lt;br /&gt;
*auth_cvm_unix_local: no change&lt;br /&gt;
*check_earlytalker: &#039;&#039;&#039;renamed earlytalker&#039;&#039;&#039;&lt;br /&gt;
*count_unrecognized_commands: no change&lt;br /&gt;
*bcc: no change&lt;br /&gt;
*check_relay: &#039;&#039;&#039;renamed relay&#039;&#039;&#039;&lt;br /&gt;
*check_norelay: &#039;&#039;&#039;merged into the relay plugin&#039;&#039;&#039;&lt;br /&gt;
*require_resolvable_fromhost: &#039;&#039;&#039;renamed resolvable_fromhost&#039;&#039;&#039;&lt;br /&gt;
*check_basicheaders: &#039;&#039;&#039;renamed headers&#039;&#039;&#039;&lt;br /&gt;
*rhsbl: no change&lt;br /&gt;
*dnsbl: no change&lt;br /&gt;
*check_badmailfrom: &#039;&#039;&#039;renamed badmailfrom&#039;&#039;&#039;&lt;br /&gt;
*check_badrcptto_patterns: &#039;&#039;&#039;doesn&#039;t exist anymore, merged with badrcptto&#039;&#039;&#039;&lt;br /&gt;
*check_badrcptto: &#039;&#039;&#039;renamed badrcptto&#039;&#039;&#039;&lt;br /&gt;
*check_spamhelo: &#039;&#039;&#039;renamed helo&#039;&#039;&#039;&lt;br /&gt;
*check_smtp_forward: no change&lt;br /&gt;
*check_goodrcptto: no change&lt;br /&gt;
*rcpt_ok: no change&lt;br /&gt;
*pattern_filter: no change&lt;br /&gt;
*tnef2mime: no change&lt;br /&gt;
*spamassassin: no change&lt;br /&gt;
*clamav: no change&lt;br /&gt;
*qmail-queue: no change&lt;br /&gt;
&lt;br /&gt;
Here is a section for each of the new plugins which are installed by default. The ones that have not changed are documented [https://wiki.contribs.org/Email#Default_Plugin_Configuration above].&lt;br /&gt;
&lt;br /&gt;
====Karma====&lt;br /&gt;
&lt;br /&gt;
The karma plugin tracks sender history. For each inbound email, various plugins can raise, or lower the &amp;quot;naughtiness&amp;quot; of the connection (eg, if SPF check passes, if the message is spammy etc...). For each host sending us email, the total number of connections, and the number of good and bad connections is recorded in a database. If a host as more bad than good connections in its history, emails will be rejected for 1 day. 3 settings are available for this plugin:&lt;br /&gt;
&lt;br /&gt;
*Karma (enabled|disabled): Default value is disabled. Change to enabled to use the plugin&amp;lt;br /&amp;gt;&lt;br /&gt;
*KarmaNegative (integer): Default value is 2.&amp;lt;br /&amp;gt; It&#039;s the delta between good and bad connection to consider the host naughty enough to block it for 1 day.&amp;lt;br /&amp;gt; Eg, with a default value of two, a host can be considered naughty if it sent you 8 good emails and 10 bad ones&amp;lt;br /&amp;gt;&lt;br /&gt;
*KarmaStrikes (integer): Default value is 3. This is the threshold for a single email to be considered good or bad. &amp;lt;br /&amp;gt;Eg, with the default value of 3, an email needs at least 3 bad karmas (reaches -3) for the connection to be considered bad.&amp;lt;br /&amp;gt;On the other side, 3 good karmas are needed for the connection to be considered good. Between the two, the connection is considered neutral&amp;lt;br /&amp;gt;and won&#039;t be used in the history count&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd Karma enabled KarmaNegative 3&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====URIBL====&lt;br /&gt;
&lt;br /&gt;
The URIBL plugin works a bit like RHSBL, except that it checks domain names found in the body of the email. For each URI identified, the corresponding domain name can be submitted to a BL list (through DNS queries). Two settings are available:&lt;br /&gt;
&lt;br /&gt;
*URIBL (enabled|disabled): Default is disabled. Set this to enabled to use the plugin&lt;br /&gt;
*UBLList: (Comma separated list addresses): Default value is &#039;&#039;&#039;multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net&#039;&#039;&#039;.&amp;lt;br /&amp;gt;This can be the same as RBLList. You can also set bitmask to use for combined lists (in the default value, the bitmask is 8-16-64-128)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd URIBL enabled UBLList multi.surbl.org,black.uribl.com&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Helo====&lt;br /&gt;
&lt;br /&gt;
Previously, the helo plugin was just checking for some known bad helo hostnames used by spammers (aol.com and yahoo.com). Now, it can check much more than that. This plugin is always enabled and has a single setting:&lt;br /&gt;
&lt;br /&gt;
*HeloPolicy: (lenient|rfc|strict). The default value is &#039;&#039;&#039;lenient&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See https://github.com/smtpd/qpsmtpd/blob/master/plugins/helo for a description of the various tests done at each level&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd HeloPolicy rfc&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
====Inbound DKIM / SPF / DMARC====&lt;br /&gt;
&lt;br /&gt;
DMARC is a policy on top of DKIM and SPF. By default, SPF and DKIM are now checked on every inbound emails, but no reject is attempted. The dmarc plugin can decide to reject the email (depending on the sender policy). dkim and spf plugins are always enabled. dmarc has two settings:&lt;br /&gt;
&lt;br /&gt;
*DMARCReject (enabled|disabled): Default value is disabled.&amp;lt;br /&amp;gt;If set to enabled, the dmarc plugin can decide to reject an email (if the policy of the sender is to reject on alignment failure)&amp;lt;br /&amp;gt;&lt;br /&gt;
*DMARCReporting (enabled|disabled): Default value is enabled.&amp;lt;br /&amp;gt;If set to enabled, enable reporting (which is the &#039;&#039;&#039;r&#039;&#039;&#039; in dma&#039;&#039;&#039;r&#039;&#039;&#039;c). Reporting is a very important part of the DMARC standard.&amp;lt;br /&amp;gt;When enabled, you&#039;ll record information about email you receive from domains which have published a DMARC policy in a local&amp;lt;br /&amp;gt;SQLite database (/var/lib/qpsmtpd/dmarc/reports.sqlite).&amp;lt;br /&amp;gt;Then, once a day, you send the aggregate reports to the domain owner so they have feedback.&amp;lt;br /&amp;gt;You can set this to disabled if you want to disable this feature&amp;lt;br /&amp;gt;&lt;br /&gt;
*SPFRejectPolicy (0|1|2|3|4): Default value is 0. Set the policy to apply in case of SPF failure when the sender hasn&#039;t published a DMARC policy.&amp;lt;br /&amp;gt;Note: this is only used when no DMARC policy is published by the sender.&amp;lt;br /&amp;gt;If there&#039;s a DMARC policy, even a &amp;quot;p=none&amp;quot; one (meaning no reject), then the email won&#039;t be rejected, even on failed SPF tests.&lt;br /&gt;
&lt;br /&gt;
:*0: do not reject anything&lt;br /&gt;
:*1: reject when SPF says fail&lt;br /&gt;
:*2: reject when SPF says softfail&lt;br /&gt;
:*3: reject when SPF says neutral&lt;br /&gt;
:*4: reject when an error occurred (like a syntax error in SPF entry) or if no SPF entry is published&lt;br /&gt;
&lt;br /&gt;
*Inbound DKIM checks are only used by DMARC. No reject solely based on DKIM is supported&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 db configuration setprop qpsmtpd DMARCReject disabled SPFRejectPolicy 2&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
====Outbound DKIM signing / SPF / DMARC policy====&lt;br /&gt;
&lt;br /&gt;
Everything is now ready for you to sign your outbound emails, and publish your public key, as well as your SPF and DMARC policy. A default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domain you manage:&lt;br /&gt;
 db configuration setprop qpsmtpd DKIMSigning enabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
If you want to disable dkim signing for a domain, you can use:&lt;br /&gt;
 db domains setprop domain.com DKIMSigning disabled&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:&lt;br /&gt;
 cd /home/e-smith/dkim_keys&lt;br /&gt;
 mkdir domain.net&lt;br /&gt;
 cd domain.net&lt;br /&gt;
 echo default &amp;gt; selector&lt;br /&gt;
 openssl genrsa -out private 2048&lt;br /&gt;
 openssl rsa -in private -out public -pubout&lt;br /&gt;
 chown qpsmtpd:qpsmtpd private&lt;br /&gt;
 chmod 400 private&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.&lt;br /&gt;
&lt;br /&gt;
====Publishing your DNS entries====&lt;br /&gt;
&lt;br /&gt;
Signing your outbound emails is just part of the process. You now need to publish some DNS entries so everyone can check if the email they receive matches your policy. This part is not to be done on your SME Server, but on your public DNS provider. A script helps you by creating some sample DNS entries already formatted for a bind-like zone file. To use it:&lt;br /&gt;
 qpsmtpd-print-dns &amp;lt;domain name&amp;gt;&lt;br /&gt;
If omitted, the primary domain name is assumed.&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
 Here are sample DNS entries you should add in your public DNS&lt;br /&gt;
 The DKIM entry can be copied as is, but others will probably need to be adjusted&lt;br /&gt;
 to your need. For example, you should either change the reporting email adress&lt;br /&gt;
 for DMARC (or create the needed pseudonym)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 default._domainkey IN TXT &amp;quot;v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/Qq3Ntpx2QNdRxGKMeKc2r9ULvyYW633IbLivHznN9JvjJIbS54PGIEk3sSxvZSdpTRAvYlxn/nRi329VmcDK0vJYb2ut2rnZ3VO3r5srm+XEvTNPxij5eU4gqw+5ayySDjqzAMEMc5V7lUMpZ/YiqnscA075XiMF7iEq8Quv1y0LokmgwtxzOXEZap34WXlKyhYzH+D&amp;quot;&amp;quot;fabF6SUllmA0ovODNvudzvEOanPlViQ7q7d+Mc3b7X/fzgJfh5P9f5U+iSmzgyGctSb6GX8sqsDMNVEsRZpSE3jd2Z33RDWyW21PGOKB/ZrLiliKfdJbd3Wo7AN7bWsZpQsei2Hsv1niQIDAQAB&amp;quot;&lt;br /&gt;
 @ IN SPF &amp;quot;v=spf1 mx a -all&amp;quot;&lt;br /&gt;
 @ IN TXT &amp;quot;v=spf1 mx a -all&amp;quot;&lt;br /&gt;
 _dmarc IN TXT &amp;quot;v=DMARC1; p=none; adkim=s; aspf=r; rua=mailto:dmarc-feedback@domain.net; pct=100&amp;quot;&lt;br /&gt;
All you have to do now is publish those records, but do note that there is a point to consider when publishing the default._domainkey DNS record, as produced by the &#039;&#039;qpsmtpd-print-dns&#039;&#039; command: if the DNS record includes &#039;&#039;;t=y&#039;&#039; then as per the DKIM specification ([http://dkim.org/specs/rfc4871-dkimbase.html#keys RFC4781 section 3.6.1]) this means that your &#039;&#039;&amp;quot;...domain is testing DKIM. Verifiers MUST NOT treat messages from signers in testing mode differently from unsigned email, even should the signature fail to verify. Verifiers MAY wish to track testing mode results to assist the signer.&amp;quot;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
On the other hand, if no &#039;&#039;;t=y&#039;&#039; is included, then it means you are intending to use DKIM in production mode. It might be a good idea to publish the DKIM DNS record first in testing mode (&#039;&#039;;t=y&#039;&#039; included), check how things go and if everything is alright, remove the &#039;&#039;;t=y&#039;&#039; part.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Testing====&lt;br /&gt;
You can install spfquery:&lt;br /&gt;
&lt;br /&gt;
 yum --enablerepo=epel install libspf2 libspf2-progs&lt;br /&gt;
&lt;br /&gt;
Usage (try -help for help):&lt;br /&gt;
&lt;br /&gt;
 spfquery -ip=11.22.33.44 -sender=user@aol.com -helo=spammer.tld&lt;br /&gt;
&lt;br /&gt;
Check record via dig&lt;br /&gt;
&lt;br /&gt;
 dig -t TXT +short somedomain.co.uk&lt;br /&gt;
&lt;br /&gt;
====Load====&lt;br /&gt;
The loadcheck plugin can temporarily deny inbound emails if your server is overloaded. This plugin is always enabled and has a single setting:&lt;br /&gt;
&lt;br /&gt;
*MaxLoad (int number): Default is 7. If your load is above this value, emails from the outside will be deferred.&lt;br /&gt;
&lt;br /&gt;
===Other QPSMTPD Plugins===&lt;br /&gt;
The following qpsmtpd plugins will work on a SME server, but are either not included or are not configured by default.&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Plugin&lt;br /&gt;
!Purpose&lt;br /&gt;
!Default Status&lt;br /&gt;
|-&lt;br /&gt;
|[[Qpsmtpd_connection_time|connection_time]]&lt;br /&gt;
|Track the total time for each qpsmtpd connection from &#039;Accepted connection&#039; through &#039;click, disconnecting&#039;, and output the results to the qpsmtpd log file.&lt;br /&gt;
|not installed - not clear if this works for SME9.2 (anyone?)&lt;br /&gt;
|-&lt;br /&gt;
|[[GeoIP]]&lt;br /&gt;
|Track the geographic origin of incoming email and optionally reject email from specified countries&lt;br /&gt;
|not installed - does work for SME 9.2 and later.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Internal or External Mail Servers==&lt;br /&gt;
SME can be configured as a spam and antivirus filter for one or more &amp;quot;Internal or External&amp;quot; mail servers on a domain-by-domain basis.  The mail server specified does not have to be on the same local network as your SME server, &amp;amp; can be hosted on an external site.&lt;br /&gt;
&lt;br /&gt;
===Deliver ALL email to a single internal or external mail server===&lt;br /&gt;
You can set the default delivery location for all domains on your SME server to a single &#039;&#039;internal or external&#039;&#039; mail server by setting the mail server address in server-manager::Configuration::E-mail::Change e-mail delivery settings::Address of internal mail server.&lt;br /&gt;
&lt;br /&gt;
Note: &#039;&#039;Address of internal mail server&#039;&#039; must be blank if you want any email delivered to the SME server itself.&lt;br /&gt;
&lt;br /&gt;
===Deliver email for one domain to an internal or external mail server===&lt;br /&gt;
You can override the default email delivery destination for individual domains on your SME server (forwarding all email for the specified domain to another server) as follows:&lt;br /&gt;
&lt;br /&gt;
First, create the necessary virtual domains using server-manager::Configuration::Domains::Add Domain.&lt;br /&gt;
&lt;br /&gt;
Then, (assuming your domain is called &#039;&#039;test.com&#039;&#039; and the actual mail server is at &#039;&#039;a.b.c.d&#039;&#039; issue the following commands:&lt;br /&gt;
 db domains setprop test.com MailServer a.b.c.d&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
A FQDN can also be used for the MailServer property, eg &#039;&#039;aspmx.l.google.com&#039;&#039; instead of the IP address &#039;&#039;a.b.c.d&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 db domains setprop test.com MailServer aspmx.l.google.com&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the internal or external mail server (and return email delivery for &#039;&#039;test.com&#039;&#039; to the default for your SME server) using:&lt;br /&gt;
 db domains delprop test.com MailServer&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
==Secondary/Backup Mail Server Considerations==&lt;br /&gt;
&lt;br /&gt;
Many people misunderstand the issues of using a secondary or backup &lt;br /&gt;
mail server (backup MX) to hold your mail before it gets delivered &lt;br /&gt;
to your SME Server. If you consider putting a backup mail server in &lt;br /&gt;
place because you are concerned about lost mail because your internet&lt;br /&gt;
connection may occasionally drop out, think again and consider the issues&lt;br /&gt;
discussed below.&lt;br /&gt;
&lt;br /&gt;
===What is &#039;&#039;Backup MX&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
A backup MX is a system whereby through your DNS records you tell other&lt;br /&gt;
servers on the internet that in order to deliver mail to your domain they&lt;br /&gt;
first need to try the primary MX record and if they fail to connect they&lt;br /&gt;
can try to connect to one or more of your listed backup or secondary mail &lt;br /&gt;
servers. See also http://en.wikipedia.org/wiki/MX_record&lt;br /&gt;
&lt;br /&gt;
===The process of delivering email to your SME Server===&lt;br /&gt;
&lt;br /&gt;
So lets look at how mail gets delivered without and with a &lt;br /&gt;
&#039;&#039;backup mx&#039;&#039; when your Internet link, ISP or server is down.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Without&#039;&#039;&#039; a backup MX====&lt;br /&gt;
&lt;br /&gt;
*The sending mail server cannot connect to your server.&lt;br /&gt;
*The sending mail server MUST queue the mail and try again later.&lt;br /&gt;
*The mail stays on the sender&#039;s server.&lt;br /&gt;
*The sender&#039;s server resends the mail at a later date.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The requirement to re-queue is a fundamental part of the SMTP protocol - &#039;&#039;&lt;br /&gt;
it is not optional. So, if your server is &#039;&#039;&#039;offline&#039;&#039;&#039; due to a link or ISP &lt;br /&gt;
outage, &#039;&#039;&#039;the mail just stays at the sender&#039;s server until you are once &#039;&#039;&#039;&lt;br /&gt;
again reachable&#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;With&#039;&#039;&#039; a backup MX====&lt;br /&gt;
&lt;br /&gt;
*The sending mail server cannot contact your server.&lt;br /&gt;
*The sending mail server sends the mail to your secondary MX.&lt;br /&gt;
*The secondary MX queues the mail until your link/server is up.&lt;br /&gt;
*The mail is queued on an &#039;&#039;&#039;untrusted&#039;&#039;&#039; third-party mail server (&#039;&#039;think about confidential mail between your company and some business partner&#039;&#039;).&lt;br /&gt;
*The sending mail server&#039;s administrator &#039;&#039;thinks&#039;&#039; it has been delivered, according to their logs.&lt;br /&gt;
*You have no, or little, visibility over the queued mail.&lt;br /&gt;
*When your link comes up, the secondary MX sends the mail on to your server.&lt;br /&gt;
*You have added more hops, more systems and more delay to the process.&lt;br /&gt;
&lt;br /&gt;
If you think that a backup MX will protect against broken mail servers &lt;br /&gt;
which don&#039;t re-queue, you can&#039;t. Those servers will drop mail on the floor&lt;br /&gt;
at random times, for example when &#039;&#039;their&#039;&#039; Internet link is down. &lt;br /&gt;
&lt;br /&gt;
Those servers are also highly likely to never try your backup MX. &lt;br /&gt;
&lt;br /&gt;
Thankfully those servers are mostly gone from the Internet, but adding a &lt;br /&gt;
secondary MX doesn&#039;t really improve the chances that they won&#039;t drop mail&lt;br /&gt;
destined for your server on the floor.&lt;br /&gt;
&lt;br /&gt;
===Backup MX and SPAM Filtering===&lt;br /&gt;
&lt;br /&gt;
On top of the issue, indicated above, there is another issue to consider&lt;br /&gt;
and that is what happens with SPAM due to the use of a &#039;&#039;Backup MX&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Your SME Server takes care of filtering a lot of SPAM by checking on the full &lt;br /&gt;
username &amp;amp; domain at the time it is received.&lt;br /&gt;
&lt;br /&gt;
For example if your server hosts &#039;&#039;&#039;example.com&#039;&#039;&#039; and someone sends &lt;br /&gt;
mail to &#039;&#039;&#039;joeuser@example.com&#039;&#039;&#039;, the server will &#039;&#039;&#039;only&#039;&#039;&#039; accept the mail&lt;br /&gt;
if joeuser is a local user/alias/group/pseudonym on the server. &lt;br /&gt;
Otherwise, the mail is rejected during the SMTP transaction.&lt;br /&gt;
&lt;br /&gt;
A backup mail server however, generally does not have a full list of&lt;br /&gt;
users against which it can check if it should accept the mail for the given&lt;br /&gt;
domain. Hence it will accept mail for &#039;&#039;invalid&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
So:&lt;br /&gt;
&lt;br /&gt;
*If you trust the secondary MX, you &amp;lt;u&amp;gt;will&amp;lt;/u&amp;gt; accept a lot of SPAM when the link comes up.&lt;br /&gt;
*If you don&#039;t trust it, you will cause a lot of SPAM backscatter as the mail has been accepted at the secondary MX and then later bounced by you.&lt;br /&gt;
*Stopping backscatter is why SME Server rejects invalid addresses during the initial SMTP transaction.&lt;br /&gt;
&lt;br /&gt;
The SPAM backscatter can only be stopped if the secondary MX has a full list&lt;br /&gt;
of users for your domain to allow filtering to occur.&lt;br /&gt;
&lt;br /&gt;
But:&lt;br /&gt;
&lt;br /&gt;
*You need to be able to configure this secondary MX with such user/domain lists&lt;br /&gt;
*You need to maintain these secondary configurations when users are added/deleted from your primary server configuration&lt;br /&gt;
*You need to test (regularly) if the secondary is successfully accepting/rejecting mail as required.&lt;br /&gt;
&lt;br /&gt;
Quite a few sites have lost lots of mail through misconfigured backup MX servers. Unfortunately, the time when you find &lt;br /&gt;
out they are misconfigured is when you go to use them, and then you find that the backup MX has changed configuration and bounced all of your mail. &lt;br /&gt;
&lt;br /&gt;
Then you realise that this mail could have queued at the sender&#039;s site if there hadn&#039;t been a broken secondary MX bouncing the mail for you.&lt;br /&gt;
&lt;br /&gt;
*If you bounce mail at your server, you have logs to show what&#039;s wrong.&lt;br /&gt;
*If your secondary MX bounces your mail, you usually have no way to determine what happened other than via reports from the original senders that your mail bounced.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
In summary, if your server/Internet connection is available most (let&#039;s say &amp;gt;90%) of &lt;br /&gt;
the time, you are generally better off &amp;lt;u&amp;gt;without a secondary MX&amp;lt;/u&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If your server/link is down more than this (e.g. dialup), you should not be delivering mail &lt;br /&gt;
directly to your server.&lt;br /&gt;
&lt;br /&gt;
If you still want to consider setting up a seconday MX, ensure that:&lt;br /&gt;
&lt;br /&gt;
*you have fully control of the configuration of each of the email gateways for your domain&lt;br /&gt;
*each gateway can make decisions on whether to accept/reject mail for the users at the domain&lt;br /&gt;
&lt;br /&gt;
==Mail server on dynamic IP==&lt;br /&gt;
===Problems with running a mail server on SME server using a dynamic external IP from ISP===&lt;br /&gt;
&lt;br /&gt;
This information comes from http://bugs.contribs.org/show_bug.cgi?id=2057#c10&lt;br /&gt;
&lt;br /&gt;
This is the chronological sequence of events that leads to issues with mail servers on dynamic IPs:&lt;br /&gt;
&lt;br /&gt;
1) Server gets dynamic IP&lt;br /&gt;
&lt;br /&gt;
2) Reboot/power fail (without updating dynamic DNS to &amp;quot;offline&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
3) Another server/someone else is allocated your old IP while your server is down&lt;br /&gt;
&lt;br /&gt;
4) The other server/person is running a mail server&lt;br /&gt;
&lt;br /&gt;
5) The other server either gets your mail (which is bad) or bounces your mail (also bad)&lt;br /&gt;
&lt;br /&gt;
You have no control over this issue and you will lose mail when it happens. If you have a dynamic IP, the recommended approach is to get someone with a static IP to queue your inbound mail and send it to you on a non-standard port, preferably with an authentication mechanism which queues the mail if the auth fails, just in case someone else happens to have a mail server on the same port (while highly unlikely, this is possible).&lt;br /&gt;
&lt;br /&gt;
Whether this issue is really a problem to end users, depends on how much you &amp;quot;value&amp;quot; your mail. For a home user having their own mail server, it is probably not a great problem if some messages should happen to go astray, but for all other classes of users, you should really avoid running a mail server on a dynamic IP, without implementing a suitable queueing workaround as suggested. Some ISPs change the IP very infrequently eg yearly, so in those cases it is also not a significant problem. Many/most ISP&#039;s will issue a new IP every time a connection is lost &amp;amp; re-established, so these situations are more problematic.&lt;br /&gt;
&lt;br /&gt;
==How to re-apply procmail rules==&lt;br /&gt;
&lt;br /&gt;
If you have a folder of email that needs to have the procmail rules applied, then the trick is to be logged in as the email user, and then position your self in the home directory, and then this works: &lt;br /&gt;
 su &amp;lt;username&amp;gt; -s /bin/bash &lt;br /&gt;
 cd ~&lt;br /&gt;
 for m in &amp;lt;fullpath to maildirectory&amp;gt;/cur/*; do echo $m; procmail &amp;lt; $m &amp;amp;&amp;amp; rm $m; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Mail]]&lt;br /&gt;
[[Category:Howto]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_Nextcloud&amp;diff=86</id>
		<title>SMEServer Nextcloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_Nextcloud&amp;diff=86"/>
		<updated>2026-01-06T12:09:30Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/Nextcloud  {{Languages}} &amp;lt;!-- here we define the contrib name variable --&amp;gt; &amp;lt;!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want--&amp;gt; {{#vardefine:contribname| {{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }} {{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }} &amp;lt;!-- we define the language --&amp;gt; {{#vardefine:lang| {{lc:  {{#titleparts...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/Nextcloud&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
&amp;lt;!-- here we define the contrib name variable --&amp;gt;&lt;br /&gt;
&amp;lt;!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want--&amp;gt;&lt;br /&gt;
{{#vardefine:contribname| {{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:   {{BASEPAGENAME}} |1}} }} }}&lt;br /&gt;
&amp;lt;!-- we define the language --&amp;gt;&lt;br /&gt;
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}&lt;br /&gt;
{{Infobox contribs&lt;br /&gt;
|name={{#var:contribname}}&lt;br /&gt;
|image=Nextcloud_Logo.svg&lt;br /&gt;
|description_image= {{#var:contribname}} logo&lt;br /&gt;
|maintainer= Unnilennium&lt;br /&gt;
|licence= AGPLv3&lt;br /&gt;
|url= https://nextcloud.com&lt;br /&gt;
|category= Cloud&lt;br /&gt;
|tags=cloud,files,dropbox,seafile,pydio,ajaxplorer,owncloud&lt;br /&gt;
}}&lt;br /&gt;
===Maintainer===&lt;br /&gt;
&amp;lt;!-- here you need to file your username and name --&amp;gt;&lt;br /&gt;
[[User:Unnilennium|Jean-Philippe Pialasse]] &lt;br /&gt;
&lt;br /&gt;
=== Version ===&lt;br /&gt;
&amp;lt;!-- keep this first element as is, you can add some if needed --&amp;gt;&lt;br /&gt;
{{#smeversion: {{#var:smecontribname}} }}&lt;br /&gt;
{{#smeversion: nextcloud-src  }}&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
Nextcloud is a suite of client-server software for creating and using file hosting services. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server.&lt;br /&gt;
&lt;br /&gt;
As per SME Server Keep It Simple, all your ibays and home folders will be accessible through the nextcloud interface using the &amp;quot;external files&amp;quot; app. You will also have your main user user Nextcloud folder saved under /home/e-smith/files/owncloud/data which is in the default backup path. So you can now enjoy both your own cloud repository with access to the very same files on your samba share!&lt;br /&gt;
&lt;br /&gt;
How do I add my SME users ? They are already there ! Just tell them to connect to https://mydomain/nextcloud. You can also add external users or allow them to register with a nextcloud app.&lt;br /&gt;
&lt;br /&gt;
What are the admin ? By default you have a nextcloudadmin user and the regular SME admin user. First one use the password you can see with &amp;quot;config getprop nextcloud AdminPassword&amp;quot;, and second one, well, just use your regular admin password. Then you can manage apps, external files repos and admin group membership.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
you might need a second event or sometime ibays folder is not visible&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme9&amp;quot;&amp;gt;&lt;br /&gt;
You do not need to  follow the Repo pages of [https://wiki.contribs.org/Fws fws] and [https://wiki.contribs.org/Remi-safe remi-safe] to install those two needed repos, instead use the packages to install them followed by a yum-modify event. Then run the main installation.&lt;br /&gt;
 yum install smeserver-extrarepositories-remi-safe smeserver-extrarepositories-fws smeserver-extrarepositories-epel&lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
 yum install {{#var:smecontribname}} --enablerepo=smecontribs,epel,fws&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
 service php-fpm start&lt;br /&gt;
 service php71-php-fpm start&lt;br /&gt;
 service php72-php-fpm start&lt;br /&gt;
 service php73-php-fpm start&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
you can skip the service php-fpm* commands if it was already installed and running before the installation of nextcloud&lt;br /&gt;
&lt;br /&gt;
then you can do the following and you can safely ignore the signal-event post-upgrade reboot if prompted, unless you also installed other packages that needs to do so.&lt;br /&gt;
 config set UnsavedChanges no&lt;br /&gt;
&lt;br /&gt;
or do &lt;br /&gt;
 signal-event post-upgrade &lt;br /&gt;
 signal-event reboot&lt;br /&gt;
then&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
if you want to add SME user admin as administrator of nextcloud do&lt;br /&gt;
  OCC group:adduser admin admin&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might want to set your default phone region (use your country 2 letter code - low case)&lt;br /&gt;
 occ config:system:set default_phone_region --value=&amp;quot;us&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you might want to have nextcloud accessible to the Internet&lt;br /&gt;
 config setprop nextcloud access public&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
if you want to keep access only to &amp;lt;nowiki&amp;gt;https://YOURDOMAIN/nextcloud&amp;lt;/nowiki&amp;gt;, you might want to use pretty URL (without index.php in it)&lt;br /&gt;
 occ config:system:set htaccess.RewriteBase --type string --value &amp;quot;/nextcloud&amp;quot;&lt;br /&gt;
 occ maintenance:update:htaccess&lt;br /&gt;
&lt;br /&gt;
=== Use a dedicated domain to connect to Nextcloud ===&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
first change the first line variable content with you nextcloud domain as defined with your DNS provider.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
NEXTCLOUDDOMAIN=&amp;quot;cloud.mydomain.com&amp;quot;&lt;br /&gt;
db domains set $NEXTCLOUDDOMAIN domain Description &amp;quot;Nextcloud&amp;quot; Content Primary Nameservers internet TemplatePath NextcloudVirtualHost letsencryptSSLcert enabled&lt;br /&gt;
signal-event domain-create $NEXTCLOUDDOMAIN&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# this one to let nextcloud DAV be redirect correctly and to have collabora and notify_push recognize the domain ### IN PROGRESS###&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
config setprop nextcloud VirtualHost $NEXTCLOUDDOMAIN&lt;br /&gt;
signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# only if you use a Let&#039;s Encrypt certificate&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
dehydrated -c&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if you want to use only your dedicated domain and no subdir access, you can enable pretty URL this way&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 occ config:system:set htaccess.RewriteBase --type string --value &amp;quot;/&amp;quot;&lt;br /&gt;
 occ maintenance:update:htaccess&lt;br /&gt;
 config setprop nextcloud AliasOnPrimary disabled&lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
to restore without pretty url and dual access&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 occ config:system:delete htaccess.RewriteBase &lt;br /&gt;
 occ maintenance:update:htaccess &lt;br /&gt;
 config delprop nextcloud AliasOnPrimary &lt;br /&gt;
 signal-event nextcloud-update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
first change the first line variable content with you nextcloud domain as defined with your DNS provider.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
NEXTCLOUDDOMAIN=&amp;quot;cloud.mydomain.com&amp;quot;&lt;br /&gt;
db domains set $NEXTCLOUDDOMAIN domain Description &amp;quot;Nextcloud&amp;quot; Content Primary Nameservers internet TemplatePath WebAppVirtualHost DocumentRoot /usr/share/nextcloud RequireSSL enabled letsencryptSSLcert enabled&lt;br /&gt;
signal-event domain-create $NEXTCLOUDDOMAIN&lt;br /&gt;
&lt;br /&gt;
# this one to let nextcloud DAV be redirect correctly and to have collabora recognize the domain&lt;br /&gt;
config setprop nextcloud VirtualHost $NEXTCLOUDDOMAIN&lt;br /&gt;
signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
# only if you use a Let&#039;s Encrypt certificate&lt;br /&gt;
expand-template /etc/dehydrated/domains.txt&lt;br /&gt;
dehydrated -c&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!property&lt;br /&gt;
!default&lt;br /&gt;
!values&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|AdminPassword&lt;br /&gt;
|GENERATED&lt;br /&gt;
|string&lt;br /&gt;
|password for your main admin user for nextcloud (*)&lt;br /&gt;
|-&lt;br /&gt;
|AdminUser&lt;br /&gt;
|nextcloudadmin&lt;br /&gt;
|string&lt;br /&gt;
|main admin user for your installation (*)&lt;br /&gt;
|-&lt;br /&gt;
|cliurl&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|force overwrite.cli.url to https://domain/nextcloud or https://domain if virtualhost is set; disable it if you have specific needs and then use occ command to set your value&lt;br /&gt;
|-&lt;br /&gt;
|DbName&lt;br /&gt;
|nextcloud&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|DbPassword&lt;br /&gt;
|GENERATED&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|DbUser&lt;br /&gt;
|nextcloud&lt;br /&gt;
|string&lt;br /&gt;
|for mysql db&lt;br /&gt;
|-&lt;br /&gt;
|TrustedDomains&lt;br /&gt;
|empty&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|add domain or ip that are in need to be added to default access to nextcloud&lt;br /&gt;
|-&lt;br /&gt;
|VirtualHost&lt;br /&gt;
|empty&lt;br /&gt;
|domain name&lt;br /&gt;
|domain dedicated to nextcloud, needs to also be defined as domain on the server&lt;br /&gt;
|-&lt;br /&gt;
|access&lt;br /&gt;
|private&lt;br /&gt;
|private, public&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxUploadSize&lt;br /&gt;
|4096M&lt;br /&gt;
|number&lt;br /&gt;
|if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|528M&lt;br /&gt;
|number&lt;br /&gt;
|webinterface : if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|memory_limit&lt;br /&gt;
|1024M&lt;br /&gt;
|number&lt;br /&gt;
|for cli like occ command or cron: if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...&lt;br /&gt;
|-&lt;br /&gt;
|Shares&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|add the samba shares from the shared-folders contrib in the nextcloud ibays folder along with regular ibays&lt;br /&gt;
|-&lt;br /&gt;
|IncludeIbay&lt;br /&gt;
|empty&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|add ibays names that need to be include. If not empty, only the name present here will be accessible via nextcloud. Take precedence over ExcludeIbay. You set it with a random string to exclude all ibays and shares from automatic inclusion.&lt;br /&gt;
|-&lt;br /&gt;
|ExcludeIbay&lt;br /&gt;
|Primary&lt;br /&gt;
|strings coma separated&lt;br /&gt;
|will exclude from nexcloud access any ibay via nextcloud. Default excludes Primary ibay. If you want to include Primary set it with a random string.&lt;br /&gt;
|-&lt;br /&gt;
|opcache.memory_consumption&lt;br /&gt;
|32&lt;br /&gt;
|number&lt;br /&gt;
|update this value if Nextcloud says that it should be&lt;br /&gt;
|-&lt;br /&gt;
|opcache.interned_strings_buffer&lt;br /&gt;
|128&lt;br /&gt;
|number&lt;br /&gt;
|update this value if Nextcloud says that it should be&lt;br /&gt;
|-&lt;br /&gt;
|PHPBaseDir&lt;br /&gt;
|&lt;br /&gt;
|colon separated string&lt;br /&gt;
|php base dir you want to add to the default example /home/e-smith/files/ibays/musique/files:/usr/share/GeoIP/GeoLite2-Country.mmdb:/proc/cpuinfo&lt;br /&gt;
|-&lt;br /&gt;
|UseSMB&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|allow you to set ibay access via samba share or via Local driver in nextcloud. Enabled is for samba, this allow you to access as your user and have your quota accounted. It might be a little slower, and need you to have your password loaded in the session. Local driver if disabled, will let you access only what apache user (www) has right to access as member of a group.&lt;br /&gt;
|}&lt;br /&gt;
(*) the SME admin user is also an admin of your nextcloud installation. You have two admin account as per default installation on SME Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
example of setting :&lt;br /&gt;
  config setprop nextcloud ExcludeIbay ibay1,ibay2&lt;br /&gt;
  signal-event nextcloud-update&lt;br /&gt;
&lt;br /&gt;
=== LDAP/AD Integration Settings ===&lt;br /&gt;
Do not change the LDAP/AD integration settings for &amp;quot;1. Server: Localhost&amp;quot; or you will break the Nextcloud install.  If you want to add a second LDAP/AD server, click the &amp;quot;+&amp;quot; symbol to add another configuration and then add the appropriate LDAP/AD settings. &lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
if you happen to need tweaking your installation, here is how to access the command line for Nextcloud on SME, we made it easier for you, just log as root and use the OCC command (using capitals), This command will execute for you what you need as the www user, using the needed version of php. Here two examples: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
occ maintenance:repair&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;to seek for additional command consult Nextcloud documentation : https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html&lt;br /&gt;
&lt;br /&gt;
=== Upgrade ===&lt;br /&gt;
 yum  update {{#var:smecontribname}} {{#var:contribname}} --enablerepo=smecontribs&lt;br /&gt;
&lt;br /&gt;
=== CLI upgrade of Nextcloud software ===&lt;br /&gt;
&amp;lt;tabs container=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme11&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 /usr/bin/nc_upgrade&lt;br /&gt;
 /usr/bin/nc_dbupdate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php83 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab name=&amp;quot;For sme10&amp;quot;&amp;gt;&lt;br /&gt;
 yum install {{#var:smecont&lt;br /&gt;
You should rather prefer the online updater, but in case:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php74 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar --no-interaction&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In case of a huge db, you can choose the online updater and then only issue the db update doing&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starting 25 to upgrace to 26, you should do &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
sudo -u www /usr/bin/php81 --define memory_limit=1024M -d apc.enable_cli=1 /usr/share/nextcloud/updater/updater.phar --no-interaction&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In case of a huge db, you can choose the online updater and then only issue the db update doing&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ upgrade&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restore info loglevel ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ config:system:set loglevel --value=3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Migration  ===&lt;br /&gt;
&lt;br /&gt;
==== from SME 10 to SME 11 ====&lt;br /&gt;
&lt;br /&gt;
# before migrate to SME11&lt;br /&gt;
## upgrade to NC 29 or NC 30 (this might require you to migrate mariadb database from 5.5 to contrib mariadb 10.5, see below in this page)&lt;br /&gt;
## make sure you have a nextcloud database in mariadb 10.5 (mysqlshow105)&lt;br /&gt;
## make sure you have some backup /home/e-smith/db/mariadb105/nextcloud.dump&lt;br /&gt;
## delete nextcloud database from mariadb 5.5 &lt;br /&gt;
## make sure you do not have any /home/e-smith/db/mysql/nextcloud.dump&lt;br /&gt;
## migrate using either migratehelper, console backup or workstation backup&lt;br /&gt;
# Install SME 11&lt;br /&gt;
## restore backup when you are asked for&lt;br /&gt;
## check you have:&lt;br /&gt;
### a mariadb nextcloud db ( mariadb-show)&lt;br /&gt;
### your data folder : ll /home/e-smith/files/nextcloud&lt;br /&gt;
### your current config and software : ll /usr/share/nextcloud/&lt;br /&gt;
### configuration key nextcloud : config show nextcloud&lt;br /&gt;
### install smeserver-nextcloud &lt;br /&gt;
&lt;br /&gt;
enjoy!&lt;br /&gt;
&lt;br /&gt;
=== Uninstall ===&lt;br /&gt;
&lt;br /&gt;
{{Warning box| if you plan to reinstall and had the nextcloud rpm installed do not yum remove it or rpm -e it as it would put you in a situation where you will not be able to reinstall and restore your old data. nextcloud-src rpm if present do not create such situation and can be removed safely.}}&lt;br /&gt;
&lt;br /&gt;
Uninstalling the rpms&lt;br /&gt;
 yum remove {{#var:smecontribname}}  {{#var:contribname}}-src&lt;br /&gt;
 rpm -e --justdb nextcloud&lt;br /&gt;
&lt;br /&gt;
those folders will then remain&lt;br /&gt;
* /usr/share/nextcloud : software and config &lt;br /&gt;
* /home/e-smith/files/nextcloud : user data&lt;br /&gt;
&lt;br /&gt;
also you will have mariadb or mariadb105 with nextcloud db and user.&lt;br /&gt;
&lt;br /&gt;
And finally, db configuration with entry for nextcloud. &lt;br /&gt;
&lt;br /&gt;
If all of those remains as is, a simple reinstall of the contrib will bring back nextcloud running. If you uninstalled it because your install was non functional or want a complete removal, there are extra steps. &lt;br /&gt;
&lt;br /&gt;
In case of deleting either the db or part of the software folder, whenever you will try to reinstall the contrib, process will fail as db and files are not in sync.  &lt;br /&gt;
&lt;br /&gt;
In case you need to reinstall from scratch, &#039;&#039;&#039;first, backup what you might want to restore latter&#039;&#039;&#039;:&lt;br /&gt;
 cd /home/e-smith/files/nextcloud/data&lt;br /&gt;
 mysqldump nextcloud &amp;gt; nextcloud55.sql&lt;br /&gt;
 mysqldump105 nextcloud &amp;gt; nextcloud105.sql&lt;br /&gt;
 config print nextcloud /root/nextcloud.config&lt;br /&gt;
 tar -czf   /root/nextcloud.tar.gz /home/e-smith/files/nextcloud/data /usr/share/nextcloud&lt;br /&gt;
then erase all what is remaining: &lt;br /&gt;
 mysql -e &amp;quot;DROP DATABASE `config getprop nextcloud DbName`;DROP USER IF EXISTS `config getprop nextcloud DbUser`;&amp;quot;&lt;br /&gt;
 mysql105 -e &amp;quot;DROP DATABASE `config getprop nextcloud DbName`;DROP USER IF EXISTS `config getprop nextcloud DbUser`;&amp;quot;&lt;br /&gt;
 rm -rf /usr/share/nextcloud&lt;br /&gt;
 rm -rf /home/e-smith/files/nextcloud&lt;br /&gt;
 #this one is optional, and should not cause issue if still there&lt;br /&gt;
 config delete nextcloud&lt;br /&gt;
&lt;br /&gt;
and you should be able to start a new install from scratch&lt;br /&gt;
&lt;br /&gt;
=== Release schedule ===&lt;br /&gt;
see https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule&lt;br /&gt;
&lt;br /&gt;
as per 2025/11:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Version&lt;br /&gt;
!Name&lt;br /&gt;
!Release date&lt;br /&gt;
!End of life&lt;br /&gt;
|-&lt;br /&gt;
|33&lt;br /&gt;
|Hub 26 Winter&lt;br /&gt;
|TBD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
|Hub 25 Autumn&lt;br /&gt;
|2025-09-27&lt;br /&gt;
|2026-09&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
|Hub 10&lt;br /&gt;
|2025-02-25&lt;br /&gt;
|2026-02&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;30&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 9&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-09-14&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2025-09&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;29&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 8&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-04-24&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2025-04&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;28&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 7&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-12-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;27&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 6&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-06-13&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;26&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 4&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-03-21&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2024-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;25&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 3&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-10-19&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-10&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;24&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 3&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-05-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2023-05&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;23&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub 2&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-11-30&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-12&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;22&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-07-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-07&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;21&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-02-22&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2022-02&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;20&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-10-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-11&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;19&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-06-03&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-06&amp;lt;/s&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;&amp;lt;s&amp;gt;18&amp;lt;/s&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;s&amp;gt;Hub&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2020-01-16&amp;lt;/s&amp;gt;&lt;br /&gt;
|&amp;lt;s&amp;gt;2021-01&amp;lt;/s&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Migrate Database from core mariadb 5.5 to mariadb 10.5 on SME10===&lt;br /&gt;
If you are in the situation your are unable to update your nextcloud because of database requirements, you might need to install a newer and then migrate your db.&lt;br /&gt;
&lt;br /&gt;
Here a simple procedure, after having the new db working as a sclo [[Mariadb105]] for SME10 as example.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ maintenance:mode --on&lt;br /&gt;
mysqldump `config getprop nextcloud DbName` &amp;gt; nextcloud.sql&lt;br /&gt;
echo &amp;quot;CREATE DATABASE IF NOT EXISTS `config getprop nextcloud DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;&amp;quot;| mysql105&lt;br /&gt;
mysql105 `config getprop nextcloud DbName`&amp;lt; nextcloud.sql&lt;br /&gt;
echo &amp;quot;CREATE USER IF NOT EXISTS `config getprop nextcloud DbUser`@localhost IDENTIFIED BY &#039;`config getprop nextcloud DbPassword`&#039;;&amp;quot;| mysql105&lt;br /&gt;
echo &amp;quot;GRANT ALL PRIVILEGES ON `config getprop nextcloud DbName`.* TO `config getprop nextcloud DbUser`@localhost; FLUSH PRIVILEGES;&amp;quot; | mysql105&lt;br /&gt;
occ config:system:set dbhost --value localhost:/var/lib/mysql/mariadb105.sock --type string&lt;br /&gt;
occ maintenance:mode --off&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After checking that all is working you can then delete yourself the old db from the previous mysql server, or keep it as a backup for a while.&lt;br /&gt;
If it fails and just want to go back to previous state:&lt;br /&gt;
 occ maintenance --on&lt;br /&gt;
 occ config:system:set host --value localhost --type string&lt;br /&gt;
 occ maintenance --off&lt;br /&gt;
&lt;br /&gt;
=== File Scan ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# scan all, could take hours if you have a lot of files&lt;br /&gt;
occ files:scan -v --all&lt;br /&gt;
# scan all that is inside a username path (including external storages mounted there)&lt;br /&gt;
occ files:scan -v myusername&lt;br /&gt;
#scan only a subfolder of a user (path needs a heading / and is relative to /home/e-smith/files/nextcloud/data)&lt;br /&gt;
occ files:scan -v --path=&amp;quot;/myusername/files/myfolder/mysubfolder&amp;quot; myusername&lt;br /&gt;
#For external storage one has to use a user and the mount point in the user space, e.g. admin&lt;br /&gt;
occ files:scan -v --path=&amp;quot;/admin/files/name_of_external_storage&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;If you use groupgfolders app, then you might consider, to list the golders id&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ groupfolders:list&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;then for folder group with id 1&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
occ groupfolders:scan 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
==== Issue importing files in db &amp;quot;Entry path/to/file will not be accessible due to incompatible encoding&amp;quot; ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install convmv --enablerepo=epel&lt;br /&gt;
#first test to see the changes&lt;br /&gt;
convmv -f utf-8 -t utf-8 --nfc -r /home/e-smith/files/nextcloud/data/username&lt;br /&gt;
#check, then with --notest&lt;br /&gt;
convmv -f utf-8 -t utf-8 --nfc -r --notest /home/e-smith/files/nextcloud/data/username&lt;br /&gt;
#then rescan &lt;br /&gt;
occ files:scan -p /username/files/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;this might also occurs on ibays / home folders and their files not all visibles from nextcloud, simply adapt the path for convmv /home/e-smith/files/ibays/ibayname/files/ or /home/e-smith/files/users/userame/home/&lt;br /&gt;
&lt;br /&gt;
==== Remove legacy nextcloud rpm without deleting /usr/share/nextcloud content ====&lt;br /&gt;
for installs done before smeserver-nextcloud 1.2.0-16, the rppm nextcloud was required and was conflicting with web update. Since 1.2.0-16 it is not required anymroe and we use a nextcloud-src rpm which updates itself in /usr/share/nextcloud-src and is only used if you install the first time or restart from scratch your install.&lt;br /&gt;
To remove the nextcloud rpm which is not needed and save your files:&lt;br /&gt;
 rpm -e --justdb nextcloud&lt;br /&gt;
&lt;br /&gt;
source https://unix.stackexchange.com/questions/208722/how-to-remove-an-rpm-package-while-keeping-certain-files&lt;br /&gt;
===Reset Database===&lt;br /&gt;
&lt;br /&gt;
For reference, whilst looking at resetting file caches I found this.&lt;br /&gt;
&lt;br /&gt;
It is probably extremely dangerous but wanted to make a note.&lt;br /&gt;
&lt;br /&gt;
https://github.com/nextcloud/server/issues/8113#issuecomment-565876798&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]&lt;br /&gt;
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}&lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}} &lt;br /&gt;
&lt;br /&gt;
===Changelog===&lt;br /&gt;
Only released version in smecontrib are listed here.&lt;br /&gt;
&lt;br /&gt;
{{#smechangelog: {{#var:smecontribname}} }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- list of category you want to see this page in --&amp;gt;&lt;br /&gt;
[[Category: Contrib]]&lt;br /&gt;
&amp;lt;!-- Please keep there the template revision  number as is --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html&lt;br /&gt;
# https://help.nextcloud.com/t/migration-from-mysql-to-mariadb/6816/3&lt;br /&gt;
# https://help.nextcloud.com/t/changing-mariadb-socket-when-hosting-multiple-db-ubuntu/68294&lt;br /&gt;
# https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/&lt;br /&gt;
# https://www.ullright.org/ullWiki/show/nextcloud-cheatsheet&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=SMEServer_PHP&amp;diff=85</id>
		<title>SMEServer PHP</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=SMEServer_PHP&amp;diff=85"/>
		<updated>2026-01-06T11:31:25Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;Copied from; https://wiki.koozali.org/PHP  {{Languages|PHP}} Starting with SME 10, the &amp;#039;&amp;#039;&amp;#039;php&amp;#039;&amp;#039;&amp;#039; module is no longer used for httpd. Instead we rely on &amp;#039;&amp;#039;&amp;#039;php-fpm&amp;#039;&amp;#039;&amp;#039; which can enable every available version of php.   By default we provide the following versions:   *54 (maintained by Red-Hat up to CentOS 7 EOL: 30 Jun 2024). *55,56,70,71,72 (Note: unsupported!). *73 (supported up to 6 Dec 2021). *74 (supported up to 28 Nov 2022). *80 (supported up to 26 Nov 2023).  &amp;lt;br /&amp;gt;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Copied from; https://wiki.koozali.org/PHP&lt;br /&gt;
&lt;br /&gt;
{{Languages|PHP}}&lt;br /&gt;
Starting with SME 10, the &#039;&#039;&#039;php&#039;&#039;&#039; module is no longer used for httpd. Instead we rely on &#039;&#039;&#039;php-fpm&#039;&#039;&#039; which can enable every available version of php. &lt;br /&gt;
&lt;br /&gt;
By default we provide the following versions: &lt;br /&gt;
&lt;br /&gt;
*54 (maintained by Red-Hat up to CentOS 7 EOL: 30 Jun 2024).&lt;br /&gt;
*55,56,70,71,72 (Note: unsupported!).&lt;br /&gt;
*73 (supported up to 6 Dec 2021).&lt;br /&gt;
*74 (supported up to 28 Nov 2022).&lt;br /&gt;
*80 (supported up to 26 Nov 2023).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
===db keys available to control php configuration and services===&lt;br /&gt;
First you need to decide if you want to alter the php behaviour for an ibay or for a specific php version, of for all php versions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+db configuration properties&lt;br /&gt;
!keys&lt;br /&gt;
!role&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|php&lt;br /&gt;
|customization of /etc/php.ini&lt;br /&gt;
|for php54&lt;br /&gt;
|-&lt;br /&gt;
|php55&lt;br /&gt;
|customization of /opt/remi/php55/root/etc/php.ini&lt;br /&gt;
| rowspan=&amp;quot;11&amp;quot; |if no properties defined, will use php keys properties&lt;br /&gt;
|-&lt;br /&gt;
|php56&lt;br /&gt;
|customization of /opt/remi/php56/root/etc/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php70&lt;br /&gt;
|customization of /etc/opt/remi/php70/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php71&lt;br /&gt;
|customization of /etc/opt/remi/php71/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php72&lt;br /&gt;
|customization of /etc/opt/remi/php72/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php73&lt;br /&gt;
|customization of /etc/opt/remi/php73/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php74&lt;br /&gt;
|customization of /etc/opt/remi/php74/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php80&lt;br /&gt;
|customization of /etc/opt/remi/php80/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php81&lt;br /&gt;
|customization of /etc/opt/remi/php81/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php82&lt;br /&gt;
|customization of /etc/opt/remi/php82/php.ini&lt;br /&gt;
|-&lt;br /&gt;
|php83&lt;br /&gt;
|customization of /etc/opt/remi/php83/php.ini&lt;br /&gt;
|}&lt;br /&gt;
Every version of php has its own php-fpm service running, the related configuration db entry is (as shown in the Table above) php-fpm for php (ie php54), php55-php-fpm for php55 and so on.&lt;br /&gt;
&lt;br /&gt;
If you really want to disable one version of php, shown below is what you need to do for php55, as an example:&lt;br /&gt;
 config setprop php55-php-fpm status disabled&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
===Available properties===&lt;br /&gt;
Here is a list of available properties to configure php. You have to choose at which level you want to handle the change. &lt;br /&gt;
&lt;br /&gt;
*Do you want the change for the whole server? -- then probably choose to change it for key php): db configuration setprop php ...&lt;br /&gt;
*Do you want the change for a specific version of php? -- then you should probably do it against a specific php key e.g. : db configuration setprop php74 ...&lt;br /&gt;
*Do you want to apply the change for a specific ibay? -- this is what we suggest you to do in most cases: db accounts setprop myibay ..&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!php setting&lt;br /&gt;
!ibay property&lt;br /&gt;
!php.ini property&lt;br /&gt;
!default&lt;br /&gt;
!note&lt;br /&gt;
|-&lt;br /&gt;
| -&lt;br /&gt;
|PHPVersion&lt;br /&gt;
| -&lt;br /&gt;
|74&lt;br /&gt;
|can vary upon update if left empty&lt;br /&gt;
|-&lt;br /&gt;
|allow_url_fopen&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|off&lt;br /&gt;
|unsecure keep to off&lt;br /&gt;
|-&lt;br /&gt;
|allow_url_include&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|auto_prepend_file&lt;br /&gt;
|AutoPrependFile&lt;br /&gt;
| -&lt;br /&gt;
|enabled&lt;br /&gt;
|/usr/share/php/auth_translation.php unless disabled&lt;br /&gt;
|-&lt;br /&gt;
|disable_functions&lt;br /&gt;
|DisableFunctions&lt;br /&gt;
| -&lt;br /&gt;
|system,show_source, symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|display_errors&lt;br /&gt;
|DisplayErrors&lt;br /&gt;
| -&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|error_log&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|/var/log/php/$key/error.log&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|error_reporting&lt;br /&gt;
|ErrorReporting&lt;br /&gt;
| -&lt;br /&gt;
|E_ALL &amp;amp; ~E_NOTICE &amp;amp; ~E_DEPRECATED &amp;amp; ~E_STRICT&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|expose_php&lt;br /&gt;
| -&lt;br /&gt;
|ExposePHP&lt;br /&gt;
|Off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|file_upload&lt;br /&gt;
|FileUpload&lt;br /&gt;
| -&lt;br /&gt;
|Off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mail.add_x_header&lt;br /&gt;
| -&lt;br /&gt;
|MailAddXHeader&lt;br /&gt;
|disabled&lt;br /&gt;
|only global, not per php version&lt;br /&gt;
|-&lt;br /&gt;
|mail.force_extra_parameters&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|root@$DomainName&lt;br /&gt;
|ibayname@$DomainName for ibays&lt;br /&gt;
|-&lt;br /&gt;
|mail.log&lt;br /&gt;
| -&lt;br /&gt;
|MailLog&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_execution_time&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|30&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_file_uploads&lt;br /&gt;
| -&lt;br /&gt;
|MaxFileUpload&lt;br /&gt;
|20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|max_input_time&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|memory_limit&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|128M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|open_basedir&lt;br /&gt;
|PHPBaseDir&lt;br /&gt;
| -&lt;br /&gt;
|/home/e-smith/files/ibays/IBAYNAME/:/var/lib/php/IBAYNAME/:/usr/share/php/:/usr/share/pear/:/opt/remi/php$version/root/usr/share/pear/:/opt/remi/php$version/root/usr/share/php/&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|post_max_size&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|20M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|security.limit_extensions&lt;br /&gt;
|AllowPHTML&lt;br /&gt;
|&lt;br /&gt;
|disabled&lt;br /&gt;
|allow php to interprete more file (.php .htm .html .phar .phtml .xml)&lt;br /&gt;
|-&lt;br /&gt;
|sendmail_from&lt;br /&gt;
| -&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|root@$DomainName&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendmail_path&lt;br /&gt;
| -&lt;br /&gt;
|SendmailPath&lt;br /&gt;
|/usr/sbin/sendmail -t -i&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|short_open_tag&lt;br /&gt;
| -&lt;br /&gt;
|ShortOpenTag&lt;br /&gt;
|On&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|upload_max_filesize&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
if you want to set a specific value for an ibay, here we show how to use php80 for ibay MYIBAY and avoid having any disabled function:&lt;br /&gt;
 db accounts setprop MYIBAY disable_functions none PHPVersion 80&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
{{Note box|It is strongly suggested that you install the smeserver-webhosting contrib enabling you to set your ibay php values from the server-manager. Everything is available and it prevents you from making a mistake in the settings.}}&lt;br /&gt;
&lt;br /&gt;
===Display Error Messages===&lt;br /&gt;
&lt;br /&gt;
By default PHP does not display error messages on screen. Sometimes you get a blank page when executing PHP scripts. Usually some sort of error has occurred, but this error text will &#039;&#039;&#039;not&#039;&#039;&#039; be displayed as SME Server is configured to not display them. Instead the error messages are reported to the log files of the webserver and the general logfile of the server. &lt;br /&gt;
&lt;br /&gt;
Try to analyze your logfiles:&lt;br /&gt;
/var/log/httpd/error_log and /var/log/httpd/access_log and perhaps also /var/log/messages.&lt;br /&gt;
&lt;br /&gt;
{{Warning box|It is strongly advised that you disable &amp;quot;display errors&amp;quot; after you have tracked and solved the problem, as the displayed error message might provide information (like filesystem layout) that only should be known to the system administrators and not to users, let alone people with bad intentions. Thus it is a potential SECURITY RISK. After debugging, disable it again.}}&lt;br /&gt;
&lt;br /&gt;
====Enable changes for all php versions====&lt;br /&gt;
If you (for debugging purposes for instance) would like to enable it you can do it with the instructions found below:&lt;br /&gt;
&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/etc/php.ini&lt;br /&gt;
 cp /etc/e-smith/templates/etc/php.ini/30ErrorHandling /etc/e-smith/templates-custom/etc/php.ini&lt;br /&gt;
&lt;br /&gt;
After that:&lt;br /&gt;
&lt;br /&gt;
 sed -i /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling -e &#039;s/display_errors.*/display_errors          = On/g&#039; &lt;br /&gt;
&lt;br /&gt;
After that issue the following commands:&lt;br /&gt;
&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now access your page again and see what the error is. &lt;br /&gt;
&lt;br /&gt;
====Undo Changes====&lt;br /&gt;
If everything works you remove the 30ErrorHandling file from the /etc/e-smith/templates-custom/etc/php.ini folder and issue the last two lines again:&lt;br /&gt;
&lt;br /&gt;
 signal-event webapps-update &lt;br /&gt;
&lt;br /&gt;
====Enable changes for a specific ibay====&lt;br /&gt;
Starting SME10 and smeserver-php-3.0.0-39&lt;br /&gt;
 db accounts setprop MYIBAY DisplayErrors enabled &lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
===Open basedir restriction===&lt;br /&gt;
SME Server has a security measure in place which is called &#039;open basedir restriction&#039;. This measure prevents PHP from executing or invoking other PHP scripts outside the scope of its own tree; in other words it creates a &#039;sandbox&#039; or &#039;jail&#039;.&lt;br /&gt;
&lt;br /&gt;
Overall configuration is defined in the php.ini file but you can add an override on a per ibay basis.&lt;br /&gt;
&lt;br /&gt;
====Error message====&lt;br /&gt;
The PHP open basedir restriction is usually presented to the user like this in the /var/log/messages file:&lt;br /&gt;
&lt;br /&gt;
 Aug 12 17:27:42 homer httpd: PHP Warning:  main(): open_basedir restriction in effect. File(/tmp/test.php) is not within the allowed path(s): (/home/e-smith/files/ibays/Primary/html/) in /home/e-smith/files/ibays/Primary/html/test.php on line 2&lt;br /&gt;
&lt;br /&gt;
In general you will find this message in the log files only as by default PHP is configured to prevent the display of error messages to the end users. This can be changed as per [[PHP#Display_Error_Messages|this HowTo]].&lt;br /&gt;
&lt;br /&gt;
====Modifying the PHPBaseDir setting for an ibay====&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
(Please also see: [http://wiki.contribs.org/Useful_Commands#PHP_Related_Commands these] instructions on the [http://wiki.contribs.org/Useful_Commands Useful_Commands] page.)&lt;br /&gt;
&amp;lt;!--Please do not remove the following closing tag as a fromatting/rendering bug will kick in, for more details see: http://bugzilla.wikimedia.org/show_bug.cgi?id=10893--&amp;gt;&amp;lt;li&amp;gt;Open a SME Server shell as root user and document the current setting of the PHPBaseDir directive by writing down the output of the following command:&lt;br /&gt;
 db accounts getprop ibayname PHPBaseDir &lt;br /&gt;
Be careful to write it down to the letter as we need it in the next step.&lt;br /&gt;
For the Primary ibay the ouptut of above command would normally look like this:&lt;br /&gt;
 /home/e-smith/files/ibays/Primary/html/&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Decide on what directory you would like to add and issue the following:&lt;br /&gt;
 db accounts setprop ibayname PHPBaseDir value&lt;br /&gt;
Replace ibayname with the name of the ibay and value with the old value for the PHPBaseDir directive you have written down and a colon (:) followed by the full path to the directory you would like to add with a tailing slash (/), e.g.&lt;br /&gt;
 db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/&lt;br /&gt;
Above command would allow for invocation of scripts in the /opt/gallery2 path from the Primary ibay html folder by PHP.&lt;br /&gt;
To allow uploading of files to via http to a ibay name wiki:&lt;br /&gt;
 db accounts setprop wiki PHPBaseDir /home/e-smith/files/ibays/wiki/:/tmp/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;After defining the new setting we need to reflect the change in the configuration file of the web server and have the web server reload it&#039;s configuration file. This is done by issuing the following command:&lt;br /&gt;
 signal-event ibay-modify ibayname&lt;br /&gt;
&lt;br /&gt;
Be sure to replace ibayname with the name of the ibay you have just modified.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Upload_tmp_dir===&lt;br /&gt;
upload_tmp_dir&lt;br /&gt;
&lt;br /&gt;
From SME Server V8 up to and including SME Server V9, you could sometimes have an error thrown by PHP and would then need to specify a temporary directory (e.g. upload_tmp_dir) which is not set in php.ini. see [[bugzilla:6650]] and [[bugzilla:7652]]. Many php applications need this setting, the best-known culprits are Wordpress, Roundcube, eGroupWare, and there are others. The symptoms observed are that you can&#039;t upload contents to the PHP application.&lt;br /&gt;
&lt;br /&gt;
An easy resolution is to make a Custom Template to resolve this issue. See [[Uploadtmpdir]].&lt;br /&gt;
&lt;br /&gt;
=== Advanced use of the php-fpm pools ===&lt;br /&gt;
&lt;br /&gt;
==== For the ibays with php-fpm.d/ibays.conf ====&lt;br /&gt;
For the ibays better option is to simply use the contrib [[Webhosting]].&lt;br /&gt;
&lt;br /&gt;
==== For the contrib sharefolders with php-fpm.d/shares.conf ====&lt;br /&gt;
Similar to ibays.&lt;br /&gt;
&lt;br /&gt;
==== For the contribs with php-fpm.d/www.conf ====&lt;br /&gt;
Please read [[Building Your Contrib]].&lt;br /&gt;
&lt;br /&gt;
==== For your custom needs with php-fpm.d/custom.conf ====&lt;br /&gt;
You can build your own pool to use in any place on your server, even in a subfolder of an ibay or in place of the regular ibay php-pool (property PHPCustomPool).&lt;br /&gt;
&lt;br /&gt;
There are two ways in doing that:&lt;br /&gt;
&lt;br /&gt;
===== using db php =====&lt;br /&gt;
Using the default template : /etc/e-smith/templates/etc/php-fpm.d/custom.conf , you can set your own pool doing:&lt;br /&gt;
 db php set MYPOOLNAME pool Version 81 status enabled&lt;br /&gt;
here are the accepted supplementary properties, as always missing or empty means using default.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!property&lt;br /&gt;
!default&lt;br /&gt;
!values&lt;br /&gt;
!information&lt;br /&gt;
|-&lt;br /&gt;
|status&lt;br /&gt;
|enabled&lt;br /&gt;
|enabled,disabled&lt;br /&gt;
|-&lt;br /&gt;
|Version&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|php version to use eg 80 for php 8.0&lt;br /&gt;
|-&lt;br /&gt;
|MemoryLimit&lt;br /&gt;
|128M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxExecutionTime&lt;br /&gt;
|30&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxInputTime&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AllowUrlFopen&lt;br /&gt;
|off&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxChildren&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PostMaxSize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|UploadMaxFilesize&lt;br /&gt;
|10M&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FileUpload&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BaseDir&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DisabledFunctions&lt;br /&gt;
|system,show_source,symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|User&lt;br /&gt;
|www&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Group&lt;br /&gt;
|www&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|DisplayErrors&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LogErrors&lt;br /&gt;
|disabled&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MaxChildren&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AutoPrependFile&lt;br /&gt;
|enabled&lt;br /&gt;
|&lt;br /&gt;
|will use the autoprepend file&lt;br /&gt;
|-&lt;br /&gt;
|MailForceSender&lt;br /&gt;
|php\@$DomainName&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
You will then need two httpd.conf custom template fragment to use your pool. You will need to change   &#039;&#039;&#039;MYPOOL&#039;&#039;&#039; to what you want&lt;br /&gt;
 mkdir -p  /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/&lt;br /&gt;
 vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98mypoolusage&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory /home/e-smith/files/ibays/test/html/mysubfolder&amp;gt;&lt;br /&gt;
     SSLRequireSSL&lt;br /&gt;
     Options None&lt;br /&gt;
     Options +Indexes&lt;br /&gt;
     Options +FollowSymLinks&lt;br /&gt;
     DirectoryIndex index.php index.shtml index.htm index.html&lt;br /&gt;
     &amp;lt;FilesMatch \.php$&amp;gt;&lt;br /&gt;
          SetHandler &amp;quot;proxy:unix:/var/run/php-fpm/php80-MYPOOLNAME.sock|fcgi://localhost&amp;quot;&lt;br /&gt;
     &amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
     AllowOverride All&lt;br /&gt;
     order deny,allow&lt;br /&gt;
     deny from all&lt;br /&gt;
     allow from all&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
Then just do:&lt;br /&gt;
 signal-event webapps-update&lt;br /&gt;
&lt;br /&gt;
===== using a templates-custom =====&lt;br /&gt;
You can write your own fragment in /etc/e-smith/templates-custom/etc/php-fpm.d/custom.conf/ e.g. /etc/e-smith/templates-custom/etc/php-fpm.d/custom.conf/15mypool&lt;br /&gt;
&lt;br /&gt;
You will also need to write a httpd fragment similarly to what shown just above.&lt;br /&gt;
&lt;br /&gt;
Here is an example if you want a custom pool for your ibay,  in /etc/e-smith/templates-custom/etc/php-fpm.d/ibays.conf/15MYIBAY&amp;lt;syntaxhighlight lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
use esmith::AccountsDB;&lt;br /&gt;
use esmith::php;&lt;br /&gt;
my $a = esmith::AccountsDB-&amp;gt;open_ro || die &amp;quot;Couldn&#039;t open the accounts database&amp;quot;;&lt;br /&gt;
my $ibay = $a-&amp;gt;get(&amp;quot;MYIBAY&amp;quot;);&lt;br /&gt;
  my $version             = PhpFpmVersionToUse($ibay);&lt;br /&gt;
  my $dynamic             = $ibay-&amp;gt;prop(&#039;CgiBin&#039;) || &#039;disabled&#039;;&lt;br /&gt;
  my $custom              = $ibay-&amp;gt;prop(&#039;CustomPool&#039;) || undef;&lt;br /&gt;
  next unless ($dynamic eq &#039;enabled&#039; &amp;amp;&amp;amp; $version eq $PHP_VERSION &amp;amp;&amp;amp; $custom);&lt;br /&gt;
  my $key                 = $ibay-&amp;gt;key;&lt;br /&gt;
  my $name                = lc $key;&lt;br /&gt;
  my $pool_name           = &#039;php&#039; . $version . &#039;-&#039; . $name;&lt;br /&gt;
  $OUT .=&amp;lt;&amp;lt;&amp;quot;_EOF&amp;quot; if ($version eq $PHP_VERSION);&lt;br /&gt;
&lt;br /&gt;
[$pool_name]&lt;br /&gt;
user = www&lt;br /&gt;
group = www&lt;br /&gt;
listen.owner = root&lt;br /&gt;
listen.group = www&lt;br /&gt;
listen.mode = 0660&lt;br /&gt;
listen = /var/run/php-fpm/$pool_name.sock&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;put whatever you need there&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
_EOF&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have then to force the ibay to use it by doing :&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db accounts MYIBAY setprop CustomPool enabled&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will prevent the generation of the default ibay pool in  ibays.conf , and let you use /var/run/php-fpm/php$version-$name.sock socket from your template-custom... or from the db php using the same key as the name of the ibay.&lt;br /&gt;
&lt;br /&gt;
===Installation of Composer===&lt;br /&gt;
&lt;br /&gt;
This is made tricky as we do not have the PHP CLI configured.&lt;br /&gt;
&lt;br /&gt;
But we can install it as follows with command line arguments. This is using php7. Check the latest hash file as this changes.&lt;br /&gt;
&lt;br /&gt;
Download:&lt;br /&gt;
 php74 -d allow_url_fopen=on -r &amp;quot;copy(&#039;https://getcomposer.org/installer&#039;, &#039;composer-setup.php&#039;);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Hash check:&lt;br /&gt;
 php74 -r &amp;quot;if (hash_file(&#039;sha384&#039;, &#039;composer-setup.php&#039;) === &#039;e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02&#039;) { echo &#039;Installer verified&#039;; } else { echo &#039;Installer corrupt&#039;; unlink(&#039;composer-setup.php&#039;); } echo PHP_EOL;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 php74 -d allow_url_fopen=on  ./composer-setup.php&lt;br /&gt;
&lt;br /&gt;
=== Bash script===&lt;br /&gt;
&lt;br /&gt;
Add the code:&lt;br /&gt;
&lt;br /&gt;
 nano composer.install&lt;br /&gt;
&lt;br /&gt;
Paste this:&lt;br /&gt;
&lt;br /&gt;
 if [ ! -d &#039;/tmp/compose&#039; ]; then&lt;br /&gt;
    /usr/bin/mkdir -p /tmp/compose&lt;br /&gt;
    cd /tmp/compose&lt;br /&gt;
 else&lt;br /&gt;
    cd /tmp/compose&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Get the setup file&lt;br /&gt;
 /usr/bin/php74 -d allow_url_fopen=on -r &amp;quot;copy(&#039;https://getcomposer.org/installer&#039;, &#039;/tmp/compose/composer-setup.php&#039;);&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Hash check&lt;br /&gt;
 /usr/bin/php74 -r &amp;quot;if (hash_file(&#039;sha384&#039;, &#039;/tmp/compose/composer-setup.php&#039;) === &#039;dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6&#039;) { echo &#039;Installer verified&#039;; } else { echo &#039;Installer corrupt&#039;; unlink(&#039;/tmp/compose/composer-setup.php&#039;); } echo  PHP_EOL;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Install&lt;br /&gt;
 /usr/bin/php74 -d allow_url_fopen=on  /tmp/compose/composer-setup.php&lt;br /&gt;
 mv /tmp/compose/composer.phar /usr/local/bin/composer&lt;br /&gt;
&lt;br /&gt;
 # Tidy&lt;br /&gt;
 rm -rf /tmp/compose&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
&lt;br /&gt;
 chmod 0700 composer.install&lt;br /&gt;
 ./composer.install&lt;br /&gt;
&lt;br /&gt;
Check ths file is there:&lt;br /&gt;
&lt;br /&gt;
 ll /usr/local/bin/composer&lt;br /&gt;
&lt;br /&gt;
Use with &lt;br /&gt;
&lt;br /&gt;
 php74 composer &amp;lt;blah&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bugs ===&lt;br /&gt;
Please raise bugs under the SME-Server 10.X section in [http://bugs.contribs.org/enter_bug.cgi Bugzilla] and select the smeserver-php component or use {{BugzillaFileBug|product=SME%20Server%2010.X|component=e-smith-*%20and%20smeserver-*&amp;amp;20packages|title=this link}}.&lt;br /&gt;
&lt;br /&gt;
Below is an overview of the current issues for this package:&lt;br /&gt;
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-php|noresultsmessage=&amp;quot;No open bugs found.&amp;quot;}}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Howto]]&lt;br /&gt;
[[Category: Webapps]]&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Email_Server&amp;diff=84</id>
		<title>Email Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Email_Server&amp;diff=84"/>
		<updated>2025-12-26T11:44:37Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=150px heights=75px&amp;gt;&lt;br /&gt;
File:QMail.jpeg|https://cr.yp.to/qmail.html&lt;br /&gt;
File:Postfix.png|http://www.postfix.org/&lt;br /&gt;
File:Qpsmtpd.png|https://smtpd.github.io/qpsmtpd/&lt;br /&gt;
File:Dovecot.png|https://www.dovecot.org/&lt;br /&gt;
File:ClamAV.png|https://www.clamav.net/&lt;br /&gt;
File:Spamassassin.jpeg|https://spamassassin.apache.org/&lt;br /&gt;
File:Geoiplite2.jpeg|https://www.maxmind.com/&lt;br /&gt;
File:Letsencrypt.png|https://letsencrypt.org/&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==&amp;lt;SMALL &amp;gt;&#039;&#039;&#039;A private open source email server provides unlimited configuration, customisation, and users, with no additional cost per user, and mailbox size up to the available storage.&#039;&#039;&#039;&amp;lt;/SMALL &amp;gt;==&lt;br /&gt;
*DKIM Signed Email&lt;br /&gt;
*DMARC Policy&lt;br /&gt;
*SPF Policy&lt;br /&gt;
*DNSBL Blocklists&lt;br /&gt;
*RHSBL Blocklists&lt;br /&gt;
*URIBL Blocklists&lt;br /&gt;
*Whitelist / Blacklist&lt;br /&gt;
*Greylisting&lt;br /&gt;
*Spam and Virus Filtering&lt;br /&gt;
*GeoIP Filtering&lt;br /&gt;
*Multi-Domain&lt;br /&gt;
*Sieve Email Filtering&lt;br /&gt;
*Blind Carbon Copy&lt;br /&gt;
*SSL Encrypted IMAP + SMTP + POP3&lt;br /&gt;
*TLS Transport to Remote SMTP Hosts&lt;br /&gt;
*SSL Webmail with DAV Integration of Calendars, Contacts, Tasks&lt;br /&gt;
*Open Source Letsencrypt SSL Domain Verification Certificates, or Commercial SSL Certificates.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Koozali SME Server is free and open source&#039;&#039;&#039; – there are no limitations and you can inspect, integrate, extend and modify however you want.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=83</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=83"/>
		<updated>2025-12-26T11:37:13Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Business Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.2clever.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.2clever.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.2clever.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.2clever.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Useful_Commands|Useful&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=82</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=82"/>
		<updated>2025-12-26T11:36:16Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.2clever.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.2clever.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.2clever.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.2clever.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Useful_Commands|Useful&lt;br /&gt;
** https://wiki.2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Disk_Maintenance&amp;diff=81</id>
		<title>Disk Maintenance</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Disk_Maintenance&amp;diff=81"/>
		<updated>2025-12-21T06:57:07Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: /* Format Disk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Burn ISO to USB===&lt;br /&gt;
 dd if=xxx.iso of=/dev/sdc bs=64K&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
===dd copy continue on errors===&lt;br /&gt;
 dd if=/dev/sda conv=noerror,sync of=/dev/sdb bs=64K&lt;br /&gt;
&lt;br /&gt;
===ddrescue===&lt;br /&gt;
 &lt;br /&gt;
 ddrescue -d -f -r3 /dev/sda /dev/sdb -b8192&lt;br /&gt;
 &lt;br /&gt;
 In this example rescue /dev/sda to /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 ## No need to partition /dev/sdb beforehand, but if the partition table on /dev/sda ##&lt;br /&gt;
 ## is damaged, you will need to recreate it somehow on /dev/sdb. ##&lt;br /&gt;
     ddrescue -f -n /dev/sda /dev/sdb logfile&lt;br /&gt;
     ddrescue -d -f -r3 /dev/sda /dev/sdb logfile&lt;br /&gt;
 &lt;br /&gt;
 ## check for errors ##&lt;br /&gt;
     fsck -v -f /dev/sdb1&lt;br /&gt;
     fsck -v -f /dev/sdb2&lt;br /&gt;
 &lt;br /&gt;
 ddrescue command options;&lt;br /&gt;
 &lt;br /&gt;
    -f : Overwrite output device or partition.&lt;br /&gt;
    -n : Do not try to split or retry failed blocks.&lt;br /&gt;
    -d : Use direct disc access for input file.&lt;br /&gt;
    -r3 : Exit after given three (3) retries (use -1 as infinity retries).&lt;br /&gt;
    -b2048 : Sector size of input device [default is set to 512].&lt;br /&gt;
&lt;br /&gt;
===Format Disk===&lt;br /&gt;
 parted /dev/sdc&lt;br /&gt;
 mklabel gpt / msdos&lt;br /&gt;
 unit TB&lt;br /&gt;
 mkpart primary 0 -0&lt;br /&gt;
 &lt;br /&gt;
 or; mkpart primary 0.00 1.00TB&lt;br /&gt;
 quit&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext4 -L BACKUP2 /dev/sdc1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.xfs /dev/vm/sme&lt;br /&gt;
 &lt;br /&gt;
 mkfs.xfs -L 16TB1 /dev/sdc1&lt;br /&gt;
&lt;br /&gt;
===Label===&lt;br /&gt;
 e2label /dev/sdd1 USB1&lt;br /&gt;
 tune2fs -L volume-label device&lt;br /&gt;
 ntfslabel  device new-label&lt;br /&gt;
 xfs_admin -L label device&lt;br /&gt;
&lt;br /&gt;
===Zero===&lt;br /&gt;
 Zero MBR; dd if=/dev/zero of=/dev/sdc bs=446 count=1&lt;br /&gt;
 &lt;br /&gt;
 Zero MBR + Partition Table; dd if=/dev/zero of=/dev/sdc bs=512 count=1&lt;br /&gt;
 &lt;br /&gt;
 Zero MDADM; dd if=/dev/zero of=/dev/sdc bs=1M count=1024&lt;br /&gt;
&lt;br /&gt;
===Hot remove disk===&lt;br /&gt;
 umount /dev/sdx&lt;br /&gt;
 &lt;br /&gt;
 hdparm -Y /dev/sdx&lt;br /&gt;
&lt;br /&gt;
===mdadm repair===&lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sdb3&lt;br /&gt;
&lt;br /&gt;
===mdadm create===&lt;br /&gt;
 mdadm --create --verbose /dev/md3 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
===After creating, SAVE the RAID configuration===&lt;br /&gt;
 mdadm --detail --scan &amp;gt;&amp;gt; /etc/mdadm/mdadm.conf&lt;br /&gt;
&lt;br /&gt;
===Mount NTFS===&lt;br /&gt;
 Read Only;&lt;br /&gt;
 mount -t ntfs /dev/xxx /mnt/windows -o ro&lt;br /&gt;
  &lt;br /&gt;
 Read Write;&lt;br /&gt;
 ntfs-3g /dev/sdaX /mnt/windows&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add Disk to MDADM===&lt;br /&gt;
&lt;br /&gt;
 TEMPPROX:/vm/oldimages# lsblk&lt;br /&gt;
 NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sda       8:0    0   1.8T  0 disk  &lt;br /&gt;
 ├─sda1    8:1    0   7.5G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0   7.5G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sda2    8:2    0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sda3    8:3    0   1.8T  0 part  &lt;br /&gt;
   └─md2   9:2    0   1.8T  0 raid1 /&lt;br /&gt;
 sdb       8:16   0   1.8T  0 disk  &lt;br /&gt;
 └─sdb1    8:17   0   1.8T  0 part  /mnt/BACKUP1&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 TEMPPROX:~# parted /dev/sda&lt;br /&gt;
 GNU Parted 3.2&lt;br /&gt;
 Using /dev/sda&lt;br /&gt;
 Welcome to GNU Parted! Type &#039;help&#039; to view a list of commands.&lt;br /&gt;
 (parted) print                                                            &lt;br /&gt;
 Model: ATA WDC WD2003FYYS-0 (scsi)&lt;br /&gt;
 Disk /dev/sda: 2000GB&lt;br /&gt;
 Sector size (logical/physical): 512B/512B&lt;br /&gt;
 Partition Table: msdos&lt;br /&gt;
 Disk Flags: &lt;br /&gt;
 &lt;br /&gt;
 Number  Start   End     Size    Type     File system  Flags&lt;br /&gt;
  1      1049kB  8000MB  7999MB  primary               boot, raid&lt;br /&gt;
  2      8000MB  8511MB  512MB   primary               raid&lt;br /&gt;
  3      8511MB  2000GB  1992GB  primary               raid&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 mklabel msdos&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 1049kB 8000MB&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 8000MB 8511MB&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 8511MB 2000GB&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --add /dev/sdb1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sdb2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --add /dev/sdb3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 grub-install /dev/sdb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Disk swap===&lt;br /&gt;
&lt;br /&gt;
 ABPROX:~# smartctl -a /dev/sda&lt;br /&gt;
 Serial Number:    WD-WCAW34414439&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# smartctl -a /dev/sdb&lt;br /&gt;
 Serial Number:    WD-WCAW34329788&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# cat /proc/mdstat&lt;br /&gt;
 Personalities : [raid1] &lt;br /&gt;
 md2 : active raid1 sda3[0] sdb3[1]&lt;br /&gt;
       960505856 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
       bitmap: 2/8 pages [8KB], 65536KB chunk&lt;br /&gt;
 &lt;br /&gt;
 md1 : active raid1 sda2[0] sdb2[1]&lt;br /&gt;
       499392 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
       &lt;br /&gt;
 md0 : active raid1 sda1[0] sdb1[1]&lt;br /&gt;
       15616000 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
      &lt;br /&gt;
 unused devices: &amp;lt;none&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# lsblk&lt;br /&gt;
 NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sda       8:0    0 931.5G  0 disk  &lt;br /&gt;
 ├─sda1    8:1    0  14.9G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0  14.9G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sda2    8:2    0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sda3    8:3    0 916.1G  0 part  &lt;br /&gt;
   └─md2   9:2    0   916G  0 raid1 /&lt;br /&gt;
 sdb       8:16   0 931.5G  0 disk  &lt;br /&gt;
 ├─sdb1    8:17   0  14.9G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0  14.9G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sdb2    8:18   0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sdb3    8:19   0 916.1G  0 part  &lt;br /&gt;
   └─md2   9:2    0   916G  0 raid1 /&lt;br /&gt;
 sdc       8:32   0   1.8T  0 disk  &lt;br /&gt;
 └─sdc1    8:33   0   1.8T  0 part  /mnt/backups&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --fail /dev/sda1&lt;br /&gt;
 mdadm --manage /dev/md0 --remove /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --fail /dev/sda2&lt;br /&gt;
 mdadm --manage /dev/md1 --remove /dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --fail /dev/sda3&lt;br /&gt;
 mdadm --manage /dev/md2 --remove /dev/sda3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 sfdisk -d /dev/sdb &amp;gt; sfdisk_sdb.output&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# cat sfdisk_sdb.output&lt;br /&gt;
 # partition table of /dev/sdb&lt;br /&gt;
 unit: sectors&lt;br /&gt;
 &lt;br /&gt;
 /dev/sdb1 : start=     2048, size= 31248384, Id=fd, bootable&lt;br /&gt;
 /dev/sdb2 : start= 31250432, size=   999424, Id=fd&lt;br /&gt;
 /dev/sdb3 : start= 32249856, size=1921273856, Id=fd&lt;br /&gt;
 /dev/sdb4 : start=        0, size=        0, Id= 0&lt;br /&gt;
 &lt;br /&gt;
 sfdisk /dev/sda &amp;lt; sfdisk_sdb.output&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --add /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --add /dev/sda3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# sfdisk -l /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track&lt;br /&gt;
 Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0&lt;br /&gt;
 &lt;br /&gt;
    Device Boot Start     End   #cyls    #blocks   Id  System&lt;br /&gt;
 /dev/sda1   *      0+   1945-   1946-  15624192   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda2       1945+   2007-     63-    499712   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda3       2007+ 121601- 119594- 960636928   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda4          0       -       0          0    0  Empty&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# sfdisk -l /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track&lt;br /&gt;
 Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0&lt;br /&gt;
 &lt;br /&gt;
    Device Boot Start     End   #cyls    #blocks   Id  System&lt;br /&gt;
 /dev/sdb1   *      0+   1945-   1946-  15624192   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb2       1945+   2007-     63-    499712   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb3       2007+ 121601- 119594- 960636928   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb4          0       -       0          0    0  Empty&lt;br /&gt;
 &lt;br /&gt;
 ---------------------------------&lt;br /&gt;
 HowTo; write the GRUB boot sector&lt;br /&gt;
 dd if=/dev/sdb2 of=/dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 grub-install /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
=== FreePBX RAID recovered ===&lt;br /&gt;
&lt;br /&gt;
 https://help-grub.gnu.narkive.com/tNbK14Jv/grub2-install-couldn-t-find-physical-volume-null&lt;br /&gt;
 grub2-install: warning: Couldn&#039;t find physical volume `(null)&#039;. Some modules may be missing from core image.&lt;br /&gt;
 I think I know what happens. Did you reboot after MD was resynced? If not, please try&lt;br /&gt;
 &lt;br /&gt;
 blockdev --flushbufs /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 blockdev --flushbufs /dev/sdb1&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sdb&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Windows&amp;diff=80</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Windows&amp;diff=80"/>
		<updated>2025-12-21T06:55:34Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot; ===Windows=== Win7 enable administrator  run cmd as administrator  net user administrator /active:yes  MS nonpresent devices  set devmgr_show_nonpresent_devices=1  start devmgmt.msc  This will repair your TCP/IP settings and LSPs  netsh winsock reset catalog   powercfg.exe -h off  Pagefile information is stored in the registry as a multi_string  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management  Double click PagingFiles   ===WIN10 F8...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Windows===&lt;br /&gt;
Win7 enable administrator&lt;br /&gt;
 run cmd as administrator&lt;br /&gt;
 net user administrator /active:yes&lt;br /&gt;
&lt;br /&gt;
MS nonpresent devices&lt;br /&gt;
 set devmgr_show_nonpresent_devices=1&lt;br /&gt;
 start devmgmt.msc&lt;br /&gt;
&lt;br /&gt;
This will repair your TCP/IP settings and LSPs&lt;br /&gt;
 netsh winsock reset catalog&lt;br /&gt;
&lt;br /&gt;
 powercfg.exe -h off&lt;br /&gt;
&lt;br /&gt;
Pagefile information is stored in the registry as a multi_string&lt;br /&gt;
 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management&lt;br /&gt;
 Double click PagingFiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===WIN10 F8 SafeMode===&lt;br /&gt;
 bcdedit /set {default} bootmenupolicy legacy&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=TaxCalcHub&amp;diff=79</id>
		<title>TaxCalcHub</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=TaxCalcHub&amp;diff=79"/>
		<updated>2025-12-21T06:51:54Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot; ===Moving the database===  Backup within the program (Administration &amp;gt; Database &amp;gt; Backup)  When installed on the other machine restore the backup.  The other additional computers might detect there is another database available to connect to  but will pick up 2 databases whilst the current database remains on the machine it is on at the moment.  When you are happy the data has restored successfully remove the full installation from the old machine:    1. Go to Start &amp;gt; C...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Moving the database===&lt;br /&gt;
 Backup within the program (Administration &amp;gt; Database &amp;gt; Backup)&lt;br /&gt;
 When installed on the other machine restore the backup.&lt;br /&gt;
 The other additional computers might detect there is another database available to connect to&lt;br /&gt;
 but will pick up 2 databases whilst the current database remains on the machine it is on at the moment.&lt;br /&gt;
 When you are happy the data has restored successfully remove the full installation from the old machine:&lt;br /&gt;
 &lt;br /&gt;
 1. Go to Start &amp;gt; Control Panel &amp;gt; Uninstall a program&lt;br /&gt;
 2. Uninstall TaxCalc Hub and PostgreSQL 9.0&lt;br /&gt;
 3. Now go to My Computer &amp;gt; C:\ &amp;gt; Delete &#039;TaxCalc Hub&#039; Folder&lt;br /&gt;
 4. Open Program Files (or Program Files x86 if present) &amp;gt; Delete PostgreSQL&#039; folder&lt;br /&gt;
 5. Finally, go to Start &amp;gt; type &#039;cmd&#039; in the search box then press enter&lt;br /&gt;
 6. Type &#039;control userpasswords2&#039; &amp;gt; Delete the postgres user&lt;br /&gt;
 Now you can install the &#039;additional machine&#039; installation on this computer&lt;br /&gt;
&lt;br /&gt;
===Creating a Connection File===&lt;br /&gt;
 1. On the server click Windows Start button&lt;br /&gt;
 2. Select; All Programs / TaxCalc Hub&lt;br /&gt;
 3. Select; Discovery Response Editor program&lt;br /&gt;
 4. Select; Create Database Connection File button&lt;br /&gt;
 5. Save this ASP_DB_Connection.txt file.&lt;br /&gt;
 6. On the additional machine, drag and drop the ASP_DB_Connection.txt file onto the error dialog box.&lt;br /&gt;
&lt;br /&gt;
===If you still cannot log in, you will likely see a different error===&lt;br /&gt;
 For TaxCalc to connect to the database the following ports need to be open through the firewall:&lt;br /&gt;
  5432&lt;br /&gt;
  3838&lt;br /&gt;
  6178&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Mac_Reset_Password_Single_User&amp;diff=78</id>
		<title>Mac Reset Password Single User</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Mac_Reset_Password_Single_User&amp;diff=78"/>
		<updated>2025-12-21T06:48:00Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;==Change Password in Mac OS X Single User Mode==  Enter Single User Mode. Reboot the Mac and hold down Command+S at boot to enter into the command line. Run two commands in order to make filesystem changes. The first command checks the Mac OS X filesystem for errors and fixes them.  fsck -fy The next command mounts the root Mac OS X drive as writable, allowing you to make changes to the filesystem:  mount -uw / After the filesystem is mounted, you can reset any users pas...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Change Password in Mac OS X Single User Mode==&lt;br /&gt;
&lt;br /&gt;
Enter Single User Mode. Reboot the Mac and hold down Command+S at boot to enter into the command line.&lt;br /&gt;
Run two commands in order to make filesystem changes.&lt;br /&gt;
The first command checks the Mac OS X filesystem for errors and fixes them.&lt;br /&gt;
 fsck -fy&lt;br /&gt;
The next command mounts the root Mac OS X drive as writable, allowing you to make changes to the filesystem:&lt;br /&gt;
 mount -uw /&lt;br /&gt;
After the filesystem is mounted, you can reset any users password using the following command:&lt;br /&gt;
 passwd username&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==To reset your keychain in Mac OS X 10.4, Mac OS X 10.5, and Mac OS X 10.6 Snow Leopard or later==&lt;br /&gt;
 Open Keychain Access, which is in the Utilities folder within the Applications folder.&lt;br /&gt;
 From the Keychain Access menu, choose Preferences.&lt;br /&gt;
 Click General, then click Reset My Default Keychain.&lt;br /&gt;
 Authenticate with your account login password.&lt;br /&gt;
 Quit Keychain Access.&lt;br /&gt;
 Restart your computer.&lt;br /&gt;
&lt;br /&gt;
To reset your keychain in Mac OS X 10.3 through 10.3.9:&lt;br /&gt;
 Open Keychain Access, which is in the Utilities folder within the Applications folder.&lt;br /&gt;
 From the Window menu, choose Keychain First Aid.&lt;br /&gt;
 Click Options...&lt;br /&gt;
 Click Reset My Keychain, which is under the General pane.&lt;br /&gt;
 Authenticate with your account login password.&lt;br /&gt;
 Quit Keychain Access.&lt;br /&gt;
 Restart your computer.&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Debian_Sudo&amp;diff=77</id>
		<title>Debian Sudo</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Debian_Sudo&amp;diff=77"/>
		<updated>2025-12-21T06:46:26Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;  apt-get install sudo    SVR:/etc# cat sudoers  #  # This file MUST be edited with the &amp;#039;visudo&amp;#039; command as root.  #  # Please consider adding local content in /etc/sudoers.d/ instead of  # directly modifying this file.  #  # See the man page for details on how to write a sudoers file.  #  Defaults	env_reset  Defaults	mail_badpass  Defaults	secure_path=&amp;quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&amp;quot;    # Host alias specification    # User alias specificati...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
 apt-get install sudo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 SVR:/etc# cat sudoers&lt;br /&gt;
 #&lt;br /&gt;
 # This file MUST be edited with the &#039;visudo&#039; command as root.&lt;br /&gt;
 #&lt;br /&gt;
 # Please consider adding local content in /etc/sudoers.d/ instead of&lt;br /&gt;
 # directly modifying this file.&lt;br /&gt;
 #&lt;br /&gt;
 # See the man page for details on how to write a sudoers file.&lt;br /&gt;
 #&lt;br /&gt;
 Defaults	env_reset&lt;br /&gt;
 Defaults	mail_badpass&lt;br /&gt;
 Defaults	secure_path=&amp;quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Host alias specification&lt;br /&gt;
 &lt;br /&gt;
 # User alias specification&lt;br /&gt;
 &lt;br /&gt;
 # Cmnd alias specification&lt;br /&gt;
 &lt;br /&gt;
 # User privilege specification&lt;br /&gt;
 root	ALL=(ALL:ALL) ALL&lt;br /&gt;
 &lt;br /&gt;
 # Allow members of group sudo to execute any command&lt;br /&gt;
 %sudo	ALL=(ALL:ALL) ALL&lt;br /&gt;
 &lt;br /&gt;
 # See sudoers(5) for more information on &amp;quot;#include&amp;quot; directives:&lt;br /&gt;
 &lt;br /&gt;
 #includedir /etc/sudoers.d&lt;br /&gt;
 &lt;br /&gt;
 # Lines matching CHECK_RAID added by ./check_raid -S on Wed Jun 17 14:45:48 2015&lt;br /&gt;
 User_Alias CHECK_RAID=nagios&lt;br /&gt;
 CHECK_RAID ALL=(root) NOPASSWD: /usr/sbin/hpacucli controller all show status&lt;br /&gt;
 CHECK_RAID ALL=(root) NOPASSWD: /usr/sbin/hpacucli controller * logicaldrive all show&lt;br /&gt;
 &lt;br /&gt;
 nagios ALL=NOPASSWD: /usr/sbin/hpacucli&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Debian_APT&amp;diff=76</id>
		<title>Debian APT</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Debian_APT&amp;diff=76"/>
		<updated>2025-12-21T06:45:44Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;  =Check for unused packages=  dpkg -l | awk &amp;#039;/^rc/ { print $2 }&amp;#039;    apt-get purge xxx    apt-mark hold smartmontools    ALL in one go;    apt-get purge $(dpkg -l | awk &amp;#039;/^rc/ { print $2 }&amp;#039;)    dpkg --get-selections | grep &amp;#039;hold$&amp;#039;    apt-mark unhold openssh-server  apt-mark unhold net-tools  apt-mark unhold bridge-utils&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
=Check for unused packages=&lt;br /&gt;
 dpkg -l | awk &#039;/^rc/ { print $2 }&#039;&lt;br /&gt;
 &lt;br /&gt;
 apt-get purge xxx&lt;br /&gt;
 &lt;br /&gt;
 apt-mark hold smartmontools&lt;br /&gt;
 &lt;br /&gt;
 ALL in one go;&lt;br /&gt;
 &lt;br /&gt;
 apt-get purge $(dpkg -l | awk &#039;/^rc/ { print $2 }&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 dpkg --get-selections | grep &#039;hold$&#039;&lt;br /&gt;
 &lt;br /&gt;
 apt-mark unhold openssh-server&lt;br /&gt;
 apt-mark unhold net-tools&lt;br /&gt;
 apt-mark unhold bridge-utils&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=DNS_Record_Types&amp;diff=75</id>
		<title>DNS Record Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=DNS_Record_Types&amp;diff=75"/>
		<updated>2025-12-21T06:43:00Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;== Resource Records == {| class=&amp;quot;wikitable sortable&amp;quot; |- ! |Code ! |Number ! width=&amp;quot;90pt&amp;quot;|Defining RFC ! class=&amp;quot;unsortable&amp;quot;|Description ! class=&amp;quot;unsortable&amp;quot;|Function |- | &amp;lt;div id=&amp;quot;A&amp;quot;/&amp;gt;A |1 |RFC 1035 | &amp;#039;&amp;#039;&amp;#039;address record&amp;#039;&amp;#039;&amp;#039;|| Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but also used for DNSBLs, storing subnet masks in RFC 1101, etc. |- | &amp;lt;div id=&amp;quot;AAAA&amp;quot;/&amp;gt;AAAA  |28 |RFC 3596 | &amp;#039;&amp;#039;&amp;#039;IPv6 address record&amp;#039;&amp;#039;&amp;#039;|| Returns a 128-bit I...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Resource Records ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! |Code&lt;br /&gt;
! |Number&lt;br /&gt;
! width=&amp;quot;90pt&amp;quot;|Defining RFC&lt;br /&gt;
! class=&amp;quot;unsortable&amp;quot;|Description&lt;br /&gt;
! class=&amp;quot;unsortable&amp;quot;|Function&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;A&amp;quot;/&amp;gt;A&lt;br /&gt;
|1&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;address record&#039;&#039;&#039;|| Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but also used for DNSBLs, storing subnet masks in RFC 1101, etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;AAAA&amp;quot;/&amp;gt;AAAA &lt;br /&gt;
|28&lt;br /&gt;
|RFC 3596&lt;br /&gt;
| &#039;&#039;&#039;IPv6 address record&#039;&#039;&#039;|| Returns a 128-bit IPv6 address, most commonly used to map hostnames to an IP address of the host.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;AFSDB&amp;quot;/&amp;gt;AFSDB&lt;br /&gt;
|18&lt;br /&gt;
|RFC 1183&lt;br /&gt;
|&#039;&#039;&#039;AFS database record&#039;&#039;&#039;&lt;br /&gt;
|Location of database servers of an Andrew File System (AFS) cell. This record is commonly used by AFS clients to contact AFS cells outside their local domain. A subtype of this record is used by the obsolete DCE Distributed File System (DCE/DFS) file system.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;CERT&amp;quot;/&amp;gt;CERT ||37||RFC 4398||&#039;&#039;&#039;Certificate record&#039;&#039;&#039;||Stores PKIX, SPKI, Pretty Good Privacy (PGP), etc.&lt;br /&gt;
|-&lt;br /&gt;
| CNAME record|CNAME&lt;br /&gt;
|5&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;Canonical name record&#039;&#039;&#039;|| Alias of one name to another: the DNS lookup will continue by retrying the lookup with the new name.  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;DHCID&amp;quot;/&amp;gt;DHCID ||49||RFC 4701||&#039;&#039;&#039;DHCP identifier&#039;&#039;&#039;||Used in conjunction with the FQDN option to DHCP&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;DLV&amp;quot;/&amp;gt;DLV||32769||RFC 4431||&#039;&#039;&#039;DNSSEC Lookaside Validation record&#039;&#039;&#039;||For publishing DNSSEC trust anchors outside of the DNS delegation chain.  Uses the same format as the DS record. RFC 5074 describes a way of using these records.&lt;br /&gt;
|-&lt;br /&gt;
|DNAME record (DNAME)&lt;br /&gt;
|39&lt;br /&gt;
|RFC 2672&lt;br /&gt;
|&#039;&#039;&#039;delegation name&#039;&#039;&#039;&lt;br /&gt;
|DNAME will delegate an entire portion of the DNS tree under a new name. In contrast, the CNAME record creates an alias of a single name.  Like the CNAME record, the DNS lookup will continue by retrying the lookup with the new name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;DNSKEY&amp;quot;/&amp;gt;DNSKEY||48||RFC 4034||&#039;&#039;&#039;DNS Key record&#039;&#039;&#039;||The key record used in DNSSEC. Uses the same format as the KEY record.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;DS&amp;quot;/&amp;gt;DS||43||RFC 4034||&#039;&#039;&#039;Delegation signer&#039;&#039;&#039;||The record used to identify the DNSSEC signing key of a delegated zone&lt;br /&gt;
|-&lt;br /&gt;
|Host Identity Protocol (HIP)&lt;br /&gt;
|55&lt;br /&gt;
|RFC 5205&lt;br /&gt;
|&#039;&#039;&#039;Host Identity Protocol&#039;&#039;&#039;&lt;br /&gt;
|Method of separating the end-point identifier and locator roles of IP addresses.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;IPSECKEY&amp;quot;/&amp;gt;IPSECKEY||45||RFC 4025||&#039;&#039;&#039;IPSEC Key&#039;&#039;&#039;||Key record that can be used with IPSEC&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;KEY&amp;quot;/&amp;gt;KEY||25||RFC 4034||&#039;&#039;&#039;Key record&#039;&#039;&#039;||Used only for TKEY (RFC 2930). Before RFC 3755 was published, this was also used for DNSSEC, but DNSSEC now uses DNSKEY.&lt;br /&gt;
|-&lt;br /&gt;
| LOC record (LOC)&lt;br /&gt;
|29&lt;br /&gt;
|RFC 1876&lt;br /&gt;
| &#039;&#039;&#039;Location record &#039;&#039;&#039;&lt;br /&gt;
| Specifies a geographical location associated with a domain name&lt;br /&gt;
|-&lt;br /&gt;
| MX record (MX)&lt;br /&gt;
|15&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;mail exchange record&#039;&#039;&#039;&lt;br /&gt;
| Maps a domain name to a list of mail exchange servers for that domain&lt;br /&gt;
|-&lt;br /&gt;
| NAPTR record (NAPTR)&lt;br /&gt;
|35&lt;br /&gt;
|RFC 3403&lt;br /&gt;
| &#039;&#039;&#039;Naming Authority Pointer&#039;&#039;&#039;&lt;br /&gt;
| Allows regular expression based rewriting of domain names which can then be used as URIs, further domain names to lookups, etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;NS&amp;quot;/&amp;gt;NS&lt;br /&gt;
|2&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;name server record&#039;&#039;&#039;&lt;br /&gt;
| Delegates a DNS zone to use the given authoritative name servers&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;NSEC&amp;quot;/&amp;gt;NSEC||47||RFC 4034||&#039;&#039;&#039;Next-Secure record&#039;&#039;&#039;||Part of DNSSEC&amp;amp;mdash;used to prove a name does not exist. Uses the same format as the (obsolete) NXT record.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;NSEC3&amp;quot;/&amp;gt;NSEC3||50||RFC 5155||&#039;&#039;&#039;NSEC record version 3&#039;&#039;&#039;||An extension to DNSSEC that allows proof of nonexistence for a name without permitting zonewalking&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;NSEC3PARAM&amp;quot;/&amp;gt;NSEC3PARAM||51||RFC 5155||&#039;&#039;&#039;NSEC3 parameters&#039;&#039;&#039;||Parameter record for use with NSEC3&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;PTR&amp;quot;/&amp;gt;PTR &lt;br /&gt;
|12&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;pointer record&#039;&#039;&#039;&lt;br /&gt;
| Pointer to a canonical name. Unlike a CNAME, DNS processing does &amp;lt;i&amp;gt;NOT&amp;lt;/i&amp;gt; proceed, just the name is returned.  The most common use is for implementing reverse DNS lookups, but other uses include such things as Zero configuration networking#Apple&#039;s protocol: Multicast DNS/DNS-SD|DNS-SD.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;RRSIG&amp;quot;/&amp;gt;RRSIG||46||RFC 4034||&#039;&#039;&#039;DNSSEC signature&#039;&#039;&#039;||Signature for a DNSSEC-secured record set. Uses the same format as the SIG record.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;SIG&amp;quot;/&amp;gt;SIG||24||RFC 2535||&#039;&#039;&#039;Signature&#039;&#039;&#039;||Signature record used in SIG(0) (RFC 2931). Until RFC 3755 was published, the SIG record was part of DNSSEC; now RRSIG is used for that.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;SOA&amp;quot;/&amp;gt;SOA &lt;br /&gt;
|6&lt;br /&gt;
|RFC 1035&lt;br /&gt;
| &#039;&#039;&#039;start of authority record&#039;&#039;&#039;&lt;br /&gt;
| Specifies &#039;&#039;authoritative&#039;&#039; information about a DNS zone, including the primary name server, the email of the domain administrator, the domain serial number, and several timers relating to refreshing the zone.&lt;br /&gt;
|-&lt;br /&gt;
| Sender Policy Framework (SPF)||99||RFC 4408||&#039;&#039;&#039;SPF record&#039;&#039;&#039;||Specified as part of the SPF protocol, as an alternative to storing SPF data in TXT records.  Uses the same format as the TXT record.&lt;br /&gt;
|-&lt;br /&gt;
| SRV record|SRV&lt;br /&gt;
|33&lt;br /&gt;
|RFC 2782&lt;br /&gt;
|&#039;&#039;&#039;Service locator&#039;&#039;&#039;&lt;br /&gt;
|Generalized service location record, used for newer protocols instead of creating protocol-specific records such as MX.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;SSHFP&amp;quot;/&amp;gt;SSHFP&lt;br /&gt;
|44&lt;br /&gt;
|RFC 4255&lt;br /&gt;
|&#039;&#039;&#039;SSH Public Key Fingerprint&#039;&#039;&#039;&lt;br /&gt;
|Resource record for publishing Secure Shell (SSH) public host key fingerprints in the DNS System, in order to aid in verifying the authenticity of the host.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div id=&amp;quot;TA&amp;quot;/&amp;gt;TA||32768||None||&#039;&#039;&#039;DNSSEC Trust Authorities&#039;&#039;&#039;||Part of a deployment proposal for DNSSEC without a signed DNS root. See the [http://www.iana.org/assignments/dns-parameters IANA database] and [http://www.watson.org/~weiler/INI1999-19.pdf Weiler Spec]] for details.   Uses the same format as the DS record.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;div id=&amp;quot;TXT&amp;quot;/&amp;gt;TXT&lt;br /&gt;
|16&lt;br /&gt;
|RFC 1035&lt;br /&gt;
|&#039;&#039;&#039;Text record&#039;&#039;&#039;&lt;br /&gt;
|Originally for arbitrary human-readable &#039;&#039;text&#039;&#039; in a DNS record. Since the early 1990s, however, this record more often carries machine-readable data, such as specified by RFC 1464, opportunistic encryption, Sender Policy Framework (deprecated), DomainKeys, Zero configuration networking#Apple&#039;s protocol: Multicast DNS/DNS-SD|DNS-SD, etc.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=BT_codes&amp;diff=74</id>
		<title>BT codes</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=BT_codes&amp;diff=74"/>
		<updated>2025-12-21T06:41:50Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;B. T. NETWORK SERVICE CODES FOR SELECT SERVICES  ADSL Line Reset  (line_no.)@startup_domain / any password - not null  ADSL Performance  http://www.speedtester.bt.com  enter tel. no. then ADSL login  ADSL Speed Test (fixed speed only)  speedtest@speedtest_domain / any password - not null  visit http://www.speedtester.bt.com, enter your telephone number  ADSL Test  bt_test@startup_domain / (password ignored)  visit http://www.bt.net/digitaldemo  Anonymous Call Rejection...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;B. T. NETWORK SERVICE CODES FOR SELECT SERVICES&lt;br /&gt;
&lt;br /&gt;
ADSL Line Reset&lt;br /&gt;
 (line_no.)@startup_domain / any password - not null&lt;br /&gt;
&lt;br /&gt;
ADSL Performance&lt;br /&gt;
 http://www.speedtester.bt.com&lt;br /&gt;
 enter tel. no. then ADSL login&lt;br /&gt;
&lt;br /&gt;
ADSL Speed Test (fixed speed only)&lt;br /&gt;
 speedtest@speedtest_domain / any password - not null&lt;br /&gt;
 visit http://www.speedtester.bt.com, enter your telephone number&lt;br /&gt;
&lt;br /&gt;
ADSL Test&lt;br /&gt;
 bt_test@startup_domain / (password ignored)&lt;br /&gt;
 visit http://www.bt.net/digitaldemo&lt;br /&gt;
&lt;br /&gt;
Anonymous Call Rejection&lt;br /&gt;
 SET ANONYMOUS CALL REJECTION   	*227#&lt;br /&gt;
 CHECK ACR   	*#227#  &lt;br /&gt;
 CANCEL ACR   	#227#  &lt;br /&gt;
&lt;br /&gt;
Call Divert on all calls&lt;br /&gt;
 SET CALL DIVERSION  	 * 21 * [phone number] #    &lt;br /&gt;
 CHECK CALL DIVERSION   	* # 21 #  &lt;br /&gt;
 CANCEL CALL DIVERSION   	# 21 # &lt;br /&gt;
 Call Divert on no reply&lt;br /&gt;
 SET DIVERSION ON NO REPLY   	* 61 * [phone number] #                      &lt;br /&gt;
 CHECK DIVERSION ON NO REPLY   	* # 61 #                        &lt;br /&gt;
 CANCEL DIVERSION ON NO REPLY   	# 61 #&lt;br /&gt;
&lt;br /&gt;
Call Divert on busy&lt;br /&gt;
 SET DIVERSION ON BUSY 	* 67 * [phone number] #&lt;br /&gt;
 CHECK DIVERSION ON BUSY   	* # 67 # &lt;br /&gt;
 CANCEL DIVERSION ON BUSY 	# 67 #&lt;br /&gt;
&lt;br /&gt;
Call Divert on no reply or busy&lt;br /&gt;
 SET DIVERSION ON NO REPLY &amp;amp; BUSY   	* 66 * [phone number] # &lt;br /&gt;
 CHECK DIVERSION ON NO REPLY &amp;amp; BUSY   	* # 66 #&lt;br /&gt;
 CANCEL DIVERSION ON NO REPLY &amp;amp; BUSY   	# 66 #&lt;br /&gt;
&lt;br /&gt;
Call Minder (Voicemail)&lt;br /&gt;
 CALL MINDER SERVICE 	1571                                                                                    &lt;br /&gt;
&lt;br /&gt;
Call Waiting&lt;br /&gt;
 SET CALL WAITING 	* 43 #&lt;br /&gt;
 CHECK CALL WAITING 	* # 43 #&lt;br /&gt;
 CANCEL CALL WAITING 	# 43 #&lt;br /&gt;
&lt;br /&gt;
Caller Display&lt;br /&gt;
 SET CALLER DISPLAY DATA ON   	*234#&lt;br /&gt;
 CHECK CALLER DISPLAY DATA   	*#234#&lt;br /&gt;
 CANCEL CALLER DISPLAY DATA 	#234#&lt;br /&gt;
&lt;br /&gt;
Caller ID&lt;br /&gt;
 WITHHOLD CALLER ID 	141    [phone number]  &lt;br /&gt;
 RELEASE CALLER ID  	1470  [phone number]  &lt;br /&gt;
 CALLER RETURN 	1471                                                                                    &lt;br /&gt;
 ERASES LAST NUMBER GIVEN ON CALLER RETURN 	1475     &lt;br /&gt;
 BLOCK LAST CALL ANSWERED WITH CHOOSE TO REFUSE 	14258 [PIN] **   &lt;br /&gt;
 ADD TO LIST OF BLOCKED NUMBERS WITH CHOOSE TO REFUSE 	14258 [phone number] #                    &lt;br /&gt;
&lt;br /&gt;
Charge Advice&lt;br /&gt;
 SET CHARGE ADVICE (BEFORE A CALL)   	* 40 * [phone number] #  &lt;br /&gt;
 SET CHARGE ADVICE (FOR ALL CALLS)   	* 411 #&lt;br /&gt;
 CHECK CHARGE ADVICE 	*# 411 #&lt;br /&gt;
 CANCEL CHARGE ADVICE 	# 411 #&lt;br /&gt;
&lt;br /&gt;
Choose to Refuse&lt;br /&gt;
 BLOCK LAST CALL ANSWERED WITH CHOOSE TO REFUSE 	14258 [PIN] **   &lt;br /&gt;
 ADD TO LIST OF BLOCKED NUMBERS WITH CHOOSE TO REFUSE 	14258 [phone number] # &lt;br /&gt;
&lt;br /&gt;
Incoming Call Barring&lt;br /&gt;
 SET INCOMING CALL BARRING   	* 261 #&lt;br /&gt;
 CHECK INCOMING CALL BARRING   	* # 261 # &lt;br /&gt;
 CANCEL INCOMING CALL BARRING   	# 261 #&lt;br /&gt;
&lt;br /&gt;
Miscellaneous&lt;br /&gt;
 CHECK WHICH SERVICES ARE ACTIVE 	* # 001 #&lt;br /&gt;
 BT LINE TEST &amp;amp; RINGBACK FACILITY 	17070     &lt;br /&gt;
 REDIAL LAST NUMBER DIALLED 	**0  &lt;br /&gt;
&lt;br /&gt;
Outgoing Call Barring&lt;br /&gt;
 SET OUTGOING CALL BARRING 	* 34 option #&lt;br /&gt;
 CHECK OUTGOING CALL BARRING   	* # 34 # &lt;br /&gt;
 CANCEL OUTGOING CALL BARRING   	# 34 option * [PIN] #&lt;br /&gt;
&lt;br /&gt;
Reminder Call Service&lt;br /&gt;
 SET REMINDER CALL (using 24 hour clock with 4 digits)   	* 55 * [time] #&lt;br /&gt;
 CHECK REMINDER CALL 	* # 55 # &lt;br /&gt;
 CANCEL REMINDER CALL 	# 55 #  &lt;br /&gt;
 SET REGULAR REMINDER CALL   	* 56 * [time] * [day option] #&lt;br /&gt;
 CHECK ALL REGULAR REMINDER CALL   	* # 56 # &lt;br /&gt;
 CANCEL A REGULAR REMINDER CALL   	# 56 * [time] * [day option] # &lt;br /&gt;
 CANCEL ALL REGULAR REMINDER CALLS   	# 56 #&lt;br /&gt;
 Day options numbers: Monday - 1, Tuesday - 2, Wednesday - 3, Thursday - 4, Friday - 5, Saturday - 6, Sunday - 7, Monday - Friday: 8 Every Day - 9.&lt;br /&gt;
&lt;br /&gt;
Remote (Smart) Call Divert on all calls&lt;br /&gt;
 SET REMOTE CALL DIVERT ON  ALL CALLS 	* 44 * [PIN] * [your full phone number] * [number to divert to] #&lt;br /&gt;
 CHECK REMOTE CALL DIVERT ON ALL CALLS   	# 44 * [PIN] * [your full phone number] #&lt;br /&gt;
 CANCEL REMOTE CALL DIVERT ON ALL CALLS   	* # 44 * [PIN] * [your full phone number] #&lt;br /&gt;
&lt;br /&gt;
Remote (Smart) Call Divert on no reply&lt;br /&gt;
 SET REMOTE CALL DIVERT ON NO REPLY 	* 64 * [PIN] * [your full phone number] * [phone number to divert to] #&lt;br /&gt;
 CHECK REMOTE CALL DIVERT ON NO REPLY   	# 64 * [PIN] * [your full phone number] #&lt;br /&gt;
 CANCEL REMOTE CALL DIVERT ON NO REPLY   	* # 64 * [PIN] * [your full phone number] # &lt;br /&gt;
&lt;br /&gt;
Remote (Smart) Call Divert on busy&lt;br /&gt;
 SET REMOTE CALL DIVERT ON BUSY 	* 65 * [PIN] * [your full phone number] * [phone number to divert to] #&lt;br /&gt;
 CHECK REMOTE CALL DIVERT ON BUSY   	# 65 * [PIN] * [your full phone number] #&lt;br /&gt;
 CANCEL REMOTE CALL DIVERT ON BUSY   	* # 65 * [PIN] * [your full phone number] # &lt;br /&gt;
&lt;br /&gt;
Ringback&lt;br /&gt;
 SET RINGBACK 	[phone number] 5&lt;br /&gt;
 CHECK RINGBACK  	*#37#  &lt;br /&gt;
 CANCEL RINGBACK 	#37#&lt;br /&gt;
 SET RING BACK INHIBIT 	*02*37# &lt;br /&gt;
 CHECK RING BACK INHIBIT 	*#02*37#&lt;br /&gt;
 CANCEL RING BACK INHIBIT 	#02*37#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Quiet Line Test&lt;br /&gt;
&lt;br /&gt;
 Unplug everything&lt;br /&gt;
 Dial 17070, press option 2 (quiet line test)&lt;br /&gt;
&lt;br /&gt;
Distance From Exchange&lt;br /&gt;
&lt;br /&gt;
 Dial 17070&lt;br /&gt;
 Option 3 (fast test)&lt;br /&gt;
 Option 1 (to say you are authorised)&lt;br /&gt;
 Option 2 (ring back test). Then put the phone down.&lt;br /&gt;
 You will get called back by the test facility within about 10 seconds, one of the bits of information given will be distance from exchange (in kilometres).&lt;br /&gt;
 *The distance result may not be accurate if you have a &#039;DACs&#039; fitted. It is not 100% accurate but does serve as a guide.&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Disk_Maintenance&amp;diff=73</id>
		<title>Disk Maintenance</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Disk_Maintenance&amp;diff=73"/>
		<updated>2025-12-21T06:40:26Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot; ===Burn ISO to USB===  dd if=xxx.iso of=/dev/sdc bs=64K  sync  ===dd copy continue on errors===  dd if=/dev/sda conv=noerror,sync of=/dev/sdb bs=64K  ===ddrescue===    ddrescue -d -f -r3 /dev/sda /dev/sdb -b8192    In this example rescue /dev/sda to /dev/sdb    ## No need to partition /dev/sdb beforehand, but if the partition table on /dev/sda ##  ## is damaged, you will need to recreate it somehow on /dev/sdb. ##      ddrescue -f -n /dev/sda /dev/sdb logfile      ddres...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Burn ISO to USB===&lt;br /&gt;
 dd if=xxx.iso of=/dev/sdc bs=64K&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
===dd copy continue on errors===&lt;br /&gt;
 dd if=/dev/sda conv=noerror,sync of=/dev/sdb bs=64K&lt;br /&gt;
&lt;br /&gt;
===ddrescue===&lt;br /&gt;
 &lt;br /&gt;
 ddrescue -d -f -r3 /dev/sda /dev/sdb -b8192&lt;br /&gt;
 &lt;br /&gt;
 In this example rescue /dev/sda to /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 ## No need to partition /dev/sdb beforehand, but if the partition table on /dev/sda ##&lt;br /&gt;
 ## is damaged, you will need to recreate it somehow on /dev/sdb. ##&lt;br /&gt;
     ddrescue -f -n /dev/sda /dev/sdb logfile&lt;br /&gt;
     ddrescue -d -f -r3 /dev/sda /dev/sdb logfile&lt;br /&gt;
 &lt;br /&gt;
 ## check for errors ##&lt;br /&gt;
     fsck -v -f /dev/sdb1&lt;br /&gt;
     fsck -v -f /dev/sdb2&lt;br /&gt;
 &lt;br /&gt;
 ddrescue command options;&lt;br /&gt;
 &lt;br /&gt;
    -f : Overwrite output device or partition.&lt;br /&gt;
    -n : Do not try to split or retry failed blocks.&lt;br /&gt;
    -d : Use direct disc access for input file.&lt;br /&gt;
    -r3 : Exit after given three (3) retries (use -1 as infinity retries).&lt;br /&gt;
    -b2048 : Sector size of input device [default is set to 512].&lt;br /&gt;
&lt;br /&gt;
===Format Disk===&lt;br /&gt;
 parted /dev/sdc&lt;br /&gt;
 mklabel gpt&lt;br /&gt;
 unit TB&lt;br /&gt;
 mkpart primary 0 -0&lt;br /&gt;
 &lt;br /&gt;
 or; mkpart primary 0.00 1.00TB&lt;br /&gt;
 quit&lt;br /&gt;
 &lt;br /&gt;
 mkfs.ext4 -L BACKUP2 /dev/sdc1&lt;br /&gt;
 &lt;br /&gt;
 mkfs.xfs /dev/vm/sme&lt;br /&gt;
 &lt;br /&gt;
 mkfs.xfs -L 16TB1 /dev/sdc1&lt;br /&gt;
&lt;br /&gt;
===Label===&lt;br /&gt;
 e2label /dev/sdd1 USB1&lt;br /&gt;
 tune2fs -L volume-label device&lt;br /&gt;
 ntfslabel  device new-label&lt;br /&gt;
 xfs_admin -L label device&lt;br /&gt;
&lt;br /&gt;
===Zero===&lt;br /&gt;
 Zero MBR; dd if=/dev/zero of=/dev/sdc bs=446 count=1&lt;br /&gt;
 &lt;br /&gt;
 Zero MBR + Partition Table; dd if=/dev/zero of=/dev/sdc bs=512 count=1&lt;br /&gt;
 &lt;br /&gt;
 Zero MDADM; dd if=/dev/zero of=/dev/sdc bs=1M count=1024&lt;br /&gt;
&lt;br /&gt;
===Hot remove disk===&lt;br /&gt;
 umount /dev/sdx&lt;br /&gt;
 &lt;br /&gt;
 hdparm -Y /dev/sdx&lt;br /&gt;
&lt;br /&gt;
===mdadm repair===&lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sdb3&lt;br /&gt;
&lt;br /&gt;
===mdadm create===&lt;br /&gt;
 mdadm --create --verbose /dev/md3 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1&lt;br /&gt;
&lt;br /&gt;
===After creating, SAVE the RAID configuration===&lt;br /&gt;
 mdadm --detail --scan &amp;gt;&amp;gt; /etc/mdadm/mdadm.conf&lt;br /&gt;
&lt;br /&gt;
===Mount NTFS===&lt;br /&gt;
 Read Only;&lt;br /&gt;
 mount -t ntfs /dev/xxx /mnt/windows -o ro&lt;br /&gt;
  &lt;br /&gt;
 Read Write;&lt;br /&gt;
 ntfs-3g /dev/sdaX /mnt/windows&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add Disk to MDADM===&lt;br /&gt;
&lt;br /&gt;
 TEMPPROX:/vm/oldimages# lsblk&lt;br /&gt;
 NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sda       8:0    0   1.8T  0 disk  &lt;br /&gt;
 ├─sda1    8:1    0   7.5G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0   7.5G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sda2    8:2    0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sda3    8:3    0   1.8T  0 part  &lt;br /&gt;
   └─md2   9:2    0   1.8T  0 raid1 /&lt;br /&gt;
 sdb       8:16   0   1.8T  0 disk  &lt;br /&gt;
 └─sdb1    8:17   0   1.8T  0 part  /mnt/BACKUP1&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 TEMPPROX:~# parted /dev/sda&lt;br /&gt;
 GNU Parted 3.2&lt;br /&gt;
 Using /dev/sda&lt;br /&gt;
 Welcome to GNU Parted! Type &#039;help&#039; to view a list of commands.&lt;br /&gt;
 (parted) print                                                            &lt;br /&gt;
 Model: ATA WDC WD2003FYYS-0 (scsi)&lt;br /&gt;
 Disk /dev/sda: 2000GB&lt;br /&gt;
 Sector size (logical/physical): 512B/512B&lt;br /&gt;
 Partition Table: msdos&lt;br /&gt;
 Disk Flags: &lt;br /&gt;
 &lt;br /&gt;
 Number  Start   End     Size    Type     File system  Flags&lt;br /&gt;
  1      1049kB  8000MB  7999MB  primary               boot, raid&lt;br /&gt;
  2      8000MB  8511MB  512MB   primary               raid&lt;br /&gt;
  3      8511MB  2000GB  1992GB  primary               raid&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 parted /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 mklabel msdos&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 1049kB 8000MB&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 8000MB 8511MB&lt;br /&gt;
 &lt;br /&gt;
 mkpart primary 8511MB 2000GB&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --add /dev/sdb1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sdb2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --add /dev/sdb3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 grub-install /dev/sdb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manual Disk swap===&lt;br /&gt;
&lt;br /&gt;
 ABPROX:~# smartctl -a /dev/sda&lt;br /&gt;
 Serial Number:    WD-WCAW34414439&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# smartctl -a /dev/sdb&lt;br /&gt;
 Serial Number:    WD-WCAW34329788&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# cat /proc/mdstat&lt;br /&gt;
 Personalities : [raid1] &lt;br /&gt;
 md2 : active raid1 sda3[0] sdb3[1]&lt;br /&gt;
       960505856 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
       bitmap: 2/8 pages [8KB], 65536KB chunk&lt;br /&gt;
 &lt;br /&gt;
 md1 : active raid1 sda2[0] sdb2[1]&lt;br /&gt;
       499392 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
       &lt;br /&gt;
 md0 : active raid1 sda1[0] sdb1[1]&lt;br /&gt;
       15616000 blocks super 1.2 [2/2] [UU]&lt;br /&gt;
      &lt;br /&gt;
 unused devices: &amp;lt;none&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# lsblk&lt;br /&gt;
 NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT&lt;br /&gt;
 sda       8:0    0 931.5G  0 disk  &lt;br /&gt;
 ├─sda1    8:1    0  14.9G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0  14.9G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sda2    8:2    0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sda3    8:3    0 916.1G  0 part  &lt;br /&gt;
   └─md2   9:2    0   916G  0 raid1 /&lt;br /&gt;
 sdb       8:16   0 931.5G  0 disk  &lt;br /&gt;
 ├─sdb1    8:17   0  14.9G  0 part  &lt;br /&gt;
 │ └─md0   9:0    0  14.9G  0 raid1 [SWAP]&lt;br /&gt;
 ├─sdb2    8:18   0   488M  0 part  &lt;br /&gt;
 │ └─md1   9:1    0 487.7M  0 raid1 /boot&lt;br /&gt;
 └─sdb3    8:19   0 916.1G  0 part  &lt;br /&gt;
   └─md2   9:2    0   916G  0 raid1 /&lt;br /&gt;
 sdc       8:32   0   1.8T  0 disk  &lt;br /&gt;
 └─sdc1    8:33   0   1.8T  0 part  /mnt/backups&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --fail /dev/sda1&lt;br /&gt;
 mdadm --manage /dev/md0 --remove /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --fail /dev/sda2&lt;br /&gt;
 mdadm --manage /dev/md1 --remove /dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --fail /dev/sda3&lt;br /&gt;
 mdadm --manage /dev/md2 --remove /dev/sda3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 sfdisk -d /dev/sdb &amp;gt; sfdisk_sdb.output&lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# cat sfdisk_sdb.output&lt;br /&gt;
 # partition table of /dev/sdb&lt;br /&gt;
 unit: sectors&lt;br /&gt;
 &lt;br /&gt;
 /dev/sdb1 : start=     2048, size= 31248384, Id=fd, bootable&lt;br /&gt;
 /dev/sdb2 : start= 31250432, size=   999424, Id=fd&lt;br /&gt;
 /dev/sdb3 : start= 32249856, size=1921273856, Id=fd&lt;br /&gt;
 /dev/sdb4 : start=        0, size=        0, Id= 0&lt;br /&gt;
 &lt;br /&gt;
 sfdisk /dev/sda &amp;lt; sfdisk_sdb.output&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md0 --add /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md1 --add /dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 mdadm --manage /dev/md2 --add /dev/sda3&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# sfdisk -l /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track&lt;br /&gt;
 Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0&lt;br /&gt;
 &lt;br /&gt;
    Device Boot Start     End   #cyls    #blocks   Id  System&lt;br /&gt;
 /dev/sda1   *      0+   1945-   1946-  15624192   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda2       1945+   2007-     63-    499712   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda3       2007+ 121601- 119594- 960636928   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sda4          0       -       0          0    0  Empty&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ABPROX:~# sfdisk -l /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track&lt;br /&gt;
 Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0&lt;br /&gt;
 &lt;br /&gt;
    Device Boot Start     End   #cyls    #blocks   Id  System&lt;br /&gt;
 /dev/sdb1   *      0+   1945-   1946-  15624192   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb2       1945+   2007-     63-    499712   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb3       2007+ 121601- 119594- 960636928   fd  Linux raid autodetect&lt;br /&gt;
 /dev/sdb4          0       -       0          0    0  Empty&lt;br /&gt;
 &lt;br /&gt;
 ---------------------------------&lt;br /&gt;
 HowTo; write the GRUB boot sector&lt;br /&gt;
 dd if=/dev/sdb2 of=/dev/sda2&lt;br /&gt;
 &lt;br /&gt;
 grub-install /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sdb&lt;br /&gt;
 &lt;br /&gt;
=== FreePBX RAID recovered ===&lt;br /&gt;
&lt;br /&gt;
 https://help-grub.gnu.narkive.com/tNbK14Jv/grub2-install-couldn-t-find-physical-volume-null&lt;br /&gt;
 grub2-install: warning: Couldn&#039;t find physical volume `(null)&#039;. Some modules may be missing from core image.&lt;br /&gt;
 I think I know what happens. Did you reboot after MD was resynced? If not, please try&lt;br /&gt;
 &lt;br /&gt;
 blockdev --flushbufs /dev/sda1&lt;br /&gt;
 &lt;br /&gt;
 blockdev --flushbufs /dev/sdb1&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sda&lt;br /&gt;
 &lt;br /&gt;
 grub2-install /dev/sdb&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Apcupsd&amp;diff=72</id>
		<title>Apcupsd</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Apcupsd&amp;diff=72"/>
		<updated>2025-12-21T06:39:07Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot; Configuration Directives Used to Set the UPS EEPROM  These directives have no effect on the operation of apcupsd but are reserved for use by apctest when bulk programming the values of the UPS EEPROM configuration variables in a Smart-UPS model.  UPSNAME &amp;lt;string&amp;gt;      Name of UPS. Maximum of 8 characters.  BATTDATE [ mm/dd/yy | dd/mm/yy ]      Last battery replacement date. Maximum of 8 characters.  SENSITIVITY [ H | M | L ]      H : High (most sensitive setting) M : Me...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Configuration Directives Used to Set the UPS EEPROM&lt;br /&gt;
&lt;br /&gt;
These directives have no effect on the operation of apcupsd but are reserved for use by apctest when bulk programming the values of the UPS EEPROM configuration variables in a Smart-UPS model.&lt;br /&gt;
&lt;br /&gt;
UPSNAME &amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Name of UPS. Maximum of 8 characters.&lt;br /&gt;
&lt;br /&gt;
BATTDATE [ mm/dd/yy | dd/mm/yy ]&lt;br /&gt;
&lt;br /&gt;
    Last battery replacement date. Maximum of 8 characters.&lt;br /&gt;
&lt;br /&gt;
SENSITIVITY [ H | M | L ]&lt;br /&gt;
&lt;br /&gt;
    H : High (most sensitive setting) M : Medium L : Low (least sensitive setting)&lt;br /&gt;
&lt;br /&gt;
WAKEUP [ 000 | 060 | 180 | 300 ]&lt;br /&gt;
&lt;br /&gt;
    The time delay in seconds that the UPS waits after the return of utility power before &amp;quot;waking up&amp;quot; and restoring power to the connected equipment.&lt;br /&gt;
&lt;br /&gt;
SLEEP [ 020 | 180 | 300 | 600 ]&lt;br /&gt;
&lt;br /&gt;
    The time delay in seconds for which the UPS waits or &amp;quot;sleeps&amp;quot; after it receives a request to power off the connected system.&lt;br /&gt;
&lt;br /&gt;
LOTRANSFER &amp;lt;voltage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Low line voltage causing transfer to battery power or activation of SmartBoost. Allowable values depend on the last letter of the firmware or APCMODEL. Typical values are:&lt;br /&gt;
&lt;br /&gt;
    D  106  103  100  097&lt;br /&gt;
    M  177  172  168  182&lt;br /&gt;
    A  092  090  088  086&lt;br /&gt;
    I  208  204  200  196&lt;br /&gt;
&lt;br /&gt;
    where D = domestic (USA), M = Canada, A = Asia and I = International.&lt;br /&gt;
&lt;br /&gt;
HITRANSFER &amp;lt;voltage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    High line voltage causing transfer to battery power or activation of SmartTrim. Allowable values depend on the last letter of the firmware or APCMODEL. Typical values are:&lt;br /&gt;
&lt;br /&gt;
    D  127  130  133  136&lt;br /&gt;
    M  229  234  239  224&lt;br /&gt;
    A  108  110  112  114&lt;br /&gt;
    I  253  257  261  265&lt;br /&gt;
&lt;br /&gt;
    where D = domestic (USA), M = Canada, A = Asia and I = International.&lt;br /&gt;
&lt;br /&gt;
RETURNCHARGE [ 00 | 15 | 50 | 90 ]&lt;br /&gt;
&lt;br /&gt;
    Percentage of battery charge needed for the UPS to restore power to the connected equipment.&lt;br /&gt;
&lt;br /&gt;
BEEPSTATE [ 0 | T | L | N ]&lt;br /&gt;
&lt;br /&gt;
    Alarm delay.&lt;br /&gt;
&lt;br /&gt;
    0 : Zero delay after power fails.&lt;br /&gt;
    T : When power fails plus 30 seconds.&lt;br /&gt;
    L : When low battery occurs.&lt;br /&gt;
    N : Never.&lt;br /&gt;
&lt;br /&gt;
LOWBATT &amp;lt;minutes&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Low battery warning occurs when the specified number of minutes remains before the UPS estimates battery power will be exhausted. There are four user-changeable settings: 2, 5, 7, or 10 minutes&lt;br /&gt;
&lt;br /&gt;
OUTPUTVOLTS &amp;lt;voltage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    UPS nominal output voltage when running on battery. Allowable values depend on the last letter of the firmware or APCMODEL. Typical values are:&lt;br /&gt;
&lt;br /&gt;
    D  115&lt;br /&gt;
    M  208&lt;br /&gt;
    A  100&lt;br /&gt;
    I  230  240  220  225&lt;br /&gt;
&lt;br /&gt;
    where D = domestic (USA), M = Canada, A = Asia and I = International.&lt;br /&gt;
&lt;br /&gt;
SELFTEST [ 336 | 168 | ON | OFF ]&lt;br /&gt;
&lt;br /&gt;
    Self test interval in hours (336 = 2 weeks, 168 = 1 week, ON = at power on, OFF = never).&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Rocky_Linux&amp;diff=71</id>
		<title>Rocky Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Rocky_Linux&amp;diff=71"/>
		<updated>2025-12-16T11:32:11Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=200px heights=100px&amp;gt;&lt;br /&gt;
File:Rocky.png|https://rockylinux.org/&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==&amp;lt;SMALL &amp;gt;&#039;&#039;&#039;Enterprise Linux, the community way&#039;&#039;&#039;&amp;lt;/SMALL &amp;gt;==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Rocky Linux is an open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Rocky Linux is free and open source&#039;&#039;&#039; – there are no limitations and you can inspect, integrate, extend and modify however you want.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Virtualisation&amp;diff=70</id>
		<title>Virtualisation</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Virtualisation&amp;diff=70"/>
		<updated>2025-12-16T11:30:48Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=150px heights=75px&amp;gt;&lt;br /&gt;
File:KVM.png|https://www.linux-kvm.org&lt;br /&gt;
File:QEMU.png|https://www.qemu.org&lt;br /&gt;
File:Libvirt.png|https://libvirt.org/&lt;br /&gt;
File:VirtManager.png|https://virt-manager.org/&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==&amp;lt;SMALL &amp;gt;&#039;&#039;&#039;Virtualization is the process of creating several virtual machines (VMs) from one physical machine using software called a hypervisor.&#039;&#039;&#039;&amp;lt;/SMALL &amp;gt;==&lt;br /&gt;
 &lt;br /&gt;
:&#039;&#039;&#039;The virtual machines act and perform just like physical machines, sharing the physical machine’s computing resources.&#039;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;With virtualization you can run multiple servers, desktops, operating systems and networks within the same physical machine.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;KVM&#039;&#039;&#039; (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions.&lt;br /&gt;
:Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images.&lt;br /&gt;
:Each virtual machine has private virtualized hardware: Network, disk, graphics, etc.&lt;br /&gt;
:The kernel component of KVM is included in mainline Linux, as of 2.6.20., the userspace component of KVM is included in mainline QEMU, as of 1.3.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;QEMU&#039;&#039;&#039; is a free and open-source hosted hypervisor that performs hardware virtualization.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;LIBVIRT&#039;&#039;&#039; is an open-source API, daemon and management tool for managing platform virtualization.&lt;br /&gt;
:It can be used to manage KVM, Xen, VMware ESX, QEMU and other virtualization technologies.&lt;br /&gt;
:These APIs are widely used in the orchestration layer of hypervisors in the development of a cloud-based solution.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;VIRT-MANAGER&#039;&#039;&#039; application is a desktop user interface for managing virtual machines through libvirt.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;KVM + LIBVIRT + QEMU + VIRT-MANAGER are free and open source&#039;&#039;&#039; – there are no limitations and you can inspect, integrate, extend and modify however you want.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=VPN&amp;diff=69</id>
		<title>VPN</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=VPN&amp;diff=69"/>
		<updated>2025-12-16T11:30:07Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=150px heights=75px&amp;gt;&lt;br /&gt;
File:Wireguard.png|https://www.wireguard.com/&lt;br /&gt;
File:Openvpn.png|https://openvpn.net/community/&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==&amp;lt;SMALL &amp;gt;&#039;&#039;&#039;Virtual Private Network&#039;&#039;&#039;&amp;lt;/SMALL &amp;gt;==&lt;br /&gt;
 &lt;br /&gt;
:&#039;&#039;&#039;A virtual private network is a mechanism for creating a secure connection between a computing device and a computer network, or between two networks, using an insecure communication medium such as the public Internet.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;WireGuard®&#039;&#039;&#039; is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;OpenVPN&#039;&#039;&#039; protocol has emerged to establish itself as a de- facto standard in the open source networking space with over 50 million downloads. OpenVPN is entirely a community-supported OSS project which uses the GPL license.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;Wireguard + OpenVPN&#039;&#039;&#039; are free and open source – there are no limitations and you can inspect, integrate, extend and modify however you want.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=68</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=68"/>
		<updated>2025-12-15T10:12:48Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Useful_Commands|Useful&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Websites&amp;diff=67</id>
		<title>Websites</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Websites&amp;diff=67"/>
		<updated>2025-12-15T10:12:15Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;=== SME === : http://mirror.canada.pialasse.com/releases/ : http://www.mirrorservice.org/sites/mirror.contribs.org/smeserver/releases/ : https://wiki.koozali.org/Category:Contrib  === KVM === : https://wiki.debian.org/KVM : https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/index : https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administratio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== SME ===&lt;br /&gt;
: http://mirror.canada.pialasse.com/releases/&lt;br /&gt;
: http://www.mirrorservice.org/sites/mirror.contribs.org/smeserver/releases/&lt;br /&gt;
: https://wiki.koozali.org/Category:Contrib&lt;br /&gt;
&lt;br /&gt;
=== KVM ===&lt;br /&gt;
: https://wiki.debian.org/KVM&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_cli&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lv#lvm_cache_volume_creation&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/index&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/index&lt;br /&gt;
: https://www.libvirt.org/kbase/live_full_disk_backup.html&lt;br /&gt;
: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso&lt;br /&gt;
&lt;br /&gt;
=== Nextcloud ===&lt;br /&gt;
: https://docs.nextcloud.com/server/latest/admin_manual/index.html&lt;br /&gt;
: https://docs.nextcloud.com/server/13/admin_manual/configuration_server/occ_command.html#&lt;br /&gt;
: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html&lt;br /&gt;
&lt;br /&gt;
=== Microsoft ===&lt;br /&gt;
: https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-are-private-public-hybrid-clouds&lt;br /&gt;
&lt;br /&gt;
=== Super GRUB2 Disk ===&lt;br /&gt;
:https://www.supergrubdisk.org/donate/ &lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
: https://www.server-world.info/en/&lt;br /&gt;
: http://www.apcupsd.com/manual/manual.html&lt;br /&gt;
: http://www.apcupsd.com/manual/manual.html#configuration-directives-used-to-set-the-ups-eeprom&lt;br /&gt;
: https://docs.mojolicious.org/Mojolicious/Guides&lt;br /&gt;
: https://en.wikipedia.org/wiki/Private_network&lt;br /&gt;
: https://en.wikipedia.org/wiki/Iptables&lt;br /&gt;
: https://en.wikipedia.org/wiki/Netfilter&lt;br /&gt;
&lt;br /&gt;
=== RedHat===&lt;br /&gt;
: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/security_guide/index&lt;br /&gt;
: https://www.redhat.com/sysadmin/iptables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=66</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=66"/>
		<updated>2025-12-15T10:10:59Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Useful_Commands|Useful&lt;br /&gt;
** https://2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=65</id>
		<title>Useful Commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=Useful_Commands&amp;diff=65"/>
		<updated>2025-12-15T10:10:13Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot; === SME ===  Check added RPM&amp;#039;s  /sbin/e-smith/audittools/newrpms  /sbin/e-smith/audittools/newrpms | grep smeserver  Check RPM&amp;#039;s  rpm -qa smeserver* | sort -d  rpm -qa e-smith* | sort -d  Check templates  /sbin/e-smith/audittools/templates  RPM initial install date  rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;  Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software  /sbin/e-smith/audittools/repositories  List Repositories  db yum_repositories show  c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== SME ===&lt;br /&gt;
&lt;br /&gt;
Check added RPM&#039;s&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms&lt;br /&gt;
 /sbin/e-smith/audittools/newrpms | grep smeserver&lt;br /&gt;
&lt;br /&gt;
Check RPM&#039;s&lt;br /&gt;
 rpm -qa smeserver* | sort -d&lt;br /&gt;
 rpm -qa e-smith* | sort -d&lt;br /&gt;
&lt;br /&gt;
Check templates&lt;br /&gt;
 /sbin/e-smith/audittools/templates&lt;br /&gt;
&lt;br /&gt;
RPM initial install date&lt;br /&gt;
 rpm -qa --last | grep -v &amp;quot;initial install date&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check Repositories  http://wiki.contribs.org/SME_Server:Adding_Software&lt;br /&gt;
 /sbin/e-smith/audittools/repositories&lt;br /&gt;
&lt;br /&gt;
List Repositories&lt;br /&gt;
 db yum_repositories show&lt;br /&gt;
 cat /home/e-smith/db/yum_repositories&lt;br /&gt;
&lt;br /&gt;
Restore Default Yum Repositories&lt;br /&gt;
 cd /home/e-smith/db/&lt;br /&gt;
 mv yum_repositories yum_repositories.po&lt;br /&gt;
 &lt;br /&gt;
 /etc/e-smith/events/actions/initialize-default-databases&lt;br /&gt;
 &lt;br /&gt;
 signal-event yum-modify&lt;br /&gt;
 &lt;br /&gt;
 yum update&lt;br /&gt;
&lt;br /&gt;
Yum; There are unfinished transactions remaining&lt;br /&gt;
 yum install yum-utils&lt;br /&gt;
 yum-complete-transaction --cleanup-only&lt;br /&gt;
&lt;br /&gt;
Check RPM Package owning FILE&lt;br /&gt;
 rpm -qf /usr/bin/nmap&lt;br /&gt;
&lt;br /&gt;
RPM erase single package&lt;br /&gt;
 rpm -e --nodeps xxx&lt;br /&gt;
&lt;br /&gt;
Check Domain&lt;br /&gt;
 host -t mx &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t a &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t soa &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t ns &amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt _dmarc.&amp;lt;domain&amp;gt;&lt;br /&gt;
 host -t txt default._domainkey.&amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Network packet capture and test&lt;br /&gt;
 tcpdump&lt;br /&gt;
 tcpdump -i eth1 port 42526 -v&lt;br /&gt;
 tcpdump -i br0 port 42526 -v&lt;br /&gt;
 nmap -p 42526 -sU -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
 nmap -p 42526 -sT -P0 &amp;lt;domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Squid Log Date&lt;br /&gt;
 perl -pe &#039;s/[\d\.]+/localtime($&amp;amp;)/e&#039; /var/log/squid/access.log&lt;br /&gt;
&lt;br /&gt;
Check Apache modules loaded;&lt;br /&gt;
 apachectl -t -D DUMP_MODULES&lt;br /&gt;
&lt;br /&gt;
Custom Network&lt;br /&gt;
 config setprop ExternalInterface EthtoolOpts &amp;quot;speed 10 duplex full autoneg off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Server Default Backup List&lt;br /&gt;
 perl -e &#039;use esmith::Backup;$b=new esmith::Backup;print join(&amp;quot;\n&amp;quot;,$b-&amp;gt;restore_list).&amp;quot;\n&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
Server Reset Initial Restore&lt;br /&gt;
 config delete PasswordSet&lt;br /&gt;
 config setprop bootstrap-console Run Yes&lt;br /&gt;
 signal-event reboot&lt;br /&gt;
&lt;br /&gt;
Redirect website&lt;br /&gt;
 create redirect ibay &lt;br /&gt;
 db accounts setprop redirect AllowOverride all&lt;br /&gt;
 db accounts setprop redirect FollowSymLinks enabled&lt;br /&gt;
 signal-event ibay-modify redirect&lt;br /&gt;
 &lt;br /&gt;
 cd /home/e-smith/files/ibays/redirect/html&lt;br /&gt;
 vim .htaccess&lt;br /&gt;
 Redirect 301 / http://www.domain.com/&lt;br /&gt;
&lt;br /&gt;
Disable mail to a user from an external network&lt;br /&gt;
 db accounts setprop groupname/username Visible internal&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the internal interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/plugins/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Disable the check for the Date header on the external interface:&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0&lt;br /&gt;
 echo &amp;quot;# 17check_basicheaders disabled by custom template&amp;quot; &amp;gt; 17check_basicheaders&lt;br /&gt;
 signal-event email-update&lt;br /&gt;
&lt;br /&gt;
cat /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/17check_basicheaders&lt;br /&gt;
 {&lt;br /&gt;
     $OUT = &amp;quot;check_basicheaders&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     # Note: You can&#039;t specify a maximum offset of 0 days, but that&#039;s fair&lt;br /&gt;
     my $days = $smtpd{MaximumDateOffset} || &#039;&#039;;&lt;br /&gt;
 &lt;br /&gt;
     $OUT .= &amp;quot; $days&amp;quot; if ($days);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
List contents of queued email&lt;br /&gt;
 # /var/qmail/bin/qmail-qread&lt;br /&gt;
 14 Dec 2014 03:35:51 GMT  #165184302  2886&lt;br /&gt;
 # find /var/qmail/queue -name 165184302| xargs cat | less&lt;br /&gt;
&lt;br /&gt;
Qmail retry period before return e-mail as undeliverable&lt;br /&gt;
 default is 604800 seconds = 1 week, 172800 seconds = 2 days&lt;br /&gt;
 mkdir -p /etc/e-smith/templates-custom/var/qmail/control&lt;br /&gt;
 echo 172800 &amp;gt; /etc/e-smith/templates-custom/var/qmail/control/queuelifetime&lt;br /&gt;
 expand-template /var/qmail/control/queuelifetime&lt;br /&gt;
 sv t qmail&lt;br /&gt;
&lt;br /&gt;
=== unzip ===&lt;br /&gt;
 tar -xvf xxx.tar&lt;br /&gt;
 tar -zxvf xxx.tar.gz&lt;br /&gt;
 tar -xf xxx.tar.xz&lt;br /&gt;
 unzip xxx.zip&lt;br /&gt;
 bunzip2 xxx.bz2&lt;br /&gt;
 bzip2 -d xxx.bz2&lt;br /&gt;
&lt;br /&gt;
=== tar create ===&lt;br /&gt;
 tar -zcvf archive-name.tar.gz (/directory-name/)file(s)&lt;br /&gt;
&lt;br /&gt;
=== scp ===&lt;br /&gt;
 scp -rp -P 44 root@192.168.1.1:/.../filename .&lt;br /&gt;
&lt;br /&gt;
=== rsync ===&lt;br /&gt;
 rsync -aH /affa/smesvr /media/affa/affa/&lt;br /&gt;
 rsync -aHvzhe ssh --progress root@10.10.15.1:/var/affa/archive /var/affa/&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress root@123.45.67.89:/mnt/backups/dump/vzdump-qemu-101-2021_09_25-00_00_09.vma.zst /mnt/4TB1/abc&lt;br /&gt;
 rsync -avzhe &amp;quot;ssh -p 22222&amp;quot; --progress --partial root@123.45.67.89:/mnt/mirror1/dump/fri/SAGESVR.qcow2 /media/owner/WEEKLY/abc&lt;br /&gt;
&lt;br /&gt;
=== .bashrc ===&lt;br /&gt;
 PS1=&amp;quot;\[\e[30m\]\h:\w#\[\e[m\] &amp;quot;         BLACK&lt;br /&gt;
 PS1=&amp;quot;\[\e[31m\]\h:\w#\[\e[m\] &amp;quot;         RED&lt;br /&gt;
 PS1=&amp;quot;\[\e[32m\]\h:\w#\[\e[m\] &amp;quot;         GREEN &lt;br /&gt;
 PS1=&amp;quot;\[\e[34m\]\h:\w#\[\e[m\] &amp;quot;         BLUE&lt;br /&gt;
 PS1=&amp;quot;\[\e[36m\]\h:\w#\[\e[m\] &amp;quot;         CYAN&lt;br /&gt;
 &lt;br /&gt;
 export HISTTIMEFORMAT=&amp;quot;%d%m%y %T &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Processor info&lt;br /&gt;
 cat /proc/cpuinfo&lt;br /&gt;
&lt;br /&gt;
Software RAID status&lt;br /&gt;
 cat /proc/mdstat&lt;br /&gt;
&lt;br /&gt;
Linux check maximum MTU&lt;br /&gt;
 ping -M do -s 1434 google.co.uk&lt;br /&gt;
&lt;br /&gt;
Windows check maximum MTU &lt;br /&gt;
 ping google.co.uk -f -l 1434&lt;br /&gt;
&lt;br /&gt;
=== Symbolic link ===&lt;br /&gt;
 ln -s /path-to-folder(file) foldername(filename)&lt;br /&gt;
&lt;br /&gt;
=== Public key ===&lt;br /&gt;
 on the HOST server:&lt;br /&gt;
 affa --send-key targetsvr&lt;br /&gt;
 ssh-keygen -t ed25519&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 &lt;br /&gt;
 cat /root/.ssh/id_rsa.pub&lt;br /&gt;
 &lt;br /&gt;
 on the TARGET server: add &lt;br /&gt;
 mkdir -p /root/.ssh&lt;br /&gt;
 cd /root/.ssh&lt;br /&gt;
 vim authorized_keys&lt;br /&gt;
 &lt;br /&gt;
 config setprop sshd PasswordAuthentication no&lt;br /&gt;
 signal-event remoteaccess-update&lt;br /&gt;
 config show sshd&lt;br /&gt;
&lt;br /&gt;
=== MySQL ===&lt;br /&gt;
 mysql&lt;br /&gt;
 use icinga&lt;br /&gt;
 REPAIR TABLE icinga_hoststatus;&lt;br /&gt;
 REPAIR TABLE icinga_logentries;&lt;br /&gt;
 \q&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/icinga stop&lt;br /&gt;
 mysqlcheck --databases icinga&lt;br /&gt;
&lt;br /&gt;
Restore mysql db&lt;br /&gt;
 mysql -u root -p wcuk &amp;lt; wcuk.sql&lt;br /&gt;
&lt;br /&gt;
=== APC ===&lt;br /&gt;
Update BATTDATE to the current date.&lt;br /&gt;
 Kill the apcupsd daemon first, Run apctest to update the UPS eeprom.&lt;br /&gt;
&lt;br /&gt;
Debian;&lt;br /&gt;
 apt install apcupsd&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 vim /etc/default/apcupsd&lt;br /&gt;
 systemctl restart apcupsd.service&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d/&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
&lt;br /&gt;
 http://www.apcupsd.com/manual/manual.html#red-hat-systems&lt;br /&gt;
&lt;br /&gt;
Compile&lt;br /&gt;
 SME;&lt;br /&gt;
 yum install gcc gcc-c++&lt;br /&gt;
 yum remove gcc gcc-c++&lt;br /&gt;
 &lt;br /&gt;
 http://sourceforge.net/projects/apcupsd/files/latest/download?source=files&lt;br /&gt;
 &lt;br /&gt;
 gunzip apcupsd-3.14.13.tar.gz&lt;br /&gt;
 tar -xvf apcupsd-3.14.13.tar &lt;br /&gt;
 cd apcupsd-3.14.13&lt;br /&gt;
 ./configure --help&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 &lt;br /&gt;
 DEBIAN;&lt;br /&gt;
 apt-get install g++&lt;br /&gt;
 apt-get install make&lt;br /&gt;
 ./configure --enable-usb&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 vim /etc/apcupsd/apcupsd.conf&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 ./apcupsd start&lt;br /&gt;
 ./apcupsd status&lt;br /&gt;
 &lt;br /&gt;
 aptitude remove make&lt;br /&gt;
 aptitude remove g++&lt;br /&gt;
 &lt;br /&gt;
 additional package removed gcc&lt;br /&gt;
&lt;br /&gt;
IPv6&lt;br /&gt;
 ipv4=&amp;quot;192.168.0.1&amp;quot;; sla=&amp;quot;5&amp;quot;; printf &amp;quot;2002:%02x%02x:%02x%02x:%04x::1&amp;quot; `echo $ipv4 | tr &amp;quot;.&amp;quot; &amp;quot; &amp;quot;` $sla&lt;br /&gt;
&lt;br /&gt;
=== Vigor ===&lt;br /&gt;
vigor sip_alg&lt;br /&gt;
 sys sip_alg ?&lt;br /&gt;
 sys sip_alg 0&lt;br /&gt;
 sys commit&lt;br /&gt;
&lt;br /&gt;
ipsec passthrough&lt;br /&gt;
 srv nat ipsecpass on&lt;br /&gt;
&lt;br /&gt;
VDSL&lt;br /&gt;
 WAN / General Setup / VLAN Tag Insertion = Enable / Tag Value = 101&lt;br /&gt;
&lt;br /&gt;
vTiger&lt;br /&gt;
vTiger delete demo data SQL command&lt;br /&gt;
 update vtiger_crmentity set deleted = 1&lt;br /&gt;
&lt;br /&gt;
vTiger &amp;gt;5.04 reset admin password to &#039;admin&#039;&lt;br /&gt;
&lt;br /&gt;
 mysql&lt;br /&gt;
 use &amp;lt;vtiger_database_name&amp;gt;;&lt;br /&gt;
 update vtiger_users set user_password = &#039;adpexzg3FUZAk&#039;, crypt_type = &#039;&#039; where user_name = &#039;admin&#039;;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=64</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=64"/>
		<updated>2025-12-15T10:08:22Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://2clever.uk/index.php/Useful_commands|Useful&lt;br /&gt;
** https://2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=63</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=63"/>
		<updated>2025-12-15T10:06:56Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://2clever.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://2clever.uk/index.php/Useful_commands|Useful&lt;br /&gt;
** https://2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=VPN&amp;diff=62</id>
		<title>VPN</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=VPN&amp;diff=62"/>
		<updated>2025-12-15T10:06:21Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: Created page with &amp;quot;&amp;lt;br&amp;gt; &amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=200px heights=100px&amp;gt; File:Wireguard.png|https://www.wireguard.com/ File:Openvpn.png|https://openvpn.net/community/ &amp;lt;/gallery&amp;gt; &amp;lt;br&amp;gt; ==&amp;lt;SMALL &amp;gt;&amp;#039;&amp;#039;&amp;#039;Virtual Private Network&amp;#039;&amp;#039;&amp;#039;&amp;lt;/SMALL &amp;gt;==   :&amp;#039;&amp;#039;&amp;#039;A virtual private network is a mechanism for creating a secure connection between a computing device and a computer network, or between two networks, using an insecure communication medium such as the public Internet.&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt; :&amp;#039;&amp;#039;&amp;#039;WireGuard®&amp;#039;&amp;#039;&amp;#039; i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot; widths=200px heights=100px&amp;gt;&lt;br /&gt;
File:Wireguard.png|https://www.wireguard.com/&lt;br /&gt;
File:Openvpn.png|https://openvpn.net/community/&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==&amp;lt;SMALL &amp;gt;&#039;&#039;&#039;Virtual Private Network&#039;&#039;&#039;&amp;lt;/SMALL &amp;gt;==&lt;br /&gt;
 &lt;br /&gt;
:&#039;&#039;&#039;A virtual private network is a mechanism for creating a secure connection between a computing device and a computer network, or between two networks, using an insecure communication medium such as the public Internet.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;WireGuard®&#039;&#039;&#039; is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;OpenVPN&#039;&#039;&#039; protocol has emerged to establish itself as a de- facto standard in the open source networking space with over 50 million downloads. OpenVPN is entirely a community-supported OSS project which uses the GPL license.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:&#039;&#039;&#039;Wireguard + OpenVPN&#039;&#039;&#039; are free and open source – there are no limitations and you can inspect, integrate, extend and modify however you want.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=File:Openvpn.png&amp;diff=61</id>
		<title>File:Openvpn.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=File:Openvpn.png&amp;diff=61"/>
		<updated>2025-12-15T10:05:14Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=File:Wireguard.png&amp;diff=60</id>
		<title>File:Wireguard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=File:Wireguard.png&amp;diff=60"/>
		<updated>2025-12-15T10:04:59Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=59</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.2clever.uk/index.php?title=MediaWiki:Sidebar&amp;diff=59"/>
		<updated>2025-12-15T10:02:39Z</updated>

		<summary type="html">&lt;p&gt;Rdswikiadmin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Realm Data Systems&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Company|Company&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Open_Source|Open Source&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Remote_Support|Remote Support&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Debian|Debian Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Rocky_Linux|Rocky Linux&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Virtualisation|Virtualisation&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Icinga_Monitoring|Icinga Monitoring&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/SME_Server|SME Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Email_Server|Email Server&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Nextcloud|Nextcloud&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/Collabora_Online|Collabora Online&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/IncrediblePBX|IncrediblePBX&lt;br /&gt;
** https://wiki.realmdatasystems.uk/index.php/WebERP|WebERP&lt;br /&gt;
** https://2clever.uk/index.php/VPN|Virtual Private Networking&lt;br /&gt;
** https://2clever.uk/index.php/Special:AllPages/|All Pages&lt;br /&gt;
** https://2clever.uk/index.php/Useful_commands|Useful&lt;br /&gt;
** https://2clever.uk/index.php/Websites|Websites&lt;/div&gt;</summary>
		<author><name>Rdswikiadmin</name></author>
	</entry>
</feed>