fe8d7c2025e33349ab1e51c0e906ec3ee69dcff2
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php   1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/vmail.php   2) /*
modules/email/include/vmail.php   3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/include/vmail.php   4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/include/vmail.php   5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/vmail.php   6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/include/vmail.php   7)   Hanno Böck <hanno@schokokeks.org>
modules/email/include/vmail.php   8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

modules/email/include/vmail.php   9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/vmail.php  10) 
modules/email/include/vmail.php  11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
modules/email/include/vmail.php  12) */
modules/email/include/vmail.php  13) 
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php  14) require_once('inc/base.php');
modules/vmail/include/vmail.php  15) require_once('inc/debug.php');
modules/vmail/include/vmail.php  16) 
bernd Bugfix: Funktion-Dopplung v...

bernd authored 17 years ago

modules/vmail/include/vmail.php  17) require_once('hasdomain.php');
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php  18) 
Bernd Wurst Vorbereitung für Warnungen...

Bernd Wurst authored 10 years ago

modules/email/include/vmail.php  19) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  20) function forward_type($target)
modules/email/include/vmail.php  21) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  22)     [$l, $d] = explode('@', strtolower($target), 2);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php  23)     DEBUG('Weiterleitung an ' . $l . ' @ ' . $d);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  24)     $result = db_query("SELECT id FROM kundendaten.domains WHERE CONCAT_WS('.', domainname, tld) = ?", [$d]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  25)     if ($result->rowCount() > 0) {
modules/email/include/vmail.php  26)         // Lokale Domain
modules/email/include/vmail.php  27)         return 'local';
modules/email/include/vmail.php  28)     }
modules/email/include/vmail.php  29)     // Auswärtige Domain aber keine aus der Liste
modules/email/include/vmail.php  30)     return 'external';
Bernd Wurst Vorbereitung für Warnungen...

Bernd Wurst authored 10 years ago

modules/email/include/vmail.php  31) }
modules/email/include/vmail.php  32) 
modules/email/include/vmail.php  33) 
modules/email/include/vmail.php  34) 
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php  35) function empty_account()
modules/vmail/include/vmail.php  36) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  37)     $account = [
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  38)         'id' => null,
modules/email/include/vmail.php  39)         'local' => '',
modules/email/include/vmail.php  40)         'domain' => null,
modules/email/include/vmail.php  41)         'password' => null,
Bernd Wurst wip

Bernd Wurst authored 3 years ago

modules/email/include/vmail.php  42)         'enableextensions' => false,
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php  43)         'smtpreply' => null,
modules/email/include/vmail.php  44)         'quota' => config('vmail_basequota'),
modules/email/include/vmail.php  45)         'quota_threshold' => 20,
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  46)         'forwards' => [],
modules/email/include/vmail.php  47)         'autoresponder' => null,
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php  48)     ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  49)     return $account;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php  50) }
modules/vmail/include/vmail.php  51) 
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/include/vmail.php  52) function empty_autoresponder_config()
modules/email/include/vmail.php  53) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  54)     $ar = [
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php  55)         'valid_from' => date('Y-m-d'),
modules/email/include/vmail.php  56)         'valid_until' => null,
modules/email/include/vmail.php  57)         'fromname' => null,
modules/email/include/vmail.php  58)         'fromaddr' => null,
modules/email/include/vmail.php  59)         'subject' => null,
modules/email/include/vmail.php  60)         'message' => 'Danke für Ihre E-Mail.
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/include/vmail.php  61) Ich bin aktuell nicht im Büro und werde Ihre Nachricht erst nach meiner Rückkehr beantworten.
modules/email/include/vmail.php  62) Ihre E-Mail wird nicht weitergeleitet.',
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php  63)         'quote' => null,
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  64)     ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  65)     return $ar;
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/include/vmail.php  66) }
modules/email/include/vmail.php  67) 
modules/email/include/vmail.php  68) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  69) function get_vmail_id_by_emailaddr($emailaddr)
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php  70) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  71)     $result = db_query("SELECT id FROM mail.v_vmail_accounts WHERE CONCAT(local, '@', domainname) = ?", [$emailaddr]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  72)     $entry = $result->fetch();
Bernd Wurst fix runtime warning when cr...

Bernd Wurst authored 5 years ago

modules/email/include/vmail.php  73)     if ($entry === false) {
modules/email/include/vmail.php  74)         return false;
modules/email/include/vmail.php  75)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  76)     return (int) $entry['id'];
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php  77) }
modules/email/include/vmail.php  78) 
bernd VMail-accounts können sich...

bernd authored 16 years ago

modules/vmail/include/vmail.php  79) function get_account_details($id, $checkuid = true)
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php  80) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  81)     $id = (int) $id;
modules/email/include/vmail.php  82)     $uid_check = '';
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php  83)     DEBUG("checkuid: " . $checkuid);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php  84)     $args = [":id" => $id];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  85)     if ($checkuid) {
modules/email/include/vmail.php  86)         $uid = (int) $_SESSION['userinfo']['uid'];
modules/email/include/vmail.php  87)         $uid_check = "useraccount=:uid AND ";
modules/email/include/vmail.php  88)         $args[":uid"] = $uid;
modules/email/include/vmail.php  89)     }
Bernd Wurst wip

Bernd Wurst authored 3 years ago

modules/email/include/vmail.php  90)     $result = db_query("SELECT id, local, domain, password, enableextensions, smtpreply, forwards, autoresponder, server, quota, COALESCE(quota_used, 0) AS quota_used, quota_threshold from mail.v_vmail_accounts WHERE {$uid_check}id=:id LIMIT 1", $args);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php  91)     if ($result->rowCount() == 0) {
modules/email/include/vmail.php  92)         system_failure('Ungültige ID oder kein eigener Account');
modules/email/include/vmail.php  93)     }
modules/email/include/vmail.php  94)     $acc = empty_account();
modules/email/include/vmail.php  95)     $res = $result->fetch();
modules/email/include/vmail.php  96)     foreach ($res as $key => $value) {
modules/email/include/vmail.php  97)         if ($key == 'forwards') {
modules/email/include/vmail.php  98)             continue;
modules/email/include/vmail.php  99)         }
modules/email/include/vmail.php 100)         $acc[$key] = $value;
modules/email/include/vmail.php 101)     }
modules/email/include/vmail.php 102)     if ($acc['forwards'] > 0) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 103)         $result = db_query("SELECT id, destination FROM mail.vmail_forward WHERE account=?", [$acc['id']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 104)         while ($item = $result->fetch()) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 105)             array_push($acc['forwards'], ["id" => $item['id'], 'destination' => $item['destination']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 106)         }
modules/email/include/vmail.php 107)     }
modules/email/include/vmail.php 108)     if ($acc['autoresponder'] > 0) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 109)         $result = db_query("SELECT id, IF(valid_from IS NULL OR valid_from > NOW() OR valid_until < NOW(), 0, 1) AS active, DATE(valid_from) AS valid_from, DATE(valid_until) AS valid_until, fromname, fromaddr, subject, message, quote FROM mail.vmail_autoresponder WHERE account=?", [$acc['id']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 110)         $item = $result->fetch();
modules/email/include/vmail.php 111)         DEBUG($item);
modules/email/include/vmail.php 112)         $acc['autoresponder'] = $item;
modules/email/include/vmail.php 113)     } else {
modules/email/include/vmail.php 114)         $acc['autoresponder'] = null;
modules/email/include/vmail.php 115)     }
modules/email/include/vmail.php 116)     if ($acc['quota_threshold'] === null) {
modules/email/include/vmail.php 117)         $acc['quota_threshold'] = -1;
modules/email/include/vmail.php 118)     }
modules/email/include/vmail.php 119)     return $acc;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 120) }
modules/vmail/include/vmail.php 121) 
modules/vmail/include/vmail.php 122) function get_vmail_accounts()
modules/vmail/include/vmail.php 123) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 124)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 125)     $result = db_query("SELECT * from mail.v_vmail_accounts WHERE useraccount=? ORDER BY domainname,local ASC", [$uid]);
modules/email/include/vmail.php 126)     $ret = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 127)     while ($line = $result->fetch()) {
modules/email/include/vmail.php 128)         array_push($ret, $line);
modules/email/include/vmail.php 129)     }
modules/email/include/vmail.php 130)     DEBUG($ret);
modules/email/include/vmail.php 131)     return $ret;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 132) }
modules/vmail/include/vmail.php 133) 
modules/vmail/include/vmail.php 134) 
modules/vmail/include/vmail.php 135) 
modules/vmail/include/vmail.php 136) function get_vmail_domains()
modules/vmail/include/vmail.php 137) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 138)     $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 139)     $result = db_query("SELECT id, domainname, server FROM mail.v_vmail_domains WHERE useraccount=? ORDER BY domainname", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 140)     if ($result->rowCount() == 0) {
modules/email/include/vmail.php 141)         system_failure('Sie haben keine Domains für virtuelle Mail-Verarbeitung');
modules/email/include/vmail.php 142)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 143)     $ret = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 144)     while ($tmp = $result->fetch()) {
modules/email/include/vmail.php 145)         array_push($ret, $tmp);
modules/email/include/vmail.php 146)     }
modules/email/include/vmail.php 147)     return $ret;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 148) }
modules/vmail/include/vmail.php 149) 
modules/vmail/include/vmail.php 150) 
bernd VMail-accounts können sich...

bernd authored 16 years ago

modules/vmail/include/vmail.php 151) function find_account_id($accname)
modules/vmail/include/vmail.php 152) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 153)     DEBUG($accname);
modules/email/include/vmail.php 154)     $tmp = explode('@', $accname, 2);
modules/email/include/vmail.php 155)     DEBUG($tmp);
modules/email/include/vmail.php 156)     if (count($tmp) != 2) {
modules/email/include/vmail.php 157)         system_failure("Der Account hat nicht die korrekte Syntax");
modules/email/include/vmail.php 158)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 159)     [$local, $domainname] = $tmp;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 160) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 161)     $result = db_query("SELECT id FROM mail.v_vmail_accounts WHERE local=? AND domainname=? LIMIT 1", [$local, $domainname]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 162)     if ($result->rowCount() == 0) {
modules/email/include/vmail.php 163)         system_failure("Der Account konnte nicht gefunden werden");
modules/email/include/vmail.php 164)     }
modules/email/include/vmail.php 165)     $tmp = $result->fetch();
modules/email/include/vmail.php 166)     return $tmp[0];
bernd VMail-accounts können sich...

bernd authored 16 years ago

modules/vmail/include/vmail.php 167) }
modules/vmail/include/vmail.php 168) 
modules/vmail/include/vmail.php 169) 
modules/vmail/include/vmail.php 170) function change_vmail_password($accname, $newpass)
modules/vmail/include/vmail.php 171) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 172)     $accid = find_account_id($accname);
Hanno Böck replace encrypt_mail_passwo...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 173)     $encpw = gen_pw_hash($newpass);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 174)     db_query("UPDATE mail.vmail_accounts SET password=:encpw WHERE id=:accid", [":encpw" => $encpw, ":accid" => $accid]);
bernd VMail-accounts können sich...

bernd authored 16 years ago

modules/vmail/include/vmail.php 175) }
modules/vmail/include/vmail.php 176) 
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 177) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 178) function domainselect($selected = null, $selectattribute = '')
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 179) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 180)     $domainlist = get_vmail_domains();
modules/email/include/vmail.php 181)     $selected = (int) $selected;
modules/email/include/vmail.php 182) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 183)     $ret = '<select id="domain" name="domain" size="1" ' . $selectattribute . ' >';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 184)     foreach ($domainlist as $dom) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 185)         $s = ($selected == $dom['id']) ? ' selected="selected" ' : '';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 186)         $ret .= "<option value=\"{$dom['id']}\"{$s}>{$dom['domainname']}</option>\n";
modules/email/include/vmail.php 187)     }
modules/email/include/vmail.php 188)     $ret .= '</select>';
modules/email/include/vmail.php 189)     return $ret;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 190) }
modules/vmail/include/vmail.php 191) 
modules/vmail/include/vmail.php 192) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 193) function get_max_mailboxquota($server, $oldquota)
modules/email/include/vmail.php 194) {
modules/email/include/vmail.php 195)     $uid = (int) $_SESSION['userinfo']['uid'];
modules/email/include/vmail.php 196)     $server = (int) $server;
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 197)     $result = db_query("SELECT systemquota - (COALESCE(systemquota_used,0) + COALESCE(mailquota,0)) AS free FROM system.v_quota WHERE uid=:uid AND server=:server", [":uid" => $uid, ":server" => $server]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 198)     $item = $result->fetch();
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 199)     if (!$item) {
Bernd Wurst fix warning

Bernd Wurst authored 4 years ago

modules/email/include/vmail.php 200)         return $oldquota - config('vmail_basequota');
modules/email/include/vmail.php 201)     }
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 202)     DEBUG("Free space: " . $item['free'] . " / Really: " . ($item['free'] + ($oldquota - config('vmail_basequota'))));
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 203)     return max(0, $item['free'] + ($oldquota - config('vmail_basequota')));
bernd VMail-Quota-Zeug

bernd authored 13 years ago

modules/email/include/vmail.php 204) }
modules/email/include/vmail.php 205) 
modules/email/include/vmail.php 206) 
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 207) 
modules/vmail/include/vmail.php 208) 
modules/vmail/include/vmail.php 209) function save_vmail_account($account)
modules/vmail/include/vmail.php 210) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 211)     $accountlogin = ($_SESSION['role'] == ROLE_VMAIL_ACCOUNT);
modules/email/include/vmail.php 212)     $id = $account['id'];
modules/email/include/vmail.php 213)     if ($id != null) {
modules/email/include/vmail.php 214)         $id = (int) $id;
modules/email/include/vmail.php 215)         $oldaccount = get_account_details($id, !$accountlogin);
modules/email/include/vmail.php 216)         // Erzeugt einen system_error() wenn ID ungültig
modules/email/include/vmail.php 217)     }
modules/email/include/vmail.php 218)     // Ab hier ist $id sicher, entweder NULL oder eine gültige ID des aktuellen users
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php 219) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 220)     $newaccount = false;
modules/email/include/vmail.php 221)     if ($id === null) {
modules/email/include/vmail.php 222)         $newaccount = true;
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php 223)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 224) 
Bernd Wurst fix datatype error

Bernd Wurst authored 3 years ago

modules/email/include/vmail.php 225)     $account['enableextensions'] = (int) (bool) $account['enableextensions'];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 226)     if ($accountlogin) {
modules/email/include/vmail.php 227)         if ($account['domain'] != $oldaccount['domain']) {
modules/email/include/vmail.php 228)             system_failure('Sie können die E-Mail-Adresse nicht ändern!');
modules/email/include/vmail.php 229)         }
modules/email/include/vmail.php 230)         if ($account['local'] != $oldaccount['local']) {
modules/email/include/vmail.php 231)             system_failure('Sie können die E-Mail-Adresse nicht ändern!');
modules/email/include/vmail.php 232)         }
modules/email/include/vmail.php 233)         if ($account['quota'] != $oldaccount['quota']) {
modules/email/include/vmail.php 234)             system_failure('Sie können Ihren eigenen Speicherplatz nicht verändern.');
modules/email/include/vmail.php 235)         }
modules/email/include/vmail.php 236)         if ($account['smtpreply'] != null) {
modules/email/include/vmail.php 237)             system_failure("Sie können nicht den Account stilllegen mit dem Sie grade angemeldet sind.");
modules/email/include/vmail.php 238)         }
modules/email/include/vmail.php 239)     } else {
modules/email/include/vmail.php 240)         $account['local'] = filter_input_username($account['local']);
modules/email/include/vmail.php 241)         if ($account['local'] == '') {
modules/email/include/vmail.php 242)             system_failure('Die E-Mail-Adresse braucht eine Angabe vor dem »@«!');
modules/email/include/vmail.php 243)             return false;
modules/email/include/vmail.php 244)         }
modules/email/include/vmail.php 245)         $account['domain'] = (int) $account['domain'];
modules/email/include/vmail.php 246)         $domainlist = get_vmail_domains();
modules/email/include/vmail.php 247)         $valid_domain = false;
modules/email/include/vmail.php 248)         $domainname = null;
modules/email/include/vmail.php 249)         $server = null;
modules/email/include/vmail.php 250)         foreach ($domainlist as $dom) {
modules/email/include/vmail.php 251)             if ($dom['id'] == $account['domain']) {
modules/email/include/vmail.php 252)                 $domainname = $dom['domainname'];
modules/email/include/vmail.php 253)                 $server = $dom['server'];
modules/email/include/vmail.php 254)                 $valid_domain = true;
modules/email/include/vmail.php 255)                 break;
modules/email/include/vmail.php 256)             }
modules/email/include/vmail.php 257)         }
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 258)         if (($account['domain'] == 0) || (!$valid_domain)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 259)             system_failure('Bitte wählen Sie eine Ihrer Domains aus!');
modules/email/include/vmail.php 260)             return false;
modules/email/include/vmail.php 261)         }
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 262)         if ($id == null && get_vmail_id_by_emailaddr($account['local'] . '@' . $domainname)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 263)             system_failure('Diese E-Mail-Adresse gibt es bereits.');
modules/email/include/vmail.php 264)             return false;
modules/email/include/vmail.php 265)         }
Bernd Wurst Verständliche Fehlermeldung...

Bernd Wurst authored 8 years ago

modules/email/include/vmail.php 266)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 267) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 268)     $forwards = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 269)     if (count($account['forwards']) > 0) {
modules/email/include/vmail.php 270)         for ($i = 0 ; $i < count($account['forwards']) ; $i++) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 271)             if (!check_emailaddr($account['forwards'][$i]['destination'])) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 272)                 system_failure('Das Weiterleitungs-Ziel »' . filter_output_html($account['forwards'][$i]['destination']) . '« ist keine E-Mail-Adresse!');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 273)             }
modules/email/include/vmail.php 274)         }
Bernd Wurst fehlende for-Schleife einge...

Bernd Wurst authored 7 years ago

modules/email/include/vmail.php 275)     }
bernd Konfiguration des Autorespo...

bernd authored 12 years ago

modules/email/include/vmail.php 276) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 277)     if ($accountlogin) {
modules/email/include/vmail.php 278)         $password = null;
modules/email/include/vmail.php 279)         $set_password = false;
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php 280)     } else {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 281)         $password = null;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 282)         if ($account['password'] != '') {
modules/email/include/vmail.php 283)             $account['password'] = stripslashes($account['password']);
modules/email/include/vmail.php 284)             $crack = strong_password($account['password']);
modules/email/include/vmail.php 285)             if ($crack !== true) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 286)                 system_failure('Ihr Passwort ist zu einfach. bitte wählen Sie ein sicheres Passwort!' . "\nDie Fehlermeldung lautet: »{$crack}«");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 287)                 return false;
modules/email/include/vmail.php 288)             }
Hanno Böck replace encrypt_mail_passwo...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 289)             $password = gen_pw_hash($account['password']);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 290)         }
modules/email/include/vmail.php 291)         $set_password = ($id == null || $password != null);
modules/email/include/vmail.php 292)         if ($account['password'] === null) {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 293)             $set_password = true;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 294)         }
bernd VMail-User können ihre Eins...

bernd authored 12 years ago

modules/email/include/vmail.php 295)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 296) 
modules/email/include/vmail.php 297)     if (!$accountlogin) {
modules/email/include/vmail.php 298)         $free = config('vmail_basequota');
modules/email/include/vmail.php 299)         if ($newaccount) {
modules/email/include/vmail.php 300)             // Neues Postfach
modules/email/include/vmail.php 301)             $free = get_max_mailboxquota($server, config('vmail_basequota'));
modules/email/include/vmail.php 302)         } else {
modules/email/include/vmail.php 303)             $free = get_max_mailboxquota($oldaccount['server'], $oldaccount['quota']);
modules/email/include/vmail.php 304)         }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 305) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 306)         $newquota = max((int) config('vmail_basequota'), (int) $account['quota']);
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 307)         if ($newquota > config('vmail_basequota') && $newquota > ($free + config('vmail_basequota'))) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 308)             $newquota = $free + config('vmail_basequota');
modules/email/include/vmail.php 309)             if (isset($oldaccount) && $account['quota'] >= $oldaccount['quota'] && $newquota < $oldaccount['quota']) {
modules/email/include/vmail.php 310)                 # Wenn das Limit künstlich reduziert wurde, dann maximal auf den alten Wert.
modules/email/include/vmail.php 311)                 $newquota = $oldaccount['quota'];
modules/email/include/vmail.php 312)             }
modules/email/include/vmail.php 313)             warning("Ihr Speicherplatz reicht für diese Postfach-Größe nicht mehr aus. Ihr Postfach wurde auf {$newquota} MB reduziert. Bitte beachten Sie, dass damit Ihr Benutzerkonto keinen freien Speicherplatz mehr aufweist!");
modules/email/include/vmail.php 314)         }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 315) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 316)         $account['quota'] = $newquota;
modules/email/include/vmail.php 317)     }
bernd Mailaccount-Quota auch bei...

bernd authored 13 years ago

modules/email/include/vmail.php 318) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 319)     if ($account['quota_threshold'] == -1) {
modules/email/include/vmail.php 320)         $account['quota_threshold'] = null;
modules/email/include/vmail.php 321)     } else {
modules/email/include/vmail.php 322)         $account['quota_threshold'] = min((int) $account['quota_threshold'], (int) $account['quota']);
modules/email/include/vmail.php 323)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 324) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 325)     $account['local'] = strtolower($account['local']);
modules/email/include/vmail.php 326)     # Leerstring wird zu NULL
modules/email/include/vmail.php 327)     $account['smtpreply'] = ($account['smtpreply'] ? $account['smtpreply'] : null);
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 328) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 329)     $args = [":local" => $account['local'],
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php 330)         ":domain" => $account['domain'],
modules/email/include/vmail.php 331)         ":password" => $password,
modules/email/include/vmail.php 332)         ":enableextensions" => $account['enableextensions'],
modules/email/include/vmail.php 333)         ":smtpreply" => $account['smtpreply'],
modules/email/include/vmail.php 334)         ":quota" => $account['quota'],
modules/email/include/vmail.php 335)         ":quota_threshold" => $account['quota_threshold'],
modules/email/include/vmail.php 336)         ":id" => $id,
modules/email/include/vmail.php 337)     ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 338)     $query = '';
modules/email/include/vmail.php 339)     if ($newaccount) {
modules/email/include/vmail.php 340)         unset($args[":id"]);
Bernd Wurst user interface for vmail wi...

Bernd Wurst authored 3 years ago

modules/email/include/vmail.php 341)         $query = "INSERT INTO mail.vmail_accounts (local, domain, password, enableextensions, smtpreply, quota, quota_threshold) VALUES (:local, :domain, :password, :enableextensions, :smtpreply, :quota, :quota_threshold)";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 342)     } else {
modules/email/include/vmail.php 343)         if ($set_password) {
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 344)             $pw = ", password=:password";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 345)         } else {
modules/email/include/vmail.php 346)             unset($args[":password"]);
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 347)             $pw = '';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 348)         }
Bernd Wurst user interface for vmail wi...

Bernd Wurst authored 3 years ago

modules/email/include/vmail.php 349)         $query = "UPDATE mail.vmail_accounts SET local=:local, domain=:domain{$pw}, enableextensions=:enableextensions, smtpreply=:smtpreply, quota=:quota, quota_threshold=:quota_threshold WHERE id=:id";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 350)     }
modules/email/include/vmail.php 351)     db_query($query, $args);
modules/email/include/vmail.php 352)     if ($newaccount) {
modules/email/include/vmail.php 353)         $id = db_insert_id();
modules/email/include/vmail.php 354)     }
bernd Bugfix: Fehler bei neu erst...

bernd authored 12 years ago

modules/email/include/vmail.php 355) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 356)     if (is_array($account['autoresponder'])) {
modules/email/include/vmail.php 357)         $ar = $account['autoresponder'];
modules/email/include/vmail.php 358)         $quote = null;
modules/email/include/vmail.php 359)         if ($ar['quote'] == 'attach') {
modules/email/include/vmail.php 360)             $quote = "attach";
modules/email/include/vmail.php 361)         } elseif ($ar['quote'] == 'inline') {
modules/email/include/vmail.php 362)             $quote = 'inline';
modules/email/include/vmail.php 363)         } elseif ($ar['quote'] == 'teaser') {
modules/email/include/vmail.php 364)             $quote = 'teaser';
modules/email/include/vmail.php 365)         }
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 366)         if (!check_emailaddr($ar['fromaddr'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 367)             input_error("Die Absenderadresse sieht ungültig aus. Es wird Ihre E-Mail-Adresse benutzt!");
modules/email/include/vmail.php 368)             $ar['fromaddr'] = null;
modules/email/include/vmail.php 369)         }
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 370)         $query = "REPLACE INTO mail.vmail_autoresponder (account, valid_from, valid_until, fromname, fromaddr, subject, message, quote) " .
Bernd Wurst email-Modul auf prepared-st...

Bernd Wurst authored 10 years ago

modules/email/include/vmail.php 371)              "VALUES (:id, :valid_from, :valid_until, :fromname, :fromaddr, :subject, :message, :quote)";
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 372)         $args = [":id" => $id,
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php 373)             ":valid_from" => $ar['valid_from'],
modules/email/include/vmail.php 374)             ":valid_until" => $ar['valid_until'],
modules/email/include/vmail.php 375)             ":fromname" => $ar['fromname'],
modules/email/include/vmail.php 376)             ":fromaddr" => $ar['fromaddr'],
modules/email/include/vmail.php 377)             ":subject" => $ar['subject'],
modules/email/include/vmail.php 378)             ":message" => $ar['message'],
modules/email/include/vmail.php 379)             ":quote" => $quote, ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 380)         db_query($query, $args);
modules/email/include/vmail.php 381)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 382) 
bernd Bugfix: Fehler bei neu erst...

bernd authored 12 years ago

modules/email/include/vmail.php 383) 
modules/email/include/vmail.php 384) 
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 385)     if (!$newaccount) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 386)         db_query("DELETE FROM mail.vmail_forward WHERE account=?", [$id]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 387)     }
bernd VMail-accounts können sich...

bernd authored 16 years ago

modules/vmail/include/vmail.php 388) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 389)     if (count($account['forwards']) > 0) {
modules/email/include/vmail.php 390)         $forward_query = "INSERT INTO mail.vmail_forward (account,destination) VALUES (:account, :destination)";
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 391)         for ($i = 0;$i < count($account['forwards']); $i++) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 392)             if (!isset($account['forwards'][$i]['destination'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 393)                 continue;
modules/email/include/vmail.php 394)             }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 395)             db_query($forward_query, [":account" => $id, ":destination" => $account['forwards'][$i]['destination']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 396)         }
bernd Anpassung auf neues Interface

bernd authored 16 years ago

modules/vmail/include/vmail.php 397)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 398)     if ($newaccount && $password) {
modules/email/include/vmail.php 399)         $servername = get_server_by_id($server);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 400)         $emailaddr = 'vmail-' . $account['local'] . '%' . $domainname . '@' . $servername;
modules/email/include/vmail.php 401)         $username = $account['local'] . '@' . $domainname;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 402)         $webmailurl = config('webmail_url');
modules/email/include/vmail.php 403)         $servername = get_server_by_id($server);
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 404)         $message = 'Ihr neues E-Mail-Postfach ' . $username . ' ist einsatzbereit!
bernd Welcome-Mail für neue VMail...

bernd authored 12 years ago

modules/email/include/vmail.php 405) 
modules/email/include/vmail.php 406) Wenn Sie diese Nachricht sehen, haben Sie das Postfach erfolgreich 
modules/email/include/vmail.php 407) abgerufen. Sie können diese Nachricht nach Kenntnisnahme löschen.
modules/email/include/vmail.php 408) 
modules/email/include/vmail.php 409) Wussten Sie schon, dass Sie auf mehrere Arten Ihre E-Mails abrufen können?
modules/email/include/vmail.php 410) 
modules/email/include/vmail.php 411) - Für unterwegs: Webmail
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 412)   Rufen Sie dazu einfach die Seite ' . $webmailurl . ' auf und 
bernd Welcome-Mail für neue VMail...

bernd authored 12 years ago

modules/email/include/vmail.php 413)   geben Sie Ihre E-Mail-Adresse und das Passwort ein.
modules/email/include/vmail.php 414) 
modules/email/include/vmail.php 415) - Mit Ihrem Computer oder Smartphone: IMAP oder POP3
modules/email/include/vmail.php 416)   Tragen Sie bitte folgende Zugangsdaten in Ihrem Programm ein:
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 417)     Server-Name: ' . $servername . '
modules/email/include/vmail.php 418)     Benutzername: ' . $username . '
bernd Welcome-Mail für neue VMail...

bernd authored 12 years ago

modules/email/include/vmail.php 419)   (Achten Sie bitte darauf, dass die Verschlüsselung mit SSL oder TLS 
modules/email/include/vmail.php 420)   aktiviert ist.)
modules/email/include/vmail.php 421) ';
Hanno Böck Always use send_mail() wrap...

Hanno Böck authored 9 months ago

modules/email/include/vmail.php 422)         // send welcome message
modules/email/include/vmail.php 423)         send_mail($emailaddr, 'Ihr neues Postfach ist bereit', $message, "welcome");
modules/email/include/vmail.php 424)         // notify the vmail subsystem of this new account
modules/email/include/vmail.php 425)         //mail('vmail@'.config('vmail_server'), 'command', "user={$account['local']}\nhost={$domainname}", "X-schokokeks-org-message: command");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 426)     }
bernd Mailaccount-Quota auch bei...

bernd authored 13 years ago

modules/email/include/vmail.php 427) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 428)     // Clean up obsolete quota
modules/email/include/vmail.php 429)     if ($_SESSION['role'] == ROLE_SYSTEMUSER) {
modules/email/include/vmail.php 430)         db_query("UPDATE mail.vmail_accounts SET quota_used=NULL, quota=NULL WHERE password IS NULL");
modules/email/include/vmail.php 431)     }
Bernd Wurst Räume Quota auf wenn ein Po...

Bernd Wurst authored 11 years ago

modules/email/include/vmail.php 432) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 433)     // Update Mail-Quota-Cache
modules/email/include/vmail.php 434)     if ($_SESSION['role'] == ROLE_SYSTEMUSER) {
modules/email/include/vmail.php 435)         $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 436)         $result = db_query("SELECT useraccount, server, SUM(quota-(SELECT value FROM misc.config WHERE `key`='vmail_basequota')) AS quota, SUM(GREATEST(quota_used-(SELECT value FROM misc.config WHERE `key`='vmail_basequota'), 0)) AS used FROM mail.v_vmail_accounts WHERE useraccount=? GROUP BY useraccount, server", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 437)         while ($line = $result->fetch()) {
modules/email/include/vmail.php 438)             if ($line['quota'] !== null) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 439)                 db_query("REPLACE INTO mail.vmailquota (uid, server, quota, used) VALUES (:uid, :server, :quota, :used)", [":uid" => $line['useraccount'], ":server" => $line['server'], ":quota" => $line['quota'], ":used" => $line['used']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 440)             }
modules/email/include/vmail.php 441)         }
bernd Mailaccount-Quota auch bei...

bernd authored 13 years ago

modules/email/include/vmail.php 442)     }
modules/email/include/vmail.php 443) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 444)     return true;
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 445) }
modules/vmail/include/vmail.php 446) 
modules/vmail/include/vmail.php 447) 
modules/vmail/include/vmail.php 448) 
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/include/vmail.php 449) function delete_account($id)
modules/vmail/include/vmail.php 450) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 451)     $account = get_account_details($id);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 452)     db_query("DELETE FROM mail.vmail_accounts WHERE id=?", [$account['id']]);
bernd Löschen geht jetzt auch

bernd authored 17 years ago

modules/vmail/include/vmail.php 453) }
modules/vmail/include/vmail.php 454) 
bernd Erste Version des vmail-Modul

bernd authored 17 years ago

modules/vmail/include/vmail.php 455) 
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 456) 
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 457) function domainsettings($only_domain = null)
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 458) {
modules/email/include/vmail.php 459)     $uid = (int) $_SESSION['userinfo']['uid'];
modules/email/include/vmail.php 460)     if ($only_domain) {
modules/email/include/vmail.php 461)         $only_domain = (int) $only_domain;
modules/email/include/vmail.php 462)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 463)     $domains = [];
modules/email/include/vmail.php 464)     $subdomains = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 465) 
modules/email/include/vmail.php 466)     // Domains
Bernd Wurst DKIM-Einstellungen nur bei...

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 467)     $result = db_query("SELECT d.id, CONCAT_WS('.',d.domainname,d.tld) AS name, d.mail, d.dns, d.dkim, d.mailserver_lock, m.id AS m_id, v.id AS v_id FROM kundendaten.domains AS d LEFT JOIN mail.virtual_mail_domains AS v ON (d.id=v.domain AND v.hostname IS NULL) LEFT JOIN mail.custom_mappings AS m ON (d.id=m.domain AND m.subdomain IS NULL) WHERE d.useraccount=:uid OR m.uid=:uid ORDER BY CONCAT_WS('.',d.domainname,d.tld);", [":uid" => $uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 468) 
modules/email/include/vmail.php 469)     while ($mydom = $result->fetch()) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 470)         if (!array_key_exists($mydom['id'], $domains)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 471)             if ($mydom['v_id']) {
modules/email/include/vmail.php 472)                 $mydom['mail'] = 'virtual';
modules/email/include/vmail.php 473)             }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 474)             $domains[$mydom['id']] = [
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php 475)                 "name" => $mydom['name'],
modules/email/include/vmail.php 476)                 "type" => $mydom['mail'],
modules/email/include/vmail.php 477)                 "dkim" => $mydom['dkim'],
modules/email/include/vmail.php 478)                 "dns" => $mydom['dns'],
modules/email/include/vmail.php 479)                 "mailserver_lock" => $mydom['mailserver_lock'],
modules/email/include/vmail.php 480)             ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 481)             if ($only_domain && $only_domain == $mydom['id']) {
modules/email/include/vmail.php 482)                 return $domains[$only_domain];
modules/email/include/vmail.php 483)             }
modules/email/include/vmail.php 484)         }
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 485)     }
bernd Subdomains und Domains bess...

bernd authored 15 years ago

modules/email/include/vmail.php 486) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 487)     // Subdomains
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 488)     $result = db_query("SELECT d.id, CONCAT_WS('.',d.domainname,d.tld) AS name, d.mail, m.id AS m_id, v.id AS v_id, IF(ISNULL(v.hostname),m.subdomain,v.hostname) AS hostname FROM kundendaten.domains AS d LEFT JOIN mail.virtual_mail_domains AS v ON (d.id=v.domain AND v.hostname IS NOT NULL) LEFT JOIN mail.custom_mappings AS m ON (d.id=m.domain AND m.subdomain IS NOT NULL) WHERE (m.id IS NOT NULL OR v.id IS NOT NULL) AND d.useraccount=:uid OR m.uid=:uid;", [":uid" => $uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 489)     while ($mydom = $result->fetch()) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 490)         if (!array_key_exists($mydom['id'], $subdomains)) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 491)             $subdomains[$mydom['id']] = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 492)         }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 493) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 494)         $type = 'auto';
modules/email/include/vmail.php 495)         if ($mydom['v_id']) {
modules/email/include/vmail.php 496)             $type = 'virtual';
modules/email/include/vmail.php 497)         }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 498)         $subdomains[$mydom['id']][] = [
Hanno Böck Neue codingstyle-rule array...

Hanno Böck authored 8 months ago

modules/email/include/vmail.php 499)             "name" => $mydom['hostname'],
modules/email/include/vmail.php 500)             "type" => $type,
modules/email/include/vmail.php 501)         ];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 502)     }
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 503)     return ["domains" => $domains, "subdomains" => $subdomains];
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 504) }
modules/email/include/vmail.php 505) 
modules/email/include/vmail.php 506) 
modules/email/include/vmail.php 507) function domain_has_vmail_accounts($domid)
modules/email/include/vmail.php 508) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 509)     $domid = (int) $domid;
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 510)     $result = db_query("SELECT dom.id FROM mail.vmail_accounts AS acc LEFT JOIN mail.virtual_mail_domains AS dom ON (dom.id=acc.domain) WHERE dom.domain=?", [$domid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 511)     return ($result->rowCount() > 0);
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 512) }
modules/email/include/vmail.php 513) 
modules/email/include/vmail.php 514) 
modules/email/include/vmail.php 515) function change_domain($id, $type)
modules/email/include/vmail.php 516) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 517)     $id = (int) $id;
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 518)     if (domain_has_vmail_accounts($id) && type != 'virtual') {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 519)         system_failure("Sie müssen zuerst alle E-Mail-Konten mit dieser Domain löschen, bevor Sie die Webinterface-Verwaltung für diese Domain abschalten können.");
modules/email/include/vmail.php 520)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 521) 
Bernd Wurst Erster Entwurf nomail-Feature

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 522)     if (!in_array($type, ['none','auto','virtual', 'nomail'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 523)         system_failure("Ungültige Aktion");
modules/email/include/vmail.php 524)     }
Hanno remove whitespace in empty...

Hanno authored 6 years ago

modules/email/include/vmail.php 525) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 526)     $old = domainsettings($id);
modules/email/include/vmail.php 527)     if ($old['type'] == $type) {
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 528)         return;
modules/email/include/vmail.php 529)         //system_failure('Domain ist bereits so konfiguriert');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 530)     }
modules/email/include/vmail.php 531) 
modules/email/include/vmail.php 532)     if ($type == 'none') {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 533)         db_query("DELETE FROM mail.virtual_mail_domains WHERE domain=? AND hostname IS NULL", [$id]);
modules/email/include/vmail.php 534)         db_query("DELETE FROM mail.custom_mappings WHERE domain=? AND subdomain IS NULL", [$id]);
modules/email/include/vmail.php 535)         db_query("UPDATE kundendaten.domains SET mail='none', lastchange=NOW() WHERE id=?", [$id]);
Bernd Wurst Erster Entwurf nomail-Feature

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 536)     } elseif ($type == 'nomail') {
modules/email/include/vmail.php 537)         if ($old['type'] != 'none') {
modules/email/include/vmail.php 538)             system_failure("Sie können die NOMAIL-Option nur für Domains setzen, deren Mail-Verarbeitung bereits ausgeschaltet ist!");
modules/email/include/vmail.php 539)         }
modules/email/include/vmail.php 540)         db_query("DELETE FROM mail.virtual_mail_domains WHERE domain=? AND hostname IS NULL", [$id]);
modules/email/include/vmail.php 541)         db_query("DELETE FROM mail.custom_mappings WHERE domain=? AND subdomain IS NULL", [$id]);
modules/email/include/vmail.php 542)         db_query("UPDATE kundendaten.domains SET mail='nomail', lastchange=NOW() WHERE id=?", [$id]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 543)     } elseif ($type == 'virtual') {
modules/email/include/vmail.php 544)         $vmailserver = (int) $_SESSION['userinfo']['server'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 545)         db_query("DELETE FROM mail.custom_mappings WHERE domain=? AND subdomain IS NULL", [$id]);
modules/email/include/vmail.php 546)         db_query("UPDATE kundendaten.domains SET mail='auto', lastchange=NOW() WHERE id=?", [$id]);
modules/email/include/vmail.php 547)         db_query("INSERT INTO mail.virtual_mail_domains (domain, server) VALUES (?, ?)", [$id, $vmailserver]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 548)     } elseif ($type == 'auto') {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/vmail.php 549)         db_query("DELETE FROM mail.virtual_mail_domains WHERE domain=? AND hostname IS NULL LIMIT 1;", [$id]);
modules/email/include/vmail.php 550)         db_query("DELETE FROM mail.custom_mappings WHERE domain=? AND subdomain IS NULL LIMIT 1;", [$id]);
modules/email/include/vmail.php 551)         db_query("UPDATE kundendaten.domains SET mail='auto', lastchange=NOW() WHERE id=? LIMIT 1;", [$id]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 552)     }
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 553) }
modules/email/include/vmail.php 554) 
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 555) function change_domain_dkim($id, $type)
modules/email/include/vmail.php 556) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

modules/email/include/vmail.php 557)     if (!in_array($type, ['none','dkim','dmarc'])) {
Bernd Wurst DKIM-Auswahl eingebaut

Bernd Wurst authored 1 year ago

modules/email/include/vmail.php 558)         system_failure("Ungültige Aktion");
modules/email/include/vmail.php 559)     }
modules/email/include/vmail.php 560) 
modules/email/include/vmail.php 561)     $old = domainsettings($id);
modules/email/include/vmail.php 562)     if ($old['dkim'] == $type) {
modules/email/include/vmail.php 563)         return;
modules/email/include/vmail.php 564)         //system_failure('Domain ist bereits so konfiguriert');
modules/email/include/vmail.php 565)     }
modules/email/include/vmail.php 566) 
modules/email/include/vmail.php 567)     if ($type == 'none') {
modules/email/include/vmail.php 568)         db_query("UPDATE kundendaten.domains SET dkim='none', lastchange=NOW() WHERE id=?", [$id]);
modules/email/include/vmail.php 569)     } elseif ($type == 'dkim') {
modules/email/include/vmail.php 570)         db_query("UPDATE kundendaten.domains SET dkim='dkim', lastchange=NOW() WHERE id=?", [$id]);
modules/email/include/vmail.php 571)     } elseif ($type == 'dmarc') {
modules/email/include/vmail.php 572)         db_query("UPDATE kundendaten.domains SET dkim='dmarc', lastchange=NOW() WHERE id=?", [$id]);
modules/email/include/vmail.php 573)     }
modules/email/include/vmail.php 574) }
modules/email/include/vmail.php 575) 
bernd Großer VMail-move

bernd authored 16 years ago

modules/email/include/vmail.php 576) 
modules/email/include/vmail.php 577) /*
modules/email/include/vmail.php 578) function maildomain_type($type) {
modules/email/include/vmail.php 579)   switch ($type) {
modules/email/include/vmail.php 580)     case 'none':
modules/email/include/vmail.php 581)       $type = 'Diese Domain empfängt keine E-Mails';
modules/email/include/vmail.php 582)       break;
modules/email/include/vmail.php 583)     case 'auto':
modules/email/include/vmail.php 584)       $type = 'E-Mail-Adressen werden manuell über .courier-Dateien verwaltet';
modules/email/include/vmail.php 585)       break;
modules/email/include/vmail.php 586)     case 'virtual':
modules/email/include/vmail.php 587)       $type = 'E-Mail-Adressen werden über Webinterface verwaltet';
modules/email/include/vmail.php 588)       break;
modules/email/include/vmail.php 589)     case 'manual':
modules/email/include/vmail.php 590)       $type = 'Manuelle Konfiguration, kann nur von den Admins geändert werden';
modules/email/include/vmail.php 591)       break;
modules/email/include/vmail.php 592)   }
modules/email/include/vmail.php 593)   return $type;
modules/email/include/vmail.php 594) }
modules/email/include/vmail.php 595) */
modules/email/include/vmail.php 596) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 597) function maildomain_type($type)
modules/email/include/vmail.php 598) {
modules/email/include/vmail.php 599)     switch ($type) {
Hanno Böck more strict codingstyle wit...

Hanno Böck authored 2 years ago

modules/email/include/vmail.php 600)         case 'none':
modules/email/include/vmail.php 601)             $type = 'Deaktiviert';
modules/email/include/vmail.php 602)             break;
modules/email/include/vmail.php 603)         case 'auto':
modules/email/include/vmail.php 604)             $type = '.courier-Dateien';
modules/email/include/vmail.php 605)             break;
modules/email/include/vmail.php 606)         case 'virtual':
modules/email/include/vmail.php 607)             $type = 'Webinterface';
modules/email/include/vmail.php 608)             break;
modules/email/include/vmail.php 609)         case 'manual':
modules/email/include/vmail.php 610)             $type = 'Manuell';
modules/email/include/vmail.php 611)             break;
modules/email/include/vmail.php 612)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/vmail.php 613)     return $type;