Hanno Böck To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/ 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. */ require_once('inc/base.php'); require_once('inc/icons.php'); require_once('inc/security.php'); require_role(ROLE_SYSTEMUSER); require_once('inc/jquery.php'); javascript(); require_once('hasdomain.php'); if (! user_has_vmail_domain()) { title("E-Mail-Verwaltung"); output('

Sie können bei '.config('company_name').' die E-Mails Ihrer Domains auf zwei unterschiedliche Arten empfangen.

  1. Sie können einfache E-Mail-Konten erstellen, die ankommende E-Mails speichern oder weiterleiten.
  2. Sie können die manuelle Verwaltung wählen, bei der Sie passende .courier-Dateien für den Empfang und manuelle POP3/IMAP-Konten für den Abruf erstellen können.

Diese Wahlmöglichkeit haben Sie pro Domain bzw. Subdomain. eine Mischung beider Verfahren ist nicht möglich. Subdomains können grundsätzlich nur durch Administratoren eingerichtet und verändert werden.

Sie haben bisher keine Domains, die auf Web-basierte Verwaltung von E-Mail-Adressen eingerichtet sind.

Besuchen Sie die '.internal_link('domains', 'Domain-Einstellungen').' um diese Auswahl für Ihre Domains zu ändern.

Wenn Sie die manuelle Einrichtung möchten oder keine eigene Domain nutzen, können Sie unter '.internal_link('imap', 'POP3/IMAP').' manuelle POP3-/IMAP-Konten erstellen.

'); } else { $filter = null; if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') { $filter = $_REQUEST['filter']; } require_once('vmail.php'); $domains = get_vmail_domains(); $all_accounts = get_vmail_accounts(); $sorted_by_domains = array(); foreach ($all_accounts as $account) { if (array_key_exists($account['domain'], $sorted_by_domains)) { array_push($sorted_by_domains[$account['domain']], $account); } else { $sorted_by_domains[$account['domain']] = array($account); } } DEBUG($sorted_by_domains); title('E-Mail-Accounts'); addnew("edit", "Neue E-Mail-Adresse anlegen"); if (count($domains) > 0) { // Filter-Funktion if (count($all_accounts) > 10 || $filter) { $form = '

'; output(html_form('vmail_filter', 'vmail', '', $form)); } output('

Folgende E-Mail-Konten sind aktuell eingerichtet:

'); foreach ($domains as $dom) { if ($filter && strpos($dom['domainname'], $filter) === false) { // Die Domain entspricht nicht dem Filter, schau die Postfächer an $account_found = false; if (array_key_exists($dom['id'], $sorted_by_domains)) { $accounts_on_domain = $sorted_by_domains[$dom['id']]; foreach ($accounts_on_domain as $this_account) { if (strpos($this_account['local'], $filter) !== false) { $account_found = true; } } } if (! $account_found) { continue; } } output('

'.$dom['domainname'].' ('.other_icon('information.png', 'Zugangsdaten anzeigen').' '.internal_link('logindata', 'Zugangsdaten für E-Mail-Abruf anzeigen', 'server='.get_server_by_id($dom['server']).'&type=vmail').')

'); if (array_key_exists($dom['id'], $sorted_by_domains)) { $accounts_on_domain = $sorted_by_domains[$dom['id']]; foreach ($accounts_on_domain as $this_account) { if ($filter && (strpos($dom['domainname'], $filter) === false && strpos($this_account['local'], $filter) === false)) { continue; } $acc = get_account_details($this_account['id']); $actions = array(); DEBUG($acc); if ($acc['password'] != '') { $percent = round(($acc["quota_used"] / $acc["quota"]) * 100); $color = ($percent > 95 ? 'red' : ($percent > 75 ? "yellow" : "green")); $width = 2 * min($percent, 100); $quotachart = "
 
{$acc['quota_used']} MB von {$acc['quota']} MB belegt"; array_push($actions, "Ablegen in Mailbox
".$quotachart); } if ($acc['autoresponder']) { $now = date('Y-m-d'); $valid_from = $acc['autoresponder']['valid_from']; $valid_from_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_from'])); $valid_until = $acc['autoresponder']['valid_until']; $valid_until_string = date('d.m.Y', strtotime($acc['autoresponder']['valid_until'])); if ($valid_from == null) { // Autoresponder abgeschaltet //array_push($actions, "Automatische Antwort versenden (Abgeschaltet)"); } elseif ($valid_from > $now) { array_push($actions, "Automatische Antwort versenden (Wird aktiviert am {$valid_from_string})"); } elseif ($valid_until == null) { array_push($actions, "Automatische Antwort versenden (Unbefristet)"); } elseif ($valid_until > $now) { array_push($actions, "Automatische Antwort versenden (Wird deaktiviert am {$valid_until_string})"); } elseif ($valid_until < $now) { array_push($actions, "Automatische Antwort versenden (Automatisch abgeschaltet seit {$valid_until_string})"); } } foreach ($acc['forwards'] as $fwd) { array_push($actions, "Weiterleitung an ".filter_output_html($fwd['destination']).""); } $dest = ''; if (count($actions) > 0) { $dest = "'; } if ($acc['smtpreply']) { output('

'.filter_output_html($acc['local'].'@'.$this_account['domainname']).' '.internal_link("save", 'löschen', "action=delete&id=".$acc['id']).'

'); output("'); } else { output('

'.internal_link('edit', filter_output_html($acc['local'].'@'.$this_account['domainname']), 'id='.$acc['id']).' '.internal_link("save", 'löschen', "action=delete&id=".$acc['id']).'

'); output('

'.$dest.'

'); } } } else { output('

Bisher keine E-Mail-Adressen unter dieser Domain.

'); } addnew("edit", "Neue E-Mail-Adresse anlegen", "domain={$dom['id']}"); output('
'); } } else { output('

Es sind bisher keine Ihrer Domains für Mail-Empfang eingerichtet.

'); } /* FIXME: Das sollte nur kommen, wenn der IMAP/POP3-Menü-Eintrag nicht da ist */ output('

Hinweis: '.filter_output_html(config('company_name')).' bietet für fortgeschrittene Nutzer die manuelle Einrichtung von POP3/IMAP-Accounts.
'.internal_link("imap", "Neuen POP3/IMAP-Account anlegen", "action=create").'

'); }