From 7d6317d6cd547add6d83ff532c8ec6438620d14f Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 3 Feb 2016 14:42:52 +0100 Subject: [PATCH 1/5] Add license --- LICENSE | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..139b12fc1f --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2007-2016, Till Brehm, ISPConfig UG +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file -- GitLab From e36880dfcb05b9fd3eebf9762d7ec7973a820842 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 3 Feb 2016 14:49:12 +0100 Subject: [PATCH 2/5] Added Readme file. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..4676d2bd58 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# ISPConfig - Hosting Control Panel + +- Manage multiple servers from one control panel +- Web server management (Apache2 and nginx) +- Mail server management (with virtual mail users) +- DNS server management (BIND and MyDNS) +- Virtualization (OpenVZ) +- Administrator, reseller and client login +- Configuration mirroring and clusters +- Open Source software (BSD license) \ No newline at end of file -- GitLab From be2cd7358fc41a4260b6f707ac1d0efec1a85b18 Mon Sep 17 00:00:00 2001 From: Daniel Steglich Date: Fri, 5 Feb 2016 22:42:55 +0100 Subject: [PATCH 3/5] Allow HTML based welcome messages In addition to /conf-custom/mail/welcome_email_DOMAINNAME.txt and /conf-custom/mail/welcome_email_LANGUAGE.txt one may place a /conf-custom/mail/welcome_email_DOMAINNAME.html or /conf-custom/mail/welcome_email_LANGUAGE.html file to allow HTML based welcome messages. --- server/plugins-available/mail_plugin.inc.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 20388a4c0f..62b9e41f28 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -207,7 +207,14 @@ class mail_plugin { //* Send the welcome email message $domain = explode('@', $data["new"]["email"])[1]; - if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { + $html = False; + if (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) { + $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html'); + $html = True; + } elseif (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) { + $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html'); + $html = True; + } elseif (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt'); } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt'); @@ -236,8 +243,13 @@ class mail_plugin { unset($tmp); $mailHeaders = "MIME-Version: 1.0" . "\n"; - $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n"; - $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n"; + if ($html){ + $mailHeaders .= "Content-Type: text/html; charset=utf-8" . "\n"; + $mailHeaders .= "Content-Transfer-Encoding: quoted-printable" . "\n"; + } else { + $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n"; + $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n"; + } $mailHeaders .= "From: $welcome_mail_from" . "\n"; $mailHeaders .= "Reply-To: $welcome_mail_from" . "\n"; $mailTarget = $data["new"]["email"]; -- GitLab From 7b4df68ebbfa7edd70bc5c560c4d8aa0780e8a5b Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Sat, 6 Feb 2016 09:42:22 +0100 Subject: [PATCH 4/5] ISPConfig coding guidelines --- server/plugins-available/mail_plugin.inc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 62b9e41f28..d0bb377089 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -207,14 +207,14 @@ class mail_plugin { //* Send the welcome email message $domain = explode('@', $data["new"]["email"])[1]; - $html = False; - if (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) { + $html = false; + if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html'); - $html = True; - } elseif (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) { + $html = true; + } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.html'); - $html = True; - } elseif (file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { + $html = true; + } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt'); } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) { $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt'); @@ -243,7 +243,7 @@ class mail_plugin { unset($tmp); $mailHeaders = "MIME-Version: 1.0" . "\n"; - if ($html){ + if($html) { $mailHeaders .= "Content-Type: text/html; charset=utf-8" . "\n"; $mailHeaders .= "Content-Transfer-Encoding: quoted-printable" . "\n"; } else { -- GitLab From f571ae02d848f2b242ed555b3293f06956733577 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Sat, 6 Feb 2016 09:43:02 +0100 Subject: [PATCH 5/5] Typo --- server/plugins-available/mail_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index d0bb377089..8696205a00 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -247,7 +247,7 @@ class mail_plugin { $mailHeaders .= "Content-Type: text/html; charset=utf-8" . "\n"; $mailHeaders .= "Content-Transfer-Encoding: quoted-printable" . "\n"; } else { - $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n"; + $mailHeaders .= "Content-Type: text/plain; charset=utf-8" . "\n"; $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n"; } $mailHeaders .= "From: $welcome_mail_from" . "\n"; -- GitLab