From a8ebc0d9bb2cf279d5e0b87fa844497c4768fe1b Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 31 Dec 2022 21:27:40 +0100 Subject: [PATCH] Add translation --- README.md | 7 + common_config.php | 80 +- composer.json | 14 +- cron.php | 6 +- locale/de_DE/LC_MESSAGES/mail-hosting.mo | Bin 0 -> 22562 bytes locale/de_DE/LC_MESSAGES/mail-hosting.po | 990 +++++++++++++++++++++++ locale/mail-hosting.pot | 906 +++++++++++++++++++++ setup.php | 31 +- tools/delete_leftover_files.php | 6 +- update-translation.sh | 3 + www/admin.php | 388 ++++----- www/index.php | 54 +- www/manage_account.php | 156 ++-- www/register.php | 49 +- 14 files changed, 2344 insertions(+), 346 deletions(-) create mode 100644 locale/de_DE/LC_MESSAGES/mail-hosting.mo create mode 100644 locale/de_DE/LC_MESSAGES/mail-hosting.po create mode 100644 locale/mail-hosting.pot create mode 100755 update-translation.sh diff --git a/README.md b/README.md index 6a8b51a..886f492 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,13 @@ Installation Instructions: TODO +Translating: +------------ + +The scrip `update-translations.sh` can be used to update the language template and translation files from source. +It will generate the file `locale/mail-hosting.pot` which you can then use as basis to create a new language file in `YOUR_LANG_CODE/LC_MESSAGES/mail-hosting.po` and edit it with a translation program, such as [Poedit](https://poedit.net/). +Once you are done, you can open a pull request, or [email me](mailto:daniel@danwin1210.de), to include the translation. + Live demo: ---------- diff --git a/common_config.php b/common_config.php index 87ac2ae..adcabf7 100644 --- a/common_config.php +++ b/common_config.php @@ -13,6 +13,64 @@ const DBVERSION = 1; // Database schema version const PERSISTENT = true; // persistent database connection const CAPTCHA_DIFFICULTY = 1; // captcha difficulty from 0 to 3 const RESERVED_USERNAMES = ['about', 'abuse', 'admin', 'administrator', 'billing', 'contact', 'daemon', 'ftp', 'help', 'hostmaster', 'info', 'legal', 'list', 'list-request', 'lists', 'maildaemon', 'mailerdaemon', 'mailer-daemon', 'marketing', 'media', 'news', 'newsletter', 'nobody', 'noc', 'noreply', 'no-reply', 'notification', 'notifications', 'notify', 'offer', 'offers', 'office', 'official', 'order', 'orders', 'phish', 'phishing', 'postmaster', 'root', 'sale', 'sales', 'security', 'service', 'services', 'shop', 'shopping', 'spam', 'staff', 'support', 'survey', 'system', 'team', 'teams', 'unsbubscribe', 'uucp', 'usenet', 'user', 'username', 'users', 'web', 'webmail', 'webmaster', 'webmasters', 'welcome', 'www']; // list of reserved usernames that can mot be used on public registration +const CANONICAL_URL = 'https://danwin1210.de/mail/'; // our preferred URL prefix for search engines +const PRIVACY_POLICY_URL = '/privacy.php'; // URL to privacy policy +const WEB_XMPP_URL = 'https://danwin1210.de:5281/conversejs'; // URL to Web-XMPP +const XMPP_BOSH_URL = 'https://danwin1210.de:5281/http-bind'; // XMPP BOSH URL +const XMPP_FILE_PROXY = 'proxy.danwin1210.de'; // File proxy domain +const ROOT_URL = '/mail/'; // Relative root URL under which the mail hosting is installed +const CONTACT_URL = '/contact.php'; // URL to get in contact with you +const CLEARNET_SERVER = 'danwin1210.de'; // Clearnet domain of the mail server +const ONION_SERVER = 'danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion'; // Onion domain of the mail server +const DBHOST_PROSODY = 'localhost'; // Database host +const DBUSER_PROSODY = 'prosody'; // Database user +const DBPASS_PROSODY = 'YOUR_PASSWORD'; // Database password +const DBNAME_PROSODY = 'prosody'; // Database + +const LANGUAGES = [ + 'de' => ['name' => 'Deutsch', 'locale' => 'de_DE', 'flag' => '🇩🇪', 'show_in_menu' => true, 'dir' => 'ltr'], + 'en' => ['name' => 'English', 'locale' => 'en_GB', 'flag' => '🇬🇧', 'show_in_menu' => true, 'dir' => 'ltr'], +]; +$language = 'en'; +$locale = 'en_GB'; +$dir = 'ltr'; + +if(isset($_REQUEST['lang']) && isset(LANGUAGES[$_REQUEST['lang']])){ + $locale = LANGUAGES[$_REQUEST['lang']]['locale']; + $language = $_REQUEST['lang']; + $dir = LANGUAGES[$_REQUEST['lang']]['dir']; + setcookie('language', $_REQUEST['lang'], ['expires' => 0, 'path' => '/', 'domain' => '', 'secure' => ($_SERVER['HTTPS'] ?? '' === 'on'), 'httponly' => true, 'samesite' => 'Strict']); +}elseif(isset($_COOKIE['language']) && isset(LANGUAGES[$_COOKIE['language']])){ + $locale = LANGUAGES[$_COOKIE['language']]['locale']; + $language = $_COOKIE['language']; + $dir = LANGUAGES[$_COOKIE['language']]['dir']; +}elseif(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ + $prefLocales = array_reduce( + explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']), + function (array $res, string $el) { + list($l, $q) = array_merge(explode(';q=', $el), [1]); + $res[$l] = (float) $q; + return $res; + }, []); + arsort($prefLocales); + foreach($prefLocales as $l => $q){ + $lang = locale_lookup(array_keys(LANGUAGES), $l); + if(!empty($lang)){ + $locale = LANGUAGES[$lang]['locale']; + $language = $lang; + $dir = LANGUAGES[$lang]['dir']; + setcookie('language', $lang, ['expires' => 0, 'path' => '/', 'domain' => '', 'secure' => ($_SERVER['HTTPS'] ?? '' === 'on'), 'httponly' => true, 'samesite' => 'Strict']); + break; + } + } + +} +putenv('LC_ALL='.$locale); +setlocale(LC_ALL, $locale); + +bindtextdomain('mail-hosting', __DIR__.'/locale'); +bind_textdomain_codeset('mail-hosting', 'UTF-8'); +textdomain('mail-hosting'); require_once( 'vendor/autoload.php' ); @@ -26,7 +84,7 @@ function get_db_instance(): PDO $db = new PDO( 'mysql:host=' . DBHOST . ';dbname=' . DBNAME, DBUSER, DBPASS, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_PERSISTENT => PERSISTENT ] ); } catch ( PDOException ) { http_response_code( 500 ); - die( 'No Connection to MySQL database!' ); + die( _('No Connection to MySQL database!') ); } return $db; } @@ -75,7 +133,7 @@ function send_captcha(): void $time = time(); $stmt = $db->prepare( 'INSERT INTO captcha (id, time, code) VALUES (?, ?, ?);' ); $stmt->execute( [ $randid, $time, $code ] ); - echo '
Copy:
'; + echo '
'._('Copy:').'
'; if ( CAPTCHA_DIFFICULTY === 1 ) { $im = imagecreatetruecolor( 55, 24 ); $bg = imagecolorallocate( $im, 0, 0, 0 ); @@ -194,7 +252,7 @@ function validate_email_list( array $targets, string &$msg = '' ): string if ( $validator->isValid( $email, new NoRFCWarningsValidation() ) ) { $alias_goto .= ",$email"; } else { - $msg .= ''; + $msg .= ''; } } return ltrim( $alias_goto, ',' ); @@ -220,7 +278,7 @@ function check_domain_access( string &$email, string &$msg = '' ): bool $managed_domains [] = $tmp[ 'domain' ]; } if ( ! in_array( $domain, $managed_domains, true ) ) { - $msg .= ''; + $msg .= ''; return false; } } @@ -231,8 +289,20 @@ function check_email_valid( string $email, string &$msg = '' ): bool { $validator = new EmailValidator(); if ( ! $validator->isValid( $email, new NoRFCWarningsValidation() ) ) { - $msg .= ''; + $msg .= ''; return false; } return true; } + +function alt_links(): void +{ + global $language; + foreach(LANGUAGES as $lang => $data) { + if($lang === $language){ + continue; + } + echo ''; + echo ''; + } +} diff --git a/composer.json b/composer.json index 7287613..dfb7451 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,10 @@ { - "require": { - "egulias/email-validator": "^3.1", - "ext-mbstring": "*", - "ext-pdo": "*", - "ext-gnupg": "*" - } + "require": { + "egulias/email-validator": "^3.2", + "ext-mbstring": "*", + "ext-pdo": "*", + "ext-gnupg": "*", + "ext-gettext": "*", + "ext-intl": "*" + } } diff --git a/cron.php b/cron.php index 37fb26d..919dcec 100644 --- a/cron.php +++ b/cron.php @@ -2,17 +2,13 @@ if ( php_sapi_name() !== 'cli' ) { exit; } -const DBHOST_PROSODY = 'localhost'; // Database host -const DBUSER_PROSODY = 'prosody'; // Database user -const DBPASS_PROSODY = 'YOUR_PASSWORD'; // Database password -const DBNAME_PROSODY = 'prosody'; // Database require_once 'common_config.php'; $db = get_db_instance(); try { $db_prosody = new PDO( 'mysql:host=' . DBHOST_PROSODY . ';dbname=' . DBNAME_PROSODY, DBUSER_PROSODY, DBPASS_PROSODY, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ] ); } catch ( PDOException $e ) { - die( 'No Connection to MySQL database!' ); + die( _('No Connection to MySQL database!') . PHP_EOL); } setlocale( LC_CTYPE, 'C.UTF-8' ); // make sure to use UTF-8 locale. Non UTF-8 locales can cause serious issues when handling UTF-8 file names diff --git a/locale/de_DE/LC_MESSAGES/mail-hosting.mo b/locale/de_DE/LC_MESSAGES/mail-hosting.mo new file mode 100644 index 0000000000000000000000000000000000000000..57a997b293f5096f02ad3df5fb51709fc40c55aa GIT binary patch literal 22562 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 lmY*GxL(55vE+8kFZSBz{2WXqc$VV7xD, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-31 21:17+0100\n" +"PO-Revision-Date: 2022-12-31 21:23+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: de_DE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.1.1\n" + +#: www/index.php:6 www/index.php:15 +msgid "E-Mail and XMPP" +msgstr "E-Mail und XMPP" + +#: www/index.php:10 www/index.php:16 +msgid "Get a free and anonymous E-Mail address and an XMPP/Jabber account" +msgstr "" +"Bekomme eine kostenlose und anonyme E-Mail Adresse und ein XMPP/Jabber Konto" + +#: www/index.php:21 www/manage_account.php:236 www/register.php:94 +msgid "Info" +msgstr "Info" + +#: www/index.php:21 www/manage_account.php:240 www/register.php:94 +#: www/register.php:121 +msgid "Register" +msgstr "Registrieren" + +#: www/index.php:21 www/manage_account.php:241 www/register.php:94 +msgid "Webmail-Login" +msgstr "Webmail-Anmeldung" + +#: www/index.php:21 www/register.php:95 +msgid "Manage account" +msgstr "Konto verwalten" + +#: www/index.php:21 www/manage_account.php:247 www/register.php:95 +msgid "Web-XMPP" +msgstr "Web-XMPP" + +#: www/index.php:22 +msgid "What you will get" +msgstr "Was du bekommst" + +#: www/index.php:23 +#, php-format +msgid "" +"You get a free anonymous E-Mail address and an XMPP/Jabber account using the " +"same details. Your Jabber ID is user@%1$s and can be connected to directly " +"from clearnet or via Tor hidden service (%2$s)." +msgstr "" +"Du bekommst eine kostenlose, anonymes E-Mail Adresse und ein XMPP/Jabber " +"Konto mit den gleichen Daten. Deine Jabber ID ist user@%1$s und kann direkt " +"über Clearnet zu verbunden werden, oder über den Tor hidden service (%2$s)." + +#: www/index.php:24 +#, php-format +msgid "" +"You will have 50MB of disk space available for your mails. If you need more " +"space, just contact me. Your E-Mail address will be %2$s" +msgstr "" +"Du wirst 50MB Speicherplatz für deine E-Mails haben. Wenn du mehr Speicher " +"brauchst, schreib mir einfach. Deine E-Mail Adresse " +"wird %2$s sein" + +#: www/index.php:25 +msgid "" +"For privacy, please use PGP mail encryption, if you can. This prevents " +"others from reading your mails (including me and/or LEA). GnuPGs official " +"home: https://gnupg.org Windows GUI: https://gpg4usb.org" +msgstr "" +"Für Privatsphäre, nutze bitte PGP Mail Verschlüsselung, wenn du kannst. Dies " +"hindert andere am Lesen deiner E-Mails (inklusive mir und/oder " +"Strafverfolgungsbehörden). Die offizielle GnuPG Seite: https://gnupg.org Windows GUI: https://gpg4usb.org" + +#: www/index.php:26 +msgid "E-Mail Setup" +msgstr "E-Mail Einrichtung" + +#: www/index.php:28 +#, php-format +msgid "SMTP: %s Port 465 (SSL/TLS) or 587 (StartTLS)" +msgstr "SMTP: %s Port 465 (SSL/TLS) oder 587 (StartTLS)" + +#: www/index.php:29 +#, php-format +msgid "IMAP: %s Port 993 (SSL/TLS) or 143 (StartTLS)" +msgstr "IMAP: %s Port 993 (SSL/TLS) oder 143 (StartTLS)" + +#: www/index.php:30 +#, php-format +msgid "POP3: %s Port 995 (SSL/TLS) or 110 (StartTLS)" +msgstr "POP3: %s Port 995 (SSL/TLS) oder 110 (StartTLS)" + +#: www/index.php:31 +msgid "Authentication: PLAIN, LOGIN" +msgstr "Authentifizierung: PLAIN, LOGIN" + +#: www/index.php:33 +#, php-format +msgid "" +"You can also connect on the same ports via the Tor onion address %s, but you " +"will have to accept an SSL certificate only valid for the clearnet domain." +msgstr "" +"Du kannst dich auch mit den gleichen Ports über die Tor Onion-Adresse %s " +"verbinden, aber du wirst ein Zertifikat akzeptieren müssen, welches nur für " +"die Clearnet-Domain gültig ist." + +#: www/index.php:34 +msgid "XMPP setup" +msgstr "XMPP-Einrichtung" + +#: www/index.php:35 +#, php-format +msgid "Domain: %s" +msgstr "Domain: %s" + +#: www/index.php:36 +#, php-format +msgid "Connect server: %s (optional for torification)" +msgstr "Verbindungs-Server: %s (Optional für Torifzierung)" + +#: www/index.php:37 +#, php-format +msgid "File transfer proxy: %s" +msgstr "Datentransfer-Proxy: %s" + +#: www/index.php:38 +#, php-format +msgid "" +"BOSH URL: %s (only enable if you have to, as it is slower than directly " +"using xmpp)" +msgstr "" +"BOSH URL: %s (aktiviere diese nur, wenn du musst, da BOSH langsamer als " +"direktes Nutzen von XMPP ist)" + +#: www/manage_account.php:17 www/admin.php:21 +msgid "It looks like your user no longer exists!" +msgstr "Es sieht so aus, dass dein Nutzer nicht mehr existiert!" + +#: www/manage_account.php:30 +msgid "Wrong 2FA code" +msgstr "Falscher 2FA Code" + +#: www/manage_account.php:38 www/admin.php:33 +msgid "Successfully logged out" +msgstr "Erfolgreich abgemeldet" + +#: www/manage_account.php:43 www/register.php:22 +msgid "Invalid captcha" +msgstr "Ungültiges Captcha" + +#: www/manage_account.php:47 www/admin.php:37 +msgid "Invalid username" +msgstr "Ungültiger Nutzername" + +#: www/manage_account.php:63 www/manage_account.php:81 www/admin.php:43 +#: www/admin.php:55 +msgid "Incorrect username or password" +msgstr "Ungültiger Nutzername oder Passwort" + +#: www/manage_account.php:100 www/admin.php:175 www/admin.php:343 +#: www/register.php:33 +msgid "Passwords empty or don't match" +msgstr "Passwörter leer oder stimmen nicht überein" + +#: www/manage_account.php:105 www/admin.php:348 +msgid "Successfully updated password" +msgstr "Passwort erfolgreich aktualisiert" + +#: www/manage_account.php:108 +msgid "" +"Warning: This will permenently delete your account and all your data. Anyone " +"can immediately register with this user again. It cannot be reversed. Are " +"you absolutely sure?" +msgstr "" +"Warnung: Dies löscht dein Konto und alle deine Daten permanent. Jeder kann " +"direkt mit dem gleichen Nutzer erneut registrieren. Dies kann nicht " +"rückgängig gemacht werden. Bist du absolut sicher?" + +#: www/manage_account.php:110 +msgid "Yes, I want to permanently delete my account" +msgstr "Ja, ich will mein Konto permanent löschen" + +#: www/manage_account.php:112 +msgid "" +"Warning: This will disable your account for a year and delete all your data. " +"After a year it is available for registrations again. It cannot be reversed. " +"Are you absolutely sure?" +msgstr "" +"Warnung: Dies deaktiviert dein Konto für ein Jahr und alle deine Daten " +"werden gelöscht. Nach einem Jahr ist es für die Registrierung wieder " +"verfügbar. Dies kann nicht rückgängig gemacht werden. Bist du absolut sicher?" + +#: www/manage_account.php:114 +msgid "Yes, I want to disable my account" +msgstr "Ja, ich möchte mein Konto deaktivieren" + +#: www/manage_account.php:123 +msgid "Successfully deleted account" +msgstr "Konto erfolgreich gelöscht" + +#: www/manage_account.php:132 +msgid "Successfully disabled account" +msgstr "Konto erfolgreich deaktiviert" + +#: www/manage_account.php:136 +msgid "Successfully removed the key" +msgstr "Schlüssel erfolgreich entfernt" + +#: www/manage_account.php:145 +msgid "There was an error importing the key" +msgstr "Es gab einen Fehler beim Importieren des Schlüssels" + +#: www/manage_account.php:158 +msgid "Successfully imported the key" +msgstr "Schlüssel erfolgreich importiert" + +#: www/manage_account.php:162 +#, php-format +msgid "" +"Oops, looks like the key is missing this email address as user id. Please " +"add your address \"%s\" as user ID to your pgp key or create a new key pair." +msgstr "" +"Ups, sieht so aus, dass dem Schlüssel diese E-Mail Adresse als User-ID " +"fehlt. Bitte füge deine Adresse \"%s\" als User-ID zu deinem PGP-Schlüssel " +"hinzu oder erstelle ein neues Schlüsselpaar." + +#: www/manage_account.php:168 +msgid "Sorry, the code was incorrect" +msgstr "Leider wer der Code falsch" + +#: www/manage_account.php:172 +msgid "Successfully enabled 2FA" +msgstr "2FA erfolgreich aktiviert" + +#: www/manage_account.php:181 www/manage_account.php:191 +msgid "E-Mail and XMPP - Manage account" +msgstr "E-Mail und XMPP - Konto verwalten" + +#: www/manage_account.php:186 www/manage_account.php:192 +msgid "" +"Manage your free and anonymous E-Mail address and an XMPP/Jabber account. " +"Add forwarding addresses, change your password or disable/delete your " +"account." +msgstr "" +"Verwalte deine kostenlose und anonyme E-Mail Adresse und ein XMPP/Jabber " +"Konto. Füge eine Weiterleitungsadresse hinzu, ändere dein Passwort oder " +"deaktiviere/lösche dein Konto." + +#: www/manage_account.php:213 +msgid "" +"To login, please enter the following code to confirm ownership of your key:" +msgstr "" +"Um dich anzumelden, gib bitte folgenden Code zur Bestätigung ein, um den " +"Besitz deines Schlüssels zu bestätigen:" + +#: www/manage_account.php:215 +msgid "" +"To login, please decrypt the following PGP encrypted message and confirm the " +"code:" +msgstr "" +"Um dich anzumelden, entschlüssel bitte die folgende PGP-verschlüsselte " +"Nachricht und bestätige den Code:" + +#: www/manage_account.php:221 www/manage_account.php:370 +msgid "2FA code" +msgstr "2FA Code" + +#: www/manage_account.php:223 www/manage_account.php:372 +msgid "Confirm" +msgstr "Bestätigen" + +#: www/manage_account.php:238 www/admin.php:388 +#, php-format +msgid "Logged in as %s" +msgstr "Angemeldet als %s" + +#: www/manage_account.php:244 www/admin.php:389 +msgid "Logout" +msgstr "Abmelden" + +#: www/manage_account.php:254 www/admin.php:406 www/admin.php:582 +#: www/admin.php:912 www/admin.php:941 www/register.php:101 +msgid "Username" +msgstr "Nutzername" + +#: www/manage_account.php:259 www/manage_account.php:322 www/admin.php:410 +#: www/admin.php:503 www/admin.php:586 www/admin.php:945 www/admin.php:1030 +#: www/register.php:106 +msgid "Password" +msgstr "Passwort" + +#: www/manage_account.php:265 www/admin.php:415 +msgid "Login" +msgstr "Anmelden" + +#: www/manage_account.php:282 +msgid "Settings" +msgstr "Einstellungen" + +#: www/manage_account.php:283 +msgid "Delivery" +msgstr "Zustellung" + +#: www/manage_account.php:284 +msgid "" +"Change how your mail is delivered. You can add forwarding addresses one per " +"line, or comma seperated. When you disable the \"keep a local copy\" " +"checkbox, your mail will only be sent to your forwarding addresses." +msgstr "" +"Ändere wie deine E-Mail zugestellt wird. Du kannst eine " +"Weiterleitungsadresse pro Zeile, oder Komma-separiert, einfügen. Wenn du " +"\"Lokale Kopie behalten\" deaktivierst, wird deine E-Mail nur an die " +"Weiterleitungsadressen gesendet." + +#: www/manage_account.php:287 www/admin.php:953 www/admin.php:994 +msgid "Forward to" +msgstr "Weiterleiten an" + +#: www/manage_account.php:292 www/admin.php:957 www/admin.php:999 +msgid "Keep a local copy" +msgstr "Lokale Kopie behalten" + +#: www/manage_account.php:297 +msgid "Encryption" +msgstr "Verschlüsselung" + +#: www/manage_account.php:298 +msgid "" +"If you are having issues sending or receiving mails with some other " +"provider, you can try disabling forced encryption here. But be aware, that " +"this makes it possible for 3rd parties on the network to read your emails. " +"Make sure to ask your correspondent to demand encryption support from their " +"provider for a safer internet." +msgstr "" +"Wenn du Probleme mit dem E-Mail Versand oder Empfang mit einigen anderen " +"Providern hast, kannst du hier die erzwungene Verschlüsselung deaktivieren. " +"Aber sei dir dabei im klaren, dass es damit für Drittparteien im Netzwerk " +"möglich wird E-Mails mitzulesen. Frage deine Kommunikationspartner in dem " +"Falle, dass sie von ihrem E-Mail Provider Unterstützung für Verschlüsselung, " +"für ein sichereres Internet, einfordern sollen." + +#: www/manage_account.php:300 www/admin.php:964 www/admin.php:1011 +msgid "Enforce encryption for incoming mail" +msgstr "Verschlüsselung für eingehende E-Mails erzwingen" + +#: www/manage_account.php:306 www/admin.php:968 www/admin.php:1016 +msgid "Enforce encryption for outgoing mail" +msgstr "Verschlüsselung für ausgehende E-Mails erzwingen" + +#: www/manage_account.php:313 +msgid "Update settings" +msgstr "Einstellungen aktualisieren" + +#: www/manage_account.php:318 www/manage_account.php:333 www/admin.php:1025 +#: www/admin.php:1041 +msgid "Change password" +msgstr "Passwort ändern" + +#: www/manage_account.php:327 www/admin.php:508 www/admin.php:591 +#: www/admin.php:949 www/admin.php:1035 www/register.php:110 +msgid "Password again" +msgstr "Passwort erneut" + +#: www/manage_account.php:344 +msgid "Yay, PGP based 2FA is enabled!" +msgstr "Yay, PGP basierende 2FA ist aktiviert!" + +#: www/manage_account.php:354 +msgid "" +"Sorry, this key can't be used to encrypt a message to you. Your key may have " +"expired or has been revoked." +msgstr "" +"Tut uns leid, dieser Schlüssel kann nicht verwendet um eine Nachricht an " +"dich zu verschlüsseln. Dein Schlüssel ist vielleicht abgelaufen oder wurde " +"widerrufen." + +#: www/manage_account.php:362 +msgid "" +"To enable 2FA, please enter the following code to confirm ownership of your " +"key:" +msgstr "" +"Um 2FA zu aktivieren, gib bitte folgenden Code ein, um zu bestätigen, dass " +"der Schlüssel dir gehört:" + +#: www/manage_account.php:363 +msgid "Enable 2FA" +msgstr "2FA aktivieren" + +#: www/manage_account.php:364 +msgid "" +"To enable 2FA using your PGP key, please decrypt the following PGP encrypted " +"message and confirm the code:" +msgstr "" +"Um 2FA mit deinem PGP-Schlüssel zu aktivieren, entschlüssle bitte folgende " +"PGP-verschlüsselte Nachricht und bestätige den Code:" + +#: www/manage_account.php:383 +msgid "Add PGP key for 2FA and end-to-end encryption" +msgstr "Füge einen PGP-Schlüssel für 2FA und End-to-End Verschlüsselung hinzu" + +#: www/manage_account.php:388 +msgid "PGP key" +msgstr "PGP-Schlüssel" + +#: www/manage_account.php:393 +msgid "Update PGP key" +msgstr "PGP-Schlüssel aktualisieren" + +#: www/manage_account.php:399 +msgid "Disable/Delete account" +msgstr "Konto deaktivieren/löschen" + +#: www/manage_account.php:400 +msgid "" +"Warning, this is permanent and cannot be undone. Disabling an account will " +"delete your email data from the server, but leave the account blocked in the " +"database for a year, so no one else can use it. Deleting your account will " +"completely wipe all records of it and it will be available for new " +"registrations again." +msgstr "" +"Warnung, dies ist permanent und kann nicht rückgängig gemacht werden. Das " +"Deaktivieren eines Kontos löscht deine Daten vom Server, aber behält das " +"Konto für ein Jahr in der Datenbank blockiert, damit niemand anderes es " +"nutzen kann. Löschen entfernt dein Konto komplett und es ist wieder " +"verfügbar zur Registrierung." + +#: www/manage_account.php:404 +msgid "Disable account" +msgstr "Konto deaktivieren" + +#: www/manage_account.php:409 +msgid "Delete account" +msgstr "Konto löschen" + +#: www/admin.php:72 +#, php-format +msgid "" +"Warning: This will permanently delete the admin account \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" +"Warnung: Dies löscht das Admin-Konto \"%s\" permanent. Dies kann nicht " +"rückgängig gemacht werden. Bist du absolut sicher?" + +#: www/admin.php:75 +msgid "Yes, I want to permanently delete this admin account" +msgstr "Ja, ich will dieses Admin-Konto permanent löschen" + +#: www/admin.php:77 +#, php-format +msgid "" +"Warning: This will permanently delete the domain \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" +"Warnung: Dies löscht die Domain \"%s\" permanent. Dies kann nicht rückgängig " +"gemacht werden. Bist du absolut sicher?" + +#: www/admin.php:80 +msgid "Yes, I want to permanently delete this domain" +msgstr "Ja, ich will diesee Domain permanent löschen" + +#: www/admin.php:82 +#, php-format +msgid "" +"Warning: This will permanently delete the alias domain \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" +"Warnung: Dies löscht das Domain-Alias \"%s\" permanent. Dies kann nicht " +"rückgängig gemacht werden. Bist du absolut sicher?" + +#: www/admin.php:85 +msgid "Yes, I want to permanently delete this alias domain" +msgstr "Ja, ich will dieses Domain-Alias permanent löschen" + +#: www/admin.php:87 +#, php-format +msgid "" +"Warning: This will permanently delete the alias \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" +"Warnung: Dies löscht das Alias \"%s\" permanent. Dies kann nicht rückgängig " +"gemacht werden. Bist du absolut sicher?" + +#: www/admin.php:90 +msgid "Yes, I want to permanently delete this alias" +msgstr "Ja, ich will dieses Alias permanent löschen" + +#: www/admin.php:92 +#, php-format +msgid "" +"Warning: This will permanently delete the mailbox \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" +"Warnung: Dies löscht die Mailbox \"%s\" permanent. Dies kann nicht " +"rückgängig gemacht werden. Bist du absolut sicher?" + +#: www/admin.php:95 +msgid "Yes, I want to permanently delete this mailbox" +msgstr "Ja, ich will diese Mailbox permanent löschen" + +#: www/admin.php:98 +msgid "You can't delete your own admin account!" +msgstr "Du kannst dein eigenes Admin-Konto nicht löschen!" + +#: www/admin.php:102 +msgid "Successfully deleted admin account." +msgstr "Admin-Konto erfolgreich gelöscht." + +#: www/admin.php:107 +msgid "Successfully deleted domain." +msgstr "Domain erfolgreich gelöscht." + +#: www/admin.php:111 +msgid "Successfully deleted alias domain." +msgstr "Alias-Domain erfolgreich gelöscht." + +#: www/admin.php:116 +msgid "Successfully deleted alias." +msgstr "Alias erfolgreich gelöscht." + +#: www/admin.php:122 +msgid "Successfully deleted mailbox." +msgstr "Mailbox erfolgreich gelöscht." + +#: www/admin.php:128 +#, php-format +msgid "Oops, it looks like the admin account \"%s\" doesn't exist." +msgstr "Ups, das Admin-Konto \"%s\" schient nicht zu existieren." + +#: www/admin.php:132 +msgid "Passwords don't match!" +msgstr "Passwörter stimmen nicht überein!" + +#: www/admin.php:137 +msgid "Successfully updated password." +msgstr "Passwort erfolgreich aktualisiert." + +#: www/admin.php:166 +msgid "Successfully edited admin account." +msgstr "Admin-Konto erfolgreich bearbeitet." + +#: www/admin.php:172 +#, php-format +msgid "Oops, it looks like the admin account \"%s\" already exists." +msgstr "Ups, das Admin-Konto \"%s\" schient bereits zu existieren." + +#: www/admin.php:182 +msgid "Successfully created admin account." +msgstr "Admin-Konto erfolgreich erstellt." + +#: www/admin.php:189 +#, php-format +msgid "Oops, it looks like the domain \"%s\" doesn't exists." +msgstr "Ups, die Domain \"%s\" schient nicht zu existieren." + +#: www/admin.php:194 +msgid "Successfully updated domain." +msgstr "Domain erfolgreich aktualisiert." + +#: www/admin.php:200 +#, php-format +msgid "Oops, it looks like the alias domain \"%s\" doesn't exists." +msgstr "Ups, die Alias-Domain \"%s\" schient nicht zu existieren." + +#: www/admin.php:205 +msgid "Successfully updated alias domain." +msgstr "Alias-Domain erfolgreich aktualisiert." + +#: www/admin.php:211 +#, php-format +msgid "Oops, it looks like the domain \"%s\" already exists." +msgstr "Ups, die Domain \"%s\" schient bereits zu existieren." + +#: www/admin.php:222 +msgid "Successfully created domain." +msgstr "Domain erfolgreich erstellt." + +#: www/admin.php:228 +#, php-format +msgid "Oops, it looks like the alias domain \"%s\" already exists." +msgstr "Ups, die Alias-Domain \"%s\" schient bereits zu existieren." + +#: www/admin.php:239 +msgid "Successfully created alias domain." +msgstr "Alias-Domain erfolgreich erstellt." + +#: www/admin.php:252 +#, php-format +msgid "Oops, it looks like the alias \"%s\" already exists." +msgstr "Ups, das Alias \"%s\" schient bereits zu existieren." + +#: www/admin.php:261 +msgid "Successfully added alias." +msgstr "Alias erfolgreich hinzugefügt." + +#: www/admin.php:276 +msgid "Successfully updated alias." +msgstr "Alias erfolgreich aktualisiert." + +#: www/admin.php:298 +msgid "Successfully updated mailbox." +msgstr "Mailbox erfolgreich aktualisiert." + +#: www/admin.php:311 www/register.php:62 +msgid "Sorry, this user already exists" +msgstr "Sorry, dieser Nutzer existiert bereits" + +#: www/admin.php:333 www/register.php:70 +msgid "Successfully created new mailbox!" +msgstr "Neue Mailbox erfolgreich erstellt!" + +#: www/admin.php:359 +msgid "Successfully disabled two-factor authentication" +msgstr "Zwei-Faktor Authentifizierung erfolgreich deaktiviert" + +#: www/admin.php:369 www/admin.php:378 www/admin.php:384 +msgid "E-Mail and XMPP - Admin management" +msgstr "E-Mail und XMPP - Admin Verwaltung" + +#: www/admin.php:373 www/admin.php:379 +msgid "Lets domain owners manage their email domain and user accounts." +msgstr "Lässt Domain-Inhaber ihre E-Mail Domain und Nutzer-Konten verwalten." + +#: www/admin.php:391 +msgid "Manage admins" +msgstr "Admins verwalten" + +#: www/admin.php:392 +msgid "Manage alias domains" +msgstr "Alias-Domains verwalten" + +#: www/admin.php:394 +msgid "Manage your admin account" +msgstr "Verwalte dein Konto" + +#: www/admin.php:396 +msgid "Manage domains" +msgstr "Domains verwalten" + +#: www/admin.php:397 +msgid "Manage aliases" +msgstr "Aliase verwalten" + +#: www/admin.php:398 +msgid "Manage mailboxes" +msgstr "Mailboxen verwalten" + +#: www/admin.php:421 +msgid "" +"Welcome to the admin management interface. You can configure your domain(s) " +"and accounts here. Please select an option from the menu." +msgstr "" +"Wilkommen in der Admin-Verwaltungsoberfläche. Hier kannst du deine Domain(s) " +"und Konten konfigurieren. Bitte wähle eine Option vom Menü." + +#: www/admin.php:453 +msgid "" +"Oops, it looks like the page you tried to access does not exist or you do " +"not have permission to access it." +msgstr "" +"Ups, es scheint dass die Seite, auf die du versucht hast zuzugreifen " +"entweder nicht existiert, oder du keine Berechtigung hast darauf zuzugreifen." + +#: www/admin.php:466 www/admin.php:485 +msgid "Create new admin" +msgstr "Neuen Admin erstellen" + +#: www/admin.php:471 +msgid "Admin" +msgstr "Admin" + +#: www/admin.php:472 www/admin.php:521 www/admin.php:534 www/admin.php:600 +#: www/admin.php:624 www/admin.php:656 www/admin.php:680 www/admin.php:714 +#: www/admin.php:748 www/admin.php:778 www/admin.php:811 www/admin.php:843 +#: www/admin.php:877 www/admin.php:913 www/admin.php:961 www/admin.php:1006 +msgid "Active" +msgstr "Aktiv" + +#: www/admin.php:473 www/admin.php:625 www/admin.php:715 www/admin.php:812 +#: www/admin.php:914 +msgid "Last modified" +msgstr "Zuletzt geändert" + +#: www/admin.php:474 +msgid "Edit account" +msgstr "Konto bearbeiten" + +#: www/admin.php:482 www/admin.php:636 www/admin.php:724 www/admin.php:821 +#: www/admin.php:927 +msgid "Edit" +msgstr "Bearbeiten" + +#: www/admin.php:497 +#, php-format +msgid "Edit admin account %s" +msgstr "Adminkonto %s bearbeiten" + +#: www/admin.php:515 www/admin.php:528 www/admin.php:596 +msgid "Superadmin" +msgstr "Superadmin" + +#: www/admin.php:517 www/admin.php:529 www/admin.php:597 +msgid "Superadmins can manage other admins" +msgstr "Superadmins können andere Admins verwalten" + +#: www/admin.php:538 +msgid "Managed domains" +msgstr "Domains verwalten" + +#: www/admin.php:558 www/admin.php:685 www/admin.php:783 www/admin.php:886 +msgid "Save changes" +msgstr "Änderungen speichern" + +#: www/admin.php:564 +msgid "Delete admin" +msgstr "Admin löschen" + +#: www/admin.php:571 www/admin.php:696 +msgid "Oops, this admin doesn't seem to exist." +msgstr "Ups, dieser Admin scheint nicht zu existieren." + +#: www/admin.php:578 +msgid "Create new admin account" +msgstr "Neues Admin-Konto erstellen" + +#: www/admin.php:604 +msgid "Add admin" +msgstr "Admin hinzufügen" + +#: www/admin.php:617 www/admin.php:640 www/admin.php:648 +msgid "Create new domain" +msgstr "Neue Domain erstellen" + +#: www/admin.php:623 www/admin.php:652 +msgid "Domain" +msgstr "Domain" + +#: www/admin.php:626 +msgid "Edit domain" +msgstr "Domain bearbeiten" + +#: www/admin.php:660 +msgid "Add domain" +msgstr "Domain hinzufügen" + +#: www/admin.php:674 +#, php-format +msgid "Edit domain %s" +msgstr "Domain %s bearbeiten" + +#: www/admin.php:690 +msgid "Delete domain" +msgstr "Domain löschen" + +#: www/admin.php:706 www/admin.php:728 www/admin.php:736 +msgid "Create new alias domain" +msgstr "Neue Alias-Domain erstellen" + +#: www/admin.php:712 www/admin.php:740 +msgid "Alias Domain" +msgstr "Alias-Domain" + +#: www/admin.php:713 www/admin.php:744 www/admin.php:772 +msgid "Target Domain" +msgstr "Ziel-Domain" + +#: www/admin.php:716 +msgid "Edit alias domain" +msgstr "Alias-Domain bearbeiten" + +#: www/admin.php:752 +msgid "Add alias domain" +msgstr "Alias-Domain hinzufügen" + +#: www/admin.php:766 +#, php-format +msgid "Edit alias domain %s" +msgstr "Alias-Domain %s bearbeiten" + +#: www/admin.php:788 +msgid "Delete alias domain" +msgstr "Alias-Domain löschen" + +#: www/admin.php:794 +msgid "Oops, this alias domain doesn't seem to exist." +msgstr "Ups, diese Alias-Domain schient nicht zu existieren." + +#: www/admin.php:804 www/admin.php:824 www/admin.php:831 +msgid "Create new alias" +msgstr "Neuen Alias erstellen" + +#: www/admin.php:809 www/admin.php:835 +msgid "Alias" +msgstr "Alias" + +#: www/admin.php:810 www/admin.php:839 www/admin.php:870 +msgid "Target" +msgstr "Ziel" + +#: www/admin.php:813 +msgid "Edit alias" +msgstr "Alias bearbeiten" + +#: www/admin.php:846 www/admin.php:882 +msgid "Enforce encryption" +msgstr "Verschlüsselung erzwingen" + +#: www/admin.php:851 +msgid "Add alias" +msgstr "Alias hinzufügen" + +#: www/admin.php:865 +#, php-format +msgid "Edit alias %s" +msgstr "Alias %s bearbeiten" + +#: www/admin.php:891 +msgid "Delete alias" +msgstr "Alias löschen" + +#: www/admin.php:897 +msgid "Oops, this alias doesn't seem to exist." +msgstr "Ups, dieses Alias schient nicht zu existieren." + +#: www/admin.php:907 www/admin.php:930 www/admin.php:937 +msgid "Create new mailbox" +msgstr "Neue Mailbox erstellen" + +#: www/admin.php:915 +msgid "Edit mailbox" +msgstr "Mailbox bearbeiten" + +#: www/admin.php:973 +msgid "Add mailbox" +msgstr "Mailbox hinzufügen" + +#: www/admin.php:989 +#, php-format +msgid "Edit mailbox %s" +msgstr "Mailbox %s bearbeiten" + +#: www/admin.php:1021 +msgid "Save mailbox" +msgstr "Mailbox speichern" + +#: www/admin.php:1045 +msgid "Delete mailbox / Disable two-factor authentication" +msgstr "Mailbox löschen / Zwei-Faktor Autorisierung deaktivieren" + +#: www/admin.php:1051 +msgid "Disable two-factor authentication" +msgstr "Zwei-Faktor Autorisierung deaktivieren" + +#: www/admin.php:1056 +msgid "Delete mailbox" +msgstr "Mailbox löschen" + +#: www/admin.php:1062 +msgid "Oops, this mailbox doesn't seem to exist." +msgstr "Ups, diese Mailbox schient nicht zu existieren." + +#: www/register.php:18 +msgid "Invalid CSRF token" +msgstr "Ungültiger CSRF Token" + +#: www/register.php:27 +msgid "Invalid username. It may not contain a +, ', \" or /." +msgstr "Ungültiger Nutzername. Dieser darf keine +, ', \" oder / enthalten." + +#: www/register.php:44 +msgid "The domain you specified is not allowed" +msgstr "Die angegebene Domain ist nicht erlaubt" + +#: www/register.php:49 +msgid "The email address you specified is not valid" +msgstr "Deine angegebene E-Mail Adresse ist nicht gültig" + +#: www/register.php:52 +msgid "The username you specified is reserved" +msgstr "Dein eingegebener Nutzername ist reserviert" + +#: www/register.php:78 www/register.php:87 +msgid "E-Mail and XMPP - Register" +msgstr "E-Mail und XMPP - Registreiren" + +#: www/register.php:82 www/register.php:88 +msgid "" +"Register for a free and anonymous E-Mail address and an XMPP/Jabber account" +msgstr "" +"Registriere dich für eine kostenloses und anonyme E-Mail Adresse und ein " +"XMPP/Jabber Konto" + +#: www/register.php:114 +#, php-format +msgid "" +"I have read and agreed to the Privacy " +"Policy" +msgstr "" +"Ich habe die Datenschutzerklärung " +"gelesen und akzeptiere diese" + +#: cron.php:11 common_config.php:87 setup.php:20 setup.php:23 +msgid "No Connection to MySQL database!" +msgstr "Keine Verbindung zur MySQL Datenbank!" + +#: tools/delete_leftover_files.php:14 +#, php-format +msgid "" +"%s does not seem to have any accounts, but has a directory. Consider " +"deleting it." +msgstr "" +"%s scheint keine Konten zu haben, aber ein Verzeichnis. Denk darüber nach es " +"zu löschen." + +#: tools/delete_leftover_files.php:20 +#, php-format +msgid "Deleted: %s" +msgstr "Gelöscht: %s" + +#: tools/delete_leftover_files.php:22 +#, php-format +msgid "File found in mail directory location: \"%s\". Consider deleting it." +msgstr "" +"Datei im Mailverzeichnis \"%s\" gefunden. Denke darüber nach diese zu " +"löschen." + +#: common_config.php:136 +msgid "Copy:" +msgstr "Kopieren:" + +#: common_config.php:255 +#, php-format +msgid "" +"Oops, the email \"%s\" doesn' look like a valid email address and thus " +"wasn't added to the forwarding list." +msgstr "" +"Ups, die E-Mail \"%s\" sieht nicht nach einer gültigen E-Mail Adresse aus " +"und wurde deshalb nicht zur Weiterleitungsliste hinzugefügt." + +#: common_config.php:281 +msgid "You are not allowed to manage this domain." +msgstr "Du darfst diese Domain nicht verwalten." + +#: common_config.php:292 +msgid "Invalid email address." +msgstr "Ungültige E-Mail Adresse." + +#: setup.php:8 +#, php-format +msgid "The %s extension of PHP is required. Please install it first." +msgstr "Die %s PHP-Erweiterung wird benötigt. Bitte installiere diese zuerst." + +#: setup.php:35 +msgid "Database has successfully been updated." +msgstr "Datenbank wurde erfolgreich aktualisiert." + +#: setup.php:37 +msgid "Database is already up-to-date." +msgstr "Datenbank ist bereits aktuell." + +#: setup.php:40 +msgid "Error updating database:" +msgstr "Fehler beim Aktualisieren der Datenbank:" + +#: setup.php:57 +msgid "Database has successfully been set up." +msgstr "Datenbank wurde erfolgreich erstellt." + +#: setup.php:59 +msgid "Error setting up database:" +msgstr "Fehler beim Erstellen der Datenbank:" + +#~ msgid "Invalid username." +#~ msgstr "Ungültiger Nutzername" diff --git a/locale/mail-hosting.pot b/locale/mail-hosting.pot new file mode 100644 index 0000000..a6f3794 --- /dev/null +++ b/locale/mail-hosting.pot @@ -0,0 +1,906 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-31 21:17+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: www/index.php:6 www/index.php:15 +msgid "E-Mail and XMPP" +msgstr "" + +#: www/index.php:10 www/index.php:16 +msgid "Get a free and anonymous E-Mail address and an XMPP/Jabber account" +msgstr "" + +#: www/index.php:21 www/manage_account.php:236 www/register.php:94 +msgid "Info" +msgstr "" + +#: www/index.php:21 www/manage_account.php:240 www/register.php:94 +#: www/register.php:121 +msgid "Register" +msgstr "" + +#: www/index.php:21 www/manage_account.php:241 www/register.php:94 +msgid "Webmail-Login" +msgstr "" + +#: www/index.php:21 www/register.php:95 +msgid "Manage account" +msgstr "" + +#: www/index.php:21 www/manage_account.php:247 www/register.php:95 +msgid "Web-XMPP" +msgstr "" + +#: www/index.php:22 +msgid "What you will get" +msgstr "" + +#: www/index.php:23 +#, php-format +msgid "" +"You get a free anonymous E-Mail address and an XMPP/Jabber account using the " +"same details. Your Jabber ID is user@%1$s and can be connected to directly " +"from clearnet or via Tor hidden service (%2$s)." +msgstr "" + +#: www/index.php:24 +#, php-format +msgid "" +"You will have 50MB of disk space available for your mails. If you need more " +"space, just contact me. Your E-Mail address will be %2$s" +msgstr "" + +#: www/index.php:25 +msgid "" +"For privacy, please use PGP mail encryption, if you can. This prevents " +"others from reading your mails (including me and/or LEA). GnuPGs official " +"home: https://gnupg.org Windows GUI: https://gpg4usb.org" +msgstr "" + +#: www/index.php:26 +msgid "E-Mail Setup" +msgstr "" + +#: www/index.php:28 +#, php-format +msgid "SMTP: %s Port 465 (SSL/TLS) or 587 (StartTLS)" +msgstr "" + +#: www/index.php:29 +#, php-format +msgid "IMAP: %s Port 993 (SSL/TLS) or 143 (StartTLS)" +msgstr "" + +#: www/index.php:30 +#, php-format +msgid "POP3: %s Port 995 (SSL/TLS) or 110 (StartTLS)" +msgstr "" + +#: www/index.php:31 +msgid "Authentication: PLAIN, LOGIN" +msgstr "" + +#: www/index.php:33 +#, php-format +msgid "" +"You can also connect on the same ports via the Tor onion address %s, but you " +"will have to accept an SSL certificate only valid for the clearnet domain." +msgstr "" + +#: www/index.php:34 +msgid "XMPP setup" +msgstr "" + +#: www/index.php:35 +#, php-format +msgid "Domain: %s" +msgstr "" + +#: www/index.php:36 +#, php-format +msgid "Connect server: %s (optional for torification)" +msgstr "" + +#: www/index.php:37 +#, php-format +msgid "File transfer proxy: %s" +msgstr "" + +#: www/index.php:38 +#, php-format +msgid "" +"BOSH URL: %s (only enable if you have to, as it is slower than directly " +"using xmpp)" +msgstr "" + +#: www/manage_account.php:17 www/admin.php:21 +msgid "It looks like your user no longer exists!" +msgstr "" + +#: www/manage_account.php:30 +msgid "Wrong 2FA code" +msgstr "" + +#: www/manage_account.php:38 www/admin.php:33 +msgid "Successfully logged out" +msgstr "" + +#: www/manage_account.php:43 www/register.php:22 +msgid "Invalid captcha" +msgstr "" + +#: www/manage_account.php:47 www/admin.php:37 +msgid "Invalid username" +msgstr "" + +#: www/manage_account.php:63 www/manage_account.php:81 www/admin.php:43 +#: www/admin.php:55 +msgid "Incorrect username or password" +msgstr "" + +#: www/manage_account.php:100 www/admin.php:175 www/admin.php:343 +#: www/register.php:33 +msgid "Passwords empty or don't match" +msgstr "" + +#: www/manage_account.php:105 www/admin.php:348 +msgid "Successfully updated password" +msgstr "" + +#: www/manage_account.php:108 +msgid "" +"Warning: This will permenently delete your account and all your data. Anyone " +"can immediately register with this user again. It cannot be reversed. Are " +"you absolutely sure?" +msgstr "" + +#: www/manage_account.php:110 +msgid "Yes, I want to permanently delete my account" +msgstr "" + +#: www/manage_account.php:112 +msgid "" +"Warning: This will disable your account for a year and delete all your data. " +"After a year it is available for registrations again. It cannot be reversed. " +"Are you absolutely sure?" +msgstr "" + +#: www/manage_account.php:114 +msgid "Yes, I want to disable my account" +msgstr "" + +#: www/manage_account.php:123 +msgid "Successfully deleted account" +msgstr "" + +#: www/manage_account.php:132 +msgid "Successfully disabled account" +msgstr "" + +#: www/manage_account.php:136 +msgid "Successfully removed the key" +msgstr "" + +#: www/manage_account.php:145 +msgid "There was an error importing the key" +msgstr "" + +#: www/manage_account.php:158 +msgid "Successfully imported the key" +msgstr "" + +#: www/manage_account.php:162 +#, php-format +msgid "" +"Oops, looks like the key is missing this email address as user id. Please " +"add your address \"%s\" as user ID to your pgp key or create a new key pair." +msgstr "" + +#: www/manage_account.php:168 +msgid "Sorry, the code was incorrect" +msgstr "" + +#: www/manage_account.php:172 +msgid "Successfully enabled 2FA" +msgstr "" + +#: www/manage_account.php:181 www/manage_account.php:191 +msgid "E-Mail and XMPP - Manage account" +msgstr "" + +#: www/manage_account.php:186 www/manage_account.php:192 +msgid "" +"Manage your free and anonymous E-Mail address and an XMPP/Jabber account. " +"Add forwarding addresses, change your password or disable/delete your " +"account." +msgstr "" + +#: www/manage_account.php:213 +msgid "" +"To login, please enter the following code to confirm ownership of your key:" +msgstr "" + +#: www/manage_account.php:215 +msgid "" +"To login, please decrypt the following PGP encrypted message and confirm the " +"code:" +msgstr "" + +#: www/manage_account.php:221 www/manage_account.php:370 +msgid "2FA code" +msgstr "" + +#: www/manage_account.php:223 www/manage_account.php:372 +msgid "Confirm" +msgstr "" + +#: www/manage_account.php:238 www/admin.php:388 +#, php-format +msgid "Logged in as %s" +msgstr "" + +#: www/manage_account.php:244 www/admin.php:389 +msgid "Logout" +msgstr "" + +#: www/manage_account.php:254 www/admin.php:406 www/admin.php:582 +#: www/admin.php:912 www/admin.php:941 www/register.php:101 +msgid "Username" +msgstr "" + +#: www/manage_account.php:259 www/manage_account.php:322 www/admin.php:410 +#: www/admin.php:503 www/admin.php:586 www/admin.php:945 www/admin.php:1030 +#: www/register.php:106 +msgid "Password" +msgstr "" + +#: www/manage_account.php:265 www/admin.php:415 +msgid "Login" +msgstr "" + +#: www/manage_account.php:282 +msgid "Settings" +msgstr "" + +#: www/manage_account.php:283 +msgid "Delivery" +msgstr "" + +#: www/manage_account.php:284 +msgid "" +"Change how your mail is delivered. You can add forwarding addresses one per " +"line, or comma seperated. When you disable the \"keep a local copy\" " +"checkbox, your mail will only be sent to your forwarding addresses." +msgstr "" + +#: www/manage_account.php:287 www/admin.php:953 www/admin.php:994 +msgid "Forward to" +msgstr "" + +#: www/manage_account.php:292 www/admin.php:957 www/admin.php:999 +msgid "Keep a local copy" +msgstr "" + +#: www/manage_account.php:297 +msgid "Encryption" +msgstr "" + +#: www/manage_account.php:298 +msgid "" +"If you are having issues sending or receiving mails with some other " +"provider, you can try disabling forced encryption here. But be aware, that " +"this makes it possible for 3rd parties on the network to read your emails. " +"Make sure to ask your correspondent to demand encryption support from their " +"provider for a safer internet." +msgstr "" + +#: www/manage_account.php:300 www/admin.php:964 www/admin.php:1011 +msgid "Enforce encryption for incoming mail" +msgstr "" + +#: www/manage_account.php:306 www/admin.php:968 www/admin.php:1016 +msgid "Enforce encryption for outgoing mail" +msgstr "" + +#: www/manage_account.php:313 +msgid "Update settings" +msgstr "" + +#: www/manage_account.php:318 www/manage_account.php:333 www/admin.php:1025 +#: www/admin.php:1041 +msgid "Change password" +msgstr "" + +#: www/manage_account.php:327 www/admin.php:508 www/admin.php:591 +#: www/admin.php:949 www/admin.php:1035 www/register.php:110 +msgid "Password again" +msgstr "" + +#: www/manage_account.php:344 +msgid "Yay, PGP based 2FA is enabled!" +msgstr "" + +#: www/manage_account.php:354 +msgid "" +"Sorry, this key can't be used to encrypt a message to you. Your key may have " +"expired or has been revoked." +msgstr "" + +#: www/manage_account.php:362 +msgid "" +"To enable 2FA, please enter the following code to confirm ownership of your " +"key:" +msgstr "" + +#: www/manage_account.php:363 +msgid "Enable 2FA" +msgstr "" + +#: www/manage_account.php:364 +msgid "" +"To enable 2FA using your PGP key, please decrypt the following PGP encrypted " +"message and confirm the code:" +msgstr "" + +#: www/manage_account.php:383 +msgid "Add PGP key for 2FA and end-to-end encryption" +msgstr "" + +#: www/manage_account.php:388 +msgid "PGP key" +msgstr "" + +#: www/manage_account.php:393 +msgid "Update PGP key" +msgstr "" + +#: www/manage_account.php:399 +msgid "Disable/Delete account" +msgstr "" + +#: www/manage_account.php:400 +msgid "" +"Warning, this is permanent and cannot be undone. Disabling an account will " +"delete your email data from the server, but leave the account blocked in the " +"database for a year, so no one else can use it. Deleting your account will " +"completely wipe all records of it and it will be available for new " +"registrations again." +msgstr "" + +#: www/manage_account.php:404 +msgid "Disable account" +msgstr "" + +#: www/manage_account.php:409 +msgid "Delete account" +msgstr "" + +#: www/admin.php:72 +#, php-format +msgid "" +"Warning: This will permanently delete the admin account \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" + +#: www/admin.php:75 +msgid "Yes, I want to permanently delete this admin account" +msgstr "" + +#: www/admin.php:77 +#, php-format +msgid "" +"Warning: This will permanently delete the domain \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" + +#: www/admin.php:80 +msgid "Yes, I want to permanently delete this domain" +msgstr "" + +#: www/admin.php:82 +#, php-format +msgid "" +"Warning: This will permanently delete the alias domain \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" + +#: www/admin.php:85 +msgid "Yes, I want to permanently delete this alias domain" +msgstr "" + +#: www/admin.php:87 +#, php-format +msgid "" +"Warning: This will permanently delete the alias \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" + +#: www/admin.php:90 +msgid "Yes, I want to permanently delete this alias" +msgstr "" + +#: www/admin.php:92 +#, php-format +msgid "" +"Warning: This will permanently delete the mailbox \"%s\". It cannot be " +"reversed. Are you absolutely sure?" +msgstr "" + +#: www/admin.php:95 +msgid "Yes, I want to permanently delete this mailbox" +msgstr "" + +#: www/admin.php:98 +msgid "You can't delete your own admin account!" +msgstr "" + +#: www/admin.php:102 +msgid "Successfully deleted admin account." +msgstr "" + +#: www/admin.php:107 +msgid "Successfully deleted domain." +msgstr "" + +#: www/admin.php:111 +msgid "Successfully deleted alias domain." +msgstr "" + +#: www/admin.php:116 +msgid "Successfully deleted alias." +msgstr "" + +#: www/admin.php:122 +msgid "Successfully deleted mailbox." +msgstr "" + +#: www/admin.php:128 +#, php-format +msgid "Oops, it looks like the admin account \"%s\" doesn't exist." +msgstr "" + +#: www/admin.php:132 +msgid "Passwords don't match!" +msgstr "" + +#: www/admin.php:137 +msgid "Successfully updated password." +msgstr "" + +#: www/admin.php:166 +msgid "Successfully edited admin account." +msgstr "" + +#: www/admin.php:172 +#, php-format +msgid "Oops, it looks like the admin account \"%s\" already exists." +msgstr "" + +#: www/admin.php:182 +msgid "Successfully created admin account." +msgstr "" + +#: www/admin.php:189 +#, php-format +msgid "Oops, it looks like the domain \"%s\" doesn't exists." +msgstr "" + +#: www/admin.php:194 +msgid "Successfully updated domain." +msgstr "" + +#: www/admin.php:200 +#, php-format +msgid "Oops, it looks like the alias domain \"%s\" doesn't exists." +msgstr "" + +#: www/admin.php:205 +msgid "Successfully updated alias domain." +msgstr "" + +#: www/admin.php:211 +#, php-format +msgid "Oops, it looks like the domain \"%s\" already exists." +msgstr "" + +#: www/admin.php:222 +msgid "Successfully created domain." +msgstr "" + +#: www/admin.php:228 +#, php-format +msgid "Oops, it looks like the alias domain \"%s\" already exists." +msgstr "" + +#: www/admin.php:239 +msgid "Successfully created alias domain." +msgstr "" + +#: www/admin.php:252 +#, php-format +msgid "Oops, it looks like the alias \"%s\" already exists." +msgstr "" + +#: www/admin.php:261 +msgid "Successfully added alias." +msgstr "" + +#: www/admin.php:276 +msgid "Successfully updated alias." +msgstr "" + +#: www/admin.php:298 +msgid "Successfully updated mailbox." +msgstr "" + +#: www/admin.php:311 www/register.php:62 +msgid "Sorry, this user already exists" +msgstr "" + +#: www/admin.php:333 www/register.php:70 +msgid "Successfully created new mailbox!" +msgstr "" + +#: www/admin.php:359 +msgid "Successfully disabled two-factor authentication" +msgstr "" + +#: www/admin.php:369 www/admin.php:378 www/admin.php:384 +msgid "E-Mail and XMPP - Admin management" +msgstr "" + +#: www/admin.php:373 www/admin.php:379 +msgid "Lets domain owners manage their email domain and user accounts." +msgstr "" + +#: www/admin.php:391 +msgid "Manage admins" +msgstr "" + +#: www/admin.php:392 +msgid "Manage alias domains" +msgstr "" + +#: www/admin.php:394 +msgid "Manage your admin account" +msgstr "" + +#: www/admin.php:396 +msgid "Manage domains" +msgstr "" + +#: www/admin.php:397 +msgid "Manage aliases" +msgstr "" + +#: www/admin.php:398 +msgid "Manage mailboxes" +msgstr "" + +#: www/admin.php:421 +msgid "" +"Welcome to the admin management interface. You can configure your domain(s) " +"and accounts here. Please select an option from the menu." +msgstr "" + +#: www/admin.php:453 +msgid "" +"Oops, it looks like the page you tried to access does not exist or you do " +"not have permission to access it." +msgstr "" + +#: www/admin.php:466 www/admin.php:485 +msgid "Create new admin" +msgstr "" + +#: www/admin.php:471 +msgid "Admin" +msgstr "" + +#: www/admin.php:472 www/admin.php:521 www/admin.php:534 www/admin.php:600 +#: www/admin.php:624 www/admin.php:656 www/admin.php:680 www/admin.php:714 +#: www/admin.php:748 www/admin.php:778 www/admin.php:811 www/admin.php:843 +#: www/admin.php:877 www/admin.php:913 www/admin.php:961 www/admin.php:1006 +msgid "Active" +msgstr "" + +#: www/admin.php:473 www/admin.php:625 www/admin.php:715 www/admin.php:812 +#: www/admin.php:914 +msgid "Last modified" +msgstr "" + +#: www/admin.php:474 +msgid "Edit account" +msgstr "" + +#: www/admin.php:482 www/admin.php:636 www/admin.php:724 www/admin.php:821 +#: www/admin.php:927 +msgid "Edit" +msgstr "" + +#: www/admin.php:497 +#, php-format +msgid "Edit admin account %s" +msgstr "" + +#: www/admin.php:515 www/admin.php:528 www/admin.php:596 +msgid "Superadmin" +msgstr "" + +#: www/admin.php:517 www/admin.php:529 www/admin.php:597 +msgid "Superadmins can manage other admins" +msgstr "" + +#: www/admin.php:538 +msgid "Managed domains" +msgstr "" + +#: www/admin.php:558 www/admin.php:685 www/admin.php:783 www/admin.php:886 +msgid "Save changes" +msgstr "" + +#: www/admin.php:564 +msgid "Delete admin" +msgstr "" + +#: www/admin.php:571 www/admin.php:696 +msgid "Oops, this admin doesn't seem to exist." +msgstr "" + +#: www/admin.php:578 +msgid "Create new admin account" +msgstr "" + +#: www/admin.php:604 +msgid "Add admin" +msgstr "" + +#: www/admin.php:617 www/admin.php:640 www/admin.php:648 +msgid "Create new domain" +msgstr "" + +#: www/admin.php:623 www/admin.php:652 +msgid "Domain" +msgstr "" + +#: www/admin.php:626 +msgid "Edit domain" +msgstr "" + +#: www/admin.php:660 +msgid "Add domain" +msgstr "" + +#: www/admin.php:674 +#, php-format +msgid "Edit domain %s" +msgstr "" + +#: www/admin.php:690 +msgid "Delete domain" +msgstr "" + +#: www/admin.php:706 www/admin.php:728 www/admin.php:736 +msgid "Create new alias domain" +msgstr "" + +#: www/admin.php:712 www/admin.php:740 +msgid "Alias Domain" +msgstr "" + +#: www/admin.php:713 www/admin.php:744 www/admin.php:772 +msgid "Target Domain" +msgstr "" + +#: www/admin.php:716 +msgid "Edit alias domain" +msgstr "" + +#: www/admin.php:752 +msgid "Add alias domain" +msgstr "" + +#: www/admin.php:766 +#, php-format +msgid "Edit alias domain %s" +msgstr "" + +#: www/admin.php:788 +msgid "Delete alias domain" +msgstr "" + +#: www/admin.php:794 +msgid "Oops, this alias domain doesn't seem to exist." +msgstr "" + +#: www/admin.php:804 www/admin.php:824 www/admin.php:831 +msgid "Create new alias" +msgstr "" + +#: www/admin.php:809 www/admin.php:835 +msgid "Alias" +msgstr "" + +#: www/admin.php:810 www/admin.php:839 www/admin.php:870 +msgid "Target" +msgstr "" + +#: www/admin.php:813 +msgid "Edit alias" +msgstr "" + +#: www/admin.php:846 www/admin.php:882 +msgid "Enforce encryption" +msgstr "" + +#: www/admin.php:851 +msgid "Add alias" +msgstr "" + +#: www/admin.php:865 +#, php-format +msgid "Edit alias %s" +msgstr "" + +#: www/admin.php:891 +msgid "Delete alias" +msgstr "" + +#: www/admin.php:897 +msgid "Oops, this alias doesn't seem to exist." +msgstr "" + +#: www/admin.php:907 www/admin.php:930 www/admin.php:937 +msgid "Create new mailbox" +msgstr "" + +#: www/admin.php:915 +msgid "Edit mailbox" +msgstr "" + +#: www/admin.php:973 +msgid "Add mailbox" +msgstr "" + +#: www/admin.php:989 +#, php-format +msgid "Edit mailbox %s" +msgstr "" + +#: www/admin.php:1021 +msgid "Save mailbox" +msgstr "" + +#: www/admin.php:1045 +msgid "Delete mailbox / Disable two-factor authentication" +msgstr "" + +#: www/admin.php:1051 +msgid "Disable two-factor authentication" +msgstr "" + +#: www/admin.php:1056 +msgid "Delete mailbox" +msgstr "" + +#: www/admin.php:1062 +msgid "Oops, this mailbox doesn't seem to exist." +msgstr "" + +#: www/register.php:18 +msgid "Invalid CSRF token" +msgstr "" + +#: www/register.php:27 +msgid "Invalid username. It may not contain a +, ', \" or /." +msgstr "" + +#: www/register.php:44 +msgid "The domain you specified is not allowed" +msgstr "" + +#: www/register.php:49 +msgid "The email address you specified is not valid" +msgstr "" + +#: www/register.php:52 +msgid "The username you specified is reserved" +msgstr "" + +#: www/register.php:78 www/register.php:87 +msgid "E-Mail and XMPP - Register" +msgstr "" + +#: www/register.php:82 www/register.php:88 +msgid "" +"Register for a free and anonymous E-Mail address and an XMPP/Jabber account" +msgstr "" + +#: www/register.php:114 +#, php-format +msgid "" +"I have read and agreed to the Privacy " +"Policy" +msgstr "" + +#: cron.php:11 common_config.php:87 setup.php:20 setup.php:23 +msgid "No Connection to MySQL database!" +msgstr "" + +#: tools/delete_leftover_files.php:14 +#, php-format +msgid "" +"%s does not seem to have any accounts, but has a directory. Consider " +"deleting it." +msgstr "" + +#: tools/delete_leftover_files.php:20 +#, php-format +msgid "Deleted: %s" +msgstr "" + +#: tools/delete_leftover_files.php:22 +#, php-format +msgid "File found in mail directory location: \"%s\". Consider deleting it." +msgstr "" + +#: common_config.php:136 +msgid "Copy:" +msgstr "" + +#: common_config.php:255 +#, php-format +msgid "" +"Oops, the email \"%s\" doesn' look like a valid email address and thus " +"wasn't added to the forwarding list." +msgstr "" + +#: common_config.php:281 +msgid "You are not allowed to manage this domain." +msgstr "" + +#: common_config.php:292 +msgid "Invalid email address." +msgstr "" + +#: setup.php:8 +#, php-format +msgid "The %s extension of PHP is required. Please install it first." +msgstr "" + +#: setup.php:35 +msgid "Database has successfully been updated." +msgstr "" + +#: setup.php:37 +msgid "Database is already up-to-date." +msgstr "" + +#: setup.php:40 +msgid "Error updating database:" +msgstr "" + +#: setup.php:57 +msgid "Database has successfully been set up." +msgstr "" + +#: setup.php:59 +msgid "Error setting up database:" +msgstr "" diff --git a/setup.php b/setup.php index 0208ef7..3200494 100644 --- a/setup.php +++ b/setup.php @@ -1,21 +1,26 @@ PDO::ERRMODE_EXCEPTION]); -}catch(PDOException $e){ +}catch(PDOException){ try{ //Attempt to create database $db=new PDO('mysql:host=' . DBHOST . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]); if(false!==$db->exec('CREATE DATABASE ' . DBNAME)){ $db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]); }else{ - die("Error: No database connection!\n"); + die( _('No Connection to MySQL database!') . PHP_EOL); } - }catch(PDOException $e){ - die("Error: No database connection!\n"); + }catch(PDOException){ + die( _('No Connection to MySQL database!') . PHP_EOL); } } try{ @@ -27,13 +32,13 @@ try{ $stmt->execute([DBVERSION]); $db->commit(); if($version < DBVERSION){ - echo "Database has successfully been updated.\n"; + echo _('Database has successfully been updated.') . PHP_EOL; } else { - echo "Database is already up-to-date.\n"; + echo _('Database is already up-to-date.') . PHP_EOL; } } catch(PDOException $e){ - echo "Error updating database:\n"; - echo $e->getMessage() . "\n"; + echo _('Error updating database:') . PHP_EOL; + echo $e->getMessage() . PHP_EOL; $db->rollBack(); } } catch(PDOException){ @@ -49,9 +54,9 @@ try{ $db->exec('CREATE TABLE settings (setting varchar(50) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL PRIMARY KEY, value text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;'); $stmt=$db->prepare("INSERT INTO settings (setting, value) VALUES ('version', ?);"); $stmt->execute([DBVERSION]); - echo "Database has successfully been set up.\n"; + echo _('Database has successfully been set up.') . PHP_EOL; } catch(PDOException $e){ - echo "Error setting up database:\n"; - echo $e->getMessage() . "\n"; + echo _('Error setting up database:') . PHP_EOL; + echo $e->getMessage() . PHP_EOL; } } diff --git a/tools/delete_leftover_files.php b/tools/delete_leftover_files.php index fec4722..43047bf 100644 --- a/tools/delete_leftover_files.php +++ b/tools/delete_leftover_files.php @@ -11,15 +11,15 @@ $dirs = []; foreach ( $domains as $domain ) { if ( is_dir( '/var/mail/vmail/' . basename( $domain ) ) ) { if ( ! isset( $mailboxes[ $domain ] ) ) { - echo "$domain does not seem to have any accounts, but has a directory. Consider deleting it.\n"; + echo sprintf(_('%s does not seem to have any accounts, but has a directory. Consider deleting it.'), $domain).PHP_EOL; } else { $accounts = array_diff( scandir( '/var/mail/vmail/' . basename( $domain ) ), array( '..', '.' ) ); foreach ( $accounts as $account ) { if ( ! isset( $mailboxes[ $domain ][ $account ] ) && is_dir( '/var/mail/vmail/' . basename( $domain ) . '/' . basename( $account ) ) ) { exec( 'rm -r ' . escapeshellarg('/var/mail/vmail/' . basename( $domain ) . '/' . basename( $account ))); - echo "Deleted: /var/mail/vmail/" . basename( $domain ) . '/' . basename( $account ) . "\n"; + echo sprintf(_('Deleted: %s'), '/var/mail/vmail/' . basename( $domain ) . '/' . basename( $account )) . PHP_EOL; } elseif( is_file('/var/mail/vmail/' . basename( $domain ) . '/' . basename( $account ))){ - echo 'File found in mail directory location: "/var/mail/vmail/' . basename( $domain ) . '/' . basename( $account ) . "\". Consider deleting it.\n"; + echo sprintf(_('File found in mail directory location: "%s". Consider deleting it.'), '/var/mail/vmail/'. basename( $domain ) . '/' . basename( $account ) ) . PHP_EOL; } } } diff --git a/update-translation.sh b/update-translation.sh new file mode 100755 index 0000000..ce1e95c --- /dev/null +++ b/update-translation.sh @@ -0,0 +1,3 @@ +#!/bin/bash +xgettext -o locale/mail-hosting.pot `find . -iname '*.php'` +for translation in `find locale -iname '*.po'`; do msgmerge -U "$translation" locale/mail-hosting.pot; msgfmt -o ${translation:0:-2}mo "$translation"; done diff --git a/www/admin.php b/www/admin.php index f82a494..fd66924 100644 --- a/www/admin.php +++ b/www/admin.php @@ -4,7 +4,7 @@ use Egulias\EmailValidator\EmailLexer; use Egulias\EmailValidator\EmailParser; require_once( '../common_config.php' ); - +global $language, $dir, $locale; session_start(); if ( empty( $_SESSION[ 'csrf_token' ] ) ) { $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); @@ -18,29 +18,29 @@ if ( ! empty( $_SESSION[ 'email_admin_user' ] ) ) { $_SESSION = []; session_regenerate_id( true ); $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); - $msg .= ''; + $msg .= ''; } } if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { if ( isset( $_POST[ 'action' ] ) ) { if ( $_SESSION[ 'csrf_token' ] !== $_POST[ 'csrf_token' ] ?? '' ) { - die( 'Invalid csfr token' ); + die( 'Invalid CSRF token' ); } if ( $_POST[ 'action' ] === 'logout' ) { $_SESSION = []; session_regenerate_id( true ); $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); - $msg .= ''; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'login' ) { if ( empty( $_POST[ 'user' ] ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } $stmt = $db->prepare( 'SELECT username, password, password_hash_type, superadmin FROM admin WHERE username = ? AND active = 1;' ); $stmt->execute( [ $_POST[ 'user' ] ] ); if ( $tmp = $stmt->fetch( PDO::FETCH_ASSOC ) ) { if ( empty( $_POST[ 'pwd' ] ) || ! password_verify( $_POST[ 'pwd' ], $tmp[ 'password' ] ) ) { - $msg .= ''; + $msg .= ''; } else { $_SESSION[ 'email_admin_user' ] = $tmp[ 'username' ]; $_SESSION[ 'email_admin_superadmin' ] = (bool) $tmp[ 'superadmin' ]; @@ -52,7 +52,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } } } else { - $msg .= ''; + $msg .= ''; } } elseif ( ! empty( $_SESSION[ 'email_admin_user' ] ) ) { if ( $_POST[ 'action' ] === 'update_alias' ) { @@ -69,72 +69,72 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt->execute( [ $alias_goto, $_SESSION[ 'email_admin_user' ] ] ); } elseif ( $_POST[ 'action' ] === 'delete_admin' && ! empty( $_POST[ 'admin' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; $msg .= ''; - $msg .= '
'; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_domain' && ! empty( $_POST[ 'domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; $msg .= ''; - $msg .= '
'; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_alias_domain' && ! empty( $_POST[ 'alias_domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; $msg .= ''; - $msg .= '
'; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_alias' && ! empty( $_POST[ 'alias' ] ) ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; $msg .= ''; - $msg .= '
'; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_mailbox' && ! empty( $_POST[ 'user' ] ) ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; $msg .= ''; - $msg .= '
'; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_admin2' && ! empty( $_POST[ 'admin' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { if ( $_SESSION[ 'email_admin_user' ] === $_POST[ 'admin' ] ) { - $msg .= ''; + $msg .= ''; } else { $stmt = $db->prepare( 'DELETE FROM admin WHERE username = ?;' ); $stmt->execute( [ $_POST[ 'admin' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'delete_domain2' && ! empty( $_POST[ 'domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'UPDATE domain SET active = -1 WHERE domain = ?;' ); $stmt->execute( [ $_POST[ 'domain' ] ] ); - $msg .= ''; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_alias_domain2' && ! empty( $_POST[ 'alias_domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'DELETE FROM alias_domain WHERE alias_domain = ?;' ); $stmt->execute( [ $_POST[ 'alias_domain' ] ] ); - $msg .= ''; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'delete_alias2' && ! empty( $_POST[ 'alias' ] ) ) { if ( check_domain_access( $_POST[ 'alias' ], $msg ) ) { $stmt = $db->prepare( 'DELETE FROM alias WHERE address = ?;' ); $stmt->execute( [ $_POST[ 'alias' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'delete_mailbox2' && ! empty( $_POST[ 'user' ] ) ) { if ( check_domain_access( $_POST[ 'user' ], $msg ) ) { $stmt = $db->prepare( 'UPDATE mailbox SET active = -2 WHERE username = ?;' ); $stmt->execute( [ $_POST[ 'user' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_edit_admin' && ! empty( $_POST[ 'admin' ] ) && ( $_SESSION[ 'email_admin_superadmin' ] || $_POST[ 'admin' ] === $_SESSION[ 'email_admin_user' ] ) ) { $stmt = $db->prepare( 'SELECT null FROM admin WHERE username = ?;' ); $stmt->execute( [ $_POST[ 'admin' ] ] ); if ( ! $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { if ( ! empty( $_POST[ 'pass_update' ] ) ) { if ( empty( $_POST[ 'pass_update2' ] ) || $_POST[ 'pass_update' ] !== $_POST[ 'pass_update2' ] ) { - $msg .= ''; + $msg .= ''; } else { $hash = password_hash( $_POST[ 'pass_update' ], PASSWORD_ARGON2ID ); $stmt = $db->prepare( 'UPDATE admin SET password_hash_type = "{ARGON2ID}", password = ?, modified = NOW() WHERE username = ?;' ); $stmt->execute( [ $hash, $_POST[ 'admin' ] ] ); - $msg .= ''; + $msg .= ''; } } if ( $_SESSION[ 'email_admin_superadmin' ] ) { @@ -163,55 +163,55 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } } } - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_new_admin' && ! empty( $_POST[ 'admin' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'SELECT null FROM admin WHERE username = ?;' ); $stmt->execute( [ $_POST[ 'admin' ] ] ); if ( $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { if ( empty( $_POST[ 'pass_update2' ] ) || $_POST[ 'pass_update' ] !== $_POST[ 'pass_update2' ] ) { - $msg .= ''; + $msg .= ''; } else { $hash = password_hash( $_POST[ 'pass_update' ], PASSWORD_ARGON2ID ); $active = isset( $_POST[ 'active' ] ) ? 1 : 0; $superadmin = isset( $_POST[ 'superadmin' ] ) ? 1 : 0; $stmt = $db->prepare( 'INSERT INTO admin (password_hash_type, password, superadmin, active, username, created, modified) VALUES ("{ARGON2ID}", ?, ?, ?, ?, NOW(), NOW());' ); $stmt->execute( [ $hash, $superadmin, $active, $_POST[ 'admin' ] ] ); - $msg .= ''; + $msg .= ''; } } } elseif ( $_POST[ 'action' ] === 'save_edit_domain' && ! empty( $_POST[ 'domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'SELECT null FROM domain WHERE domain = ?;' ); $stmt->execute( [ $_POST[ 'domain' ] ] ); if ( ! $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { $active = isset( $_POST[ 'active' ] ) ? 1 : 0; $stmt = $db->prepare( 'UPDATE domain set active = ?, modified = NOW() WHERE domain = ?;' ); $stmt->execute( [ $active, $_POST[ 'domain' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_edit_alis_domain' && ! empty( $_POST[ 'alias_domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'SELECT null FROM alias_domain WHERE alias_domain = ?;' ); $stmt->execute( [ $_POST[ 'alias_domain' ] ] ); if ( ! $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { $active = isset( $_POST[ 'active' ] ) ? 1 : 0; $stmt = $db->prepare( 'UPDATE alias_domain set active = ?, modified = NOW() WHERE alias_domain = ?;' ); $stmt->execute( [ $active, $_POST[ 'alias_domain' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_new_domain' && ! empty( $_POST[ 'domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'SELECT null FROM domain WHERE domain = ? UNION SELECT null FROM alias_domain WHERE alias_domain = ?;' ); $stmt->execute( [ $_POST[ 'domain' ], $_POST[ 'domain' ] ] ); if ( $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { - $ascii_domian = idn_to_ascii($_POST['domain'], IDNA_NONTRANSITIONAL_TO_ASCII); - $utf8_domian = idn_to_utf8($_POST['domain'], IDNA_NONTRANSITIONAL_TO_UNICODE); + $ascii_domain = idn_to_ascii($_POST['domain'], IDNA_NONTRANSITIONAL_TO_ASCII); + $utf8_domain = idn_to_utf8($_POST['domain'], IDNA_NONTRANSITIONAL_TO_UNICODE); $active = isset( $_POST[ 'active' ] ) ? 1 : 0; $stmt = $db->prepare( 'INSERT INTO domain (active, domain, created, modified) VALUES (?, ?, NOW(), NOW());' ); $stmt->execute( [ $active, $utf8_domain ] ); @@ -219,16 +219,16 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt = $db->prepare( 'INSERT INTO alias_domain (active, alias_domain, target_domain, created, modified) VALUES (1, ?, ?, NOW(), NOW());' ); $stmt->execute( [ $ascii_domain, $utf8_domain ] ); } - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_new_alias_domain' && ! empty( $_POST[ 'alias_domain' ] ) && $_SESSION[ 'email_admin_superadmin' ] ) { $stmt = $db->prepare( 'SELECT null FROM domain WHERE domain = ? UNION SELECT null FROM alias_domain WHERE alias_domain = ?;' ); $stmt->execute( [ $_POST[ 'alias_domain' ], $_POST[ 'alias_domain' ] ] ); if ( $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { - $ascii_domian = idn_to_ascii($_POST['alias_domain'], IDNA_NONTRANSITIONAL_TO_ASCII); - $utf8_domian = idn_to_utf8($_POST['alias_domain'], IDNA_NONTRANSITIONAL_TO_UNICODE); + $ascii_domain = idn_to_ascii($_POST['alias_domain'], IDNA_NONTRANSITIONAL_TO_ASCII); + $utf8_domain = idn_to_utf8($_POST['alias_domain'], IDNA_NONTRANSITIONAL_TO_UNICODE); $active = isset( $_POST[ 'active' ] ) ? 1 : 0; $stmt = $db->prepare( 'INSERT INTO alias_domain (active, alias_domain, target_domain, created, modified) VALUES (?, ?, ?, NOW(), NOW());' ); $stmt->execute( [ $active, $utf8_domain, $_POST[ 'target_domain' ] ] ); @@ -236,7 +236,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt = $db->prepare( 'INSERT INTO alias_domain (active, alias_domain, target_domain, created, modified) VALUES (?, ?, ?, NOW(), NOW());' ); $stmt->execute( [ $active, $ascii_domain, $_POST[ 'target_domain' ] ] ); } - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_new_alias' && ! empty( $_POST[ 'alias' ] ) && ! empty( $_POST[ 'target' ] ) ) { $ok = check_email_valid( $_POST[ 'alias' ], $msg ); @@ -249,7 +249,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt = $db->prepare( 'SELECT null FROM alias WHERE address = ?;' ); $stmt->execute( [ $_POST[ 'alias' ] ] ); if ( $stmt->fetch() ) { - $msg .= ''; + $msg .= ''; } else { $parser = new EmailParser( new EmailLexer() ); $parser->parse( $_POST[ 'alias' ] ); @@ -258,7 +258,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $enforce_tls_in = isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0; $stmt = $db->prepare( 'INSERT INTO alias (goto, address, domain, active, created, modified, enforce_tls_in) VALUES (?, ?, ?, ?, NOW(), NOW(), ?);' ); $stmt->execute( [ $alias_goto, $_POST[ 'alias' ], $domain, $active, $enforce_tls_in ] ); - $msg .= ''; + $msg .= ''; } } } elseif ( $_POST[ 'action' ] === 'save_edit_alias' && ! empty( $_POST[ 'alias' ] ) && ! empty( $_POST[ 'target' ] ) ) { @@ -273,7 +273,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $enforce_tls_in = isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0; $stmt = $db->prepare( 'UPDATE alias SET goto = ?, active = ?, enforce_tls_in = ?, modified = NOW() WHERE address = ?;' ); $stmt->execute( [ $alias_goto, $active, $enforce_tls_in, $_POST[ 'alias' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_edit_mailbox' && ! empty( $_POST[ 'user' ] ) ) { $ok = check_email_valid( $_POST[ 'user' ], $msg ); @@ -295,7 +295,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt->execute( [ $alias_goto, ( isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0 ), ( isset( $_POST[ 'active' ] ) ? 1 : 0 ), $_POST[ 'user' ] ] ); $stmt = $db->prepare( 'UPDATE mailbox SET enforce_tls_in = ?, enforce_tls_out = ?, active = ?, quota = ?, modified = NOW() WHERE username = ?;' ); $stmt->execute( [ ( isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0 ), ( isset( $_POST[ 'enforce_tls_out' ] ) ? 1 : 0 ), ( isset( $_POST[ 'active' ] ) ? 1 : 0 ), $quota, $_POST[ 'user' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( $_POST[ 'action' ] === 'save_new_mailbox' && ! empty( $_POST[ 'user' ] ) ) { $email = $_POST[ 'user' ]; @@ -308,7 +308,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt->execute( [ $email, $email ] ); if ( $stmt->fetch() ) { $ok = false; - $msg .= ''; + $msg .= ''; } if ( $ok ) { $parser = new EmailParser( new EmailLexer() ); @@ -330,7 +330,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt->execute( [ $email, $alias_goto, $domain, ( isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0 ), ( isset( $_POST[ 'active' ] ) ? 1 : 0 ) ] ); $stmt = $db->prepare( 'INSERT INTO mailbox (username, password, quota, local_part, domain, created, modified, password_hash_type, openpgpkey_wkd, enforce_tls_in, enforce_tls_out, active) VALUES(?, ?, ?, ?, ?, NOW(), NOW(), ?, ?, ?, ?, ?);' ); $stmt->execute( [ $email, $hash, $quota, $user, $domain, '{ARGON2ID}', z_base32_encode( hash( 'sha1', mb_strtolower( $user ), true ) ), ( isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0 ), ( isset( $_POST[ 'enforce_tls_out' ] ) ? 1 : 0 ), ( isset( $_POST[ 'active' ] ) ? 1 : 0 ) ] ); - $msg .= ''; + $msg .= ''; } } } elseif ( $_POST[ 'action' ] === 'save_password_mailbox' && ! empty( $_POST[ 'user' ] ) ) { @@ -340,12 +340,12 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } if ( $ok ) { if ( empty( $_POST[ 'pass_update' ] ) || empty( $_POST[ 'pass_update2' ] ) || $_POST[ 'pass_update' ] !== $_POST[ 'pass_update2' ] ) { - $msg .= ''; + $msg .= ''; } else { $hash = password_hash( $_POST[ 'pass_update' ], PASSWORD_ARGON2ID ); $stmt = $db->prepare( 'UPDATE mailbox SET password_hash_type = "{ARGON2ID}", password = ? WHERE username = ?;' ); $stmt->execute( [ $hash, $_POST[ 'user' ] ] ); - $msg .= ''; + $msg .= ''; } } } elseif ( $_POST[ 'action' ] === 'disable_tfa_mailbox' && ! empty( $_POST[ 'user' ] ) ) { @@ -356,7 +356,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { if ( $ok ) { $stmt = $db->prepare( 'UPDATE mailbox SET tfa = 0 WHERE username = ?;' ); $stmt->execute( [ $_POST[ 'user' ] ] ); - $msg .= ''; + $msg .= ''; } } } @@ -364,30 +364,38 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } ?> - + - Daniel - E-Mail and XMPP - Admin management + <?php echo _('E-Mail and XMPP - Admin management'); ?> - - + + + + + + + + + -

E-Mail and XMPP - Admin managemen

- if ( ! empty( $_SESSION[ 'email_admin_user' ] ) ) { ?> +

+
-

Logged in as | - | + | Manage admins | Manage alias domains | | | Manage your admin account | | Manage domains | Manage aliases | Manage mailboxes | | |

$msg

"; @@ -395,23 +403,22 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) {
-
+
-
+
- +

Welcome to the admin management interface. You can configure your domain(s) and accounts here. Please - select an option from the menu.

Oops, it looks like the page you tried to access does not exist or you do not have permission to access - it.

@@ -457,15 +463,15 @@ function send_manage_admins(): void $db = get_db_instance(); $stmt = $db->query( 'SELECT username, modified, active FROM admin;' ); ?> -

Create new admin

+

-
Admin
-
Active
-
Last modified
-
Edit account
+
+
+
+
fetch( PDO::FETCH_ASSOC ) ) { @@ -473,10 +479,10 @@ function send_manage_admins(): void if ( $tmp[ 'active' ] === 1 ) { $active = 'Active'; } - echo '
' . htmlspecialchars( $tmp[ 'username' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; + echo '
' . htmlspecialchars( $tmp[ 'username' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; } ?>
-

Create new admin

+

execute( [ $admin ] ); if ( $admin = $stmt->fetch( PDO::FETCH_ASSOC ) ) { ?> -

Edit admin account

+

-
+
-
+
+ value="1">
-
Superadmins can manage other admins
+
+ value="1">
-
Superadmins can manage other admins
+ disabled>
+
+ disabled>
-
+
-
+
-
+
-
+
-
-
Superadmins can manage other admins
+
+
-
+
- +
@@ -608,16 +614,16 @@ function send_manage_domains(): void $stmt = $db->query( 'SELECT domain, modified, active FROM domain;' ); if ( $_SESSION[ 'email_admin_superadmin' ] ) { ?> -

Create new domain

+

-
Domain
-
Active
-
Last modified
-
Edit domain
+
+
+
+
fetch( PDO::FETCH_ASSOC ) ) { @@ -627,11 +633,11 @@ function send_manage_domains(): void } elseif ( $tmp[ 'active' ] === -1 ) { $active = 'Deleting'; } - echo '
' . htmlspecialchars( $tmp[ 'domain' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; + echo '
' . htmlspecialchars( $tmp[ 'domain' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; } ?>
-

Create new domain

+

-

Create new domain

+

-
+
-
+
- +
@@ -665,29 +671,29 @@ function send_edit_domain(): void $stmt->execute( [ $_POST[ 'domain' ] ] ); if ( $admin = $stmt->fetch( PDO::FETCH_ASSOC ) ) { ?> -

Edit domain

+

+ value="1">
- +
- +
Oops, this admin doesn\'t seem to exist.

'; + echo '

'._('Oops, this admin doesn\'t seem to exist.').'

'; } } @@ -697,17 +703,17 @@ function send_manage_alias_domains(): void $stmt = $db->query( 'SELECT alias_domain, target_domain, modified, active FROM alias_domain;' ); if ( $_SESSION[ 'email_admin_superadmin' ] ) { ?> -

Create new alias domain

+

-
Alias Domain
-
Target Domain
-
Active
-
Last modified
-
Edit alias domain
+
+
+
+
+
fetch( PDO::FETCH_ASSOC ) ) { @@ -715,11 +721,11 @@ function send_manage_alias_domains(): void if ( $tmp[ 'active' ] === 1 ) { $active = 'Active'; } - echo '
' . htmlspecialchars( $tmp[ 'alias_domain' ] ) . '
' . htmlspecialchars( $tmp[ 'target_domain' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; + echo '
' . htmlspecialchars( $tmp[ 'alias_domain' ] ) . '
' . htmlspecialchars( $tmp[ 'target_domain' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; } ?>
-

Create new alias domain

+

-

Create new alias domain

+

-
+
-
+
-
+
- +
@@ -757,35 +763,35 @@ function send_edit_alias_domain(): void $stmt->execute( [ $_POST[ 'alias_domain' ] ] ); if ( $alias = $stmt->fetch( PDO::FETCH_ASSOC ) ) { ?> -

Edit alias domain

+

-
+
+ value="1">
- +
- +
Oops, this alias domain doesn\'t seem to exist.

'; + echo '

'._('Oops, this alias domain doesn\'t seem to exist.').'

'; } } @@ -795,16 +801,16 @@ function send_manage_aliases(): void $stmt = $db->prepare( 'SELECT a.address, a.goto, a.modified, a.active FROM alias AS a LEFT JOIN mailbox AS m ON (m.username=a.address AND m.active=1) WHERE a.domain IN (SELECT domain FROM domain_admins WHERE username = ?) AND isnull(m.username) limit 200;' ); $stmt->execute( [ $_SESSION[ 'email_admin_user' ] ] ); ?> -

Create new alias

+

-
Alias
-
Target
-
Active
-
Last modified
-
Edit alias
+
+
+
+
+
fetch( PDO::FETCH_ASSOC ) ) { @@ -812,37 +818,37 @@ function send_manage_aliases(): void if ( $tmp[ 'active' ] === 1 ) { $active = 'Active'; } - echo '
' . htmlspecialchars( $tmp[ 'address' ] ) . '
' . htmlspecialchars( $tmp[ 'goto' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; + echo '
' . htmlspecialchars( $tmp[ 'address' ] ) . '
' . htmlspecialchars( $tmp[ 'goto' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; } ?>
-

Create new alias

+

-

Create new alias

+

-
+
-
+
-
+
-
+
- +
@@ -856,40 +862,39 @@ function send_edit_alias(): void $stmt->execute( [ $_POST[ 'alias' ] ] ); if ( $alias = $stmt->fetch( PDO::FETCH_ASSOC ) ) { ?> -

Edit alias

+

-
+
+ value="1">
+ value="1">
- +
- +
Oops, this alias doesn\'t seem to exist.

'; + echo '

'._('Oops, this alias doesn\'t seem to exist.').'

'; } } @@ -899,15 +904,15 @@ function send_manage_mailboxes(): void $stmt = $db->prepare( 'SELECT username, modified, active FROM mailbox WHERE domain IN (SELECT domain FROM domain_admins WHERE username = ?) limit 200;' ); $stmt->execute( [ $_SESSION[ 'email_admin_user' ] ] ); ?> -

Create new mailbox

+

-
Username
-
Active
-
Last modified
-
Edit mailbox
+
+
+
+
fetch( PDO::FETCH_ASSOC ) ) { @@ -919,55 +924,53 @@ function send_manage_mailboxes(): void } elseif ( $tmp[ 'active' ] === -2 ) { $active = 'Deleting'; } - echo '
' . htmlspecialchars( $tmp[ 'username' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; + echo '
' . htmlspecialchars( $tmp[ 'username' ] ) . '
' . $active . '
' . $tmp[ 'modified' ] . '
'; } ?>
-

Create new mailbox

+

-

Create new mailbox

+

-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- +
@@ -983,82 +986,79 @@ function send_edit_mailbox(): void $aliases = explode( ',', $email[ 'goto' ] ); $aliases_to = implode( "\n", array_diff( $aliases, [ $_REQUEST[ 'user' ] ] ) ); ?> -

Edit mailbox

+

-
+
-
+
>
+ value="1">
+ value="1">
+ value="1">
- +
-

Change password

+

-
+
-
+
- +
-

Delete mailbox / Disable two factor authentication

+

- +
- +
Oops, this mailbox doesn\'t seem to exist.

'; + echo '

'._('Oops, this mailbox doesn\'t seem to exist.').'

'; } } diff --git a/www/index.php b/www/index.php index 446a68d..1b46656 100644 --- a/www/index.php +++ b/www/index.php @@ -1,28 +1,40 @@ - - -Daniel - E-Mail and XMPP + + +<?php echo _('E-Mail and XMPP'); ?> - - + + + + + + + + +
-

Info | Register | Webmail-Login | Manage account | Web-XMPP

-

What you will get

-

You get a free anonymous E-Mail address and an XMPP/Jabber account using the same details. Your Jabber ID is user@danwin1210.de and can be connected to directly from clearnet or via TOR hidden service (danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion).

-

You will have 50MB of disk space available for your mails. If you desperately need more space, just contact me. Your E-Mail address will be user@danwin1210.de

-

For privacy, please use PGP mail encryption, if you can. This prevents others from reading your mails (including me and/or LEA). GnuPGs official home: https://gnupg.org Windows GUI: https://gpg4usb.org

-

E-Mail Setup

-

SMTP: danwin1210.de Port 465 (SSL/TLS) or 587 (StartTLS)
-IMAP: danwin1210.de Port 993 (SSL/TLS) or 143 (StartTLS)
-POP3: danwin1210.de Port 995 (SSL/TLS) or 110 (StartTLS)
-Authentication: PLAIN, LOGIN

-

You can also connect on the same ports via the tor onion address danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion, but you will have to accept an SSL certificate only valid for the clearnet domain.

-

XMPP setup

-

Domain: danwin1210.de
-Connect server: danielas3rtn54uwmofdo3x2bsdifr47huasnmbgqzfrec5ubupvtpid.onion (optional for torification)
-File transfer proxy: proxy.danwin1210.de
-BOSH URL: https://danwin1210.de:5281/http-bind (only enable if you have to, as it is slower than directly using xmpp)

+

| | | |

+

+

+

contact me. Your E-Mail address will be %2$s'), CONTACT_URL, CLEARNET_SERVER); ?>

+

https://gnupg.org Windows GUI: https://gpg4usb.org'); ?>

+

+

+
+
+
+ +

+

+

+


+
+
+

diff --git a/www/manage_account.php b/www/manage_account.php index a2e8164..80676e0 100644 --- a/www/manage_account.php +++ b/www/manage_account.php @@ -1,6 +1,6 @@ It looks like your user no longer exists!
'; + $msg .= ''; } } if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { if ( $_SESSION[ 'csrf_token' ] !== $_POST[ 'csrf_token' ] ?? '' ) { - die( 'Invalid csfr token' ); + die( 'Invalid CSRF token' ); } if ( isset( $_SESSION[ '2fa_code' ] ) ) { if ( ! empty( $_POST[ '2fa_code' ] ) && $_POST[ '2fa_code' ] === $_SESSION[ '2fa_code' ] ) { unset( $_SESSION[ '2fa_code' ] ); unset( $_SESSION[ 'pgp_key' ] ); } else { - $msg .= '

Wrong 2FA code

'; + $msg .= '

'._('Wrong 2FA code').'

'; } } if ( ! isset( $_SESSION[ '2fa_code' ] ) && isset( $_POST[ 'action' ] ) ) { @@ -35,16 +35,16 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $_SESSION = []; session_regenerate_id( true ); $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); - $msg .= ''; + $msg .= ''; } elseif ( $_POST[ 'action' ] === 'login' ) { $ok = true; if ( ! check_captcha( $_POST[ 'challenge' ] ?? '', $_POST[ 'captcha' ] ?? '' ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } if ( empty( $_POST[ 'user' ] ) || ! preg_match( '/^([^+]+?)(@([^@]+))?$/i', $_POST[ 'user' ], $match ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } if ( $ok ) { $db = get_db_instance(); @@ -60,7 +60,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { if ( $tmp = $stmt->fetch( PDO::FETCH_ASSOC ) ) { if ( empty( $_POST[ 'pwd' ] ) || ! password_verify( $_POST[ 'pwd' ], $tmp[ 'password' ] ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } else { $_SESSION[ 'email_user' ] = $tmp[ 'username' ]; $stmt = $db->prepare( 'UPDATE mailbox SET last_login = ? WHERE username = ? AND active = 1;' ); @@ -78,7 +78,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } } } else { - $msg .= ''; + $msg .= ''; } } } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'update_settings' ) { @@ -97,21 +97,21 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $stmt->execute( [ ( isset( $_POST[ 'enforce_tls_in' ] ) ? 1 : 0 ), ( isset( $_POST[ 'enforce_tls_out' ] ) ? 1 : 0 ), $_SESSION[ 'email_user' ] ] ); } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'update_password' ) { if ( empty( $_POST[ 'pass_update' ] ) || empty( $_POST[ 'pass_update2' ] ) || $_POST[ 'pass_update' ] !== $_POST[ 'pass_update2' ] ) { - $msg .= ''; + $msg .= ''; } else { $hash = password_hash( $_POST[ 'pass_update' ], PASSWORD_ARGON2ID ); $stmt = $db->prepare( 'UPDATE mailbox SET password_hash_type = "{ARGON2ID}", password = ? WHERE username = ? AND active = 1;' ); $stmt->execute( [ $hash, $_SESSION[ 'email_user' ] ] ); - $msg .= ''; + $msg .= ''; } } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'delete_account' ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; - $msg .= '
'; + $msg .= ''; } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'disable_account' ) { - $msg .= ''; + $msg .= ''; $msg .= '
'; - $msg .= '
'; + $msg .= ''; } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'delete_account2' ) { $stmt = $db->prepare( 'DELETE FROM alias WHERE address = ?;' ); $stmt->execute( [ $_SESSION[ 'email_user' ] ] ); @@ -120,7 +120,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $_SESSION = []; session_regenerate_id( true ); $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); - $msg .= ''; + $msg .= ''; } elseif ( ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'disable_account2' ) { $stmt = $db->prepare( 'UPDATE alias SET active = 0 WHERE address = ?;' ); $stmt->execute( [ $_SESSION[ 'email_user' ] ] ); @@ -129,11 +129,11 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { $_SESSION = []; session_regenerate_id( true ); $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); - $msg .= ''; + $msg .= ''; } elseif ( isset( $_POST[ 'pgp_key' ] ) && ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'update_pgp_key' ) { $pgp_key = trim( $_POST[ 'pgp_key' ] ); if ( empty( $pgp_key ) ) { - $msg .= "

Successfully removed the key

"; + $msg .= '

'._('Successfully removed the key').'

'; $stmt = $db->prepare( 'UPDATE mailbox SET pgp_key = "", tfa = 0, pgp_verified = 0 WHERE username = ?;' ); $stmt->execute( [ $_SESSION[ 'email_user' ] ] ); } else { @@ -142,7 +142,7 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { gnupg_setarmor( $gpg, 1 ); $imported_key = gnupg_import( $gpg, $pgp_key ); if ( ! $imported_key ) { - $msg .= "

There was an error importing the key

"; + $msg .= '

'._('There was an error importing the key').'

'; } else { $has_this_email = false; $key_info = gnupg_keyinfo( $gpg, $imported_key[ 'fingerprint' ] ); @@ -155,36 +155,43 @@ if ( $_SERVER[ 'REQUEST_METHOD' ] === 'POST' ) { } } if ( $has_this_email ) { - $msg .= "

Successfully imported the key

"; + $msg .= '

'._('Successfully imported the key').'

'; $stmt = $db->prepare( 'UPDATE mailbox SET pgp_key = ?, tfa = 0, pgp_verified = 0 WHERE username = ?;' ); $stmt->execute( [ $pgp_key, $_SESSION[ 'email_user' ] ] ); } else { - $msg .= sprintf( '

Oops, looks like the key is missing this email address as user id. Please add your address "%s" as user ID to your pgp key or create a new key pair.

', htmlspecialchars( $_SESSION[ 'email_user' ] ) ); + $msg .= '

' . sprintf( _('Oops, looks like the key is missing this email address as user id. Please add your address "%s" as user ID to your pgp key or create a new key pair.'), htmlspecialchars( $_SESSION[ 'email_user' ] ) ) . '

'; } } } } elseif ( isset( $_POST[ 'enable_2fa_code' ] ) && ! empty( $_SESSION[ 'email_user' ] ) && $_POST[ 'action' ] === 'enable_2fa' ) { if ( $_POST[ 'enable_2fa_code' ] !== $_SESSION[ 'enable_2fa_code' ] ) { - $msg .= "

Sorry, the code was incorrect

"; + $msg .= '

'._('Sorry, the code was incorrect').'

'; } else { $stmt = $db->prepare( 'UPDATE mailbox SET tfa = 1, pgp_verified = 1 WHERE username = ?;' ); $stmt->execute( [ $_SESSION[ 'email_user' ] ] ); - $msg .= "

Successfully enabled 2FA

"; + $msg .= '

'._('Successfully enabled 2FA').'

'; } } } } ?> - + - Daniel - E-Mail and XMPP - Manage account + <?php echo _('E-Mail and XMPP - Manage account'); ?> - + content=""> + + + + + + + +
@@ -203,21 +210,21 @@ foreach ( $key_info as $key ) { } } } -$encrypted = gnupg_encrypt( $gpg, "To login, please enter the following code to confirm ownership of your key:\n\n" . $_SESSION[ '2fa_code' ] . "\n" ); +$encrypted = gnupg_encrypt( $gpg, _('To login, please enter the following code to confirm ownership of your key:')."\n\n" . $_SESSION[ '2fa_code' ] . "\n" ); echo $msg; -echo "

To login, please decrypt the following PGP encrypted message and confirm the code:

"; +echo '

'._('To login, please decrypt the following PGP encrypted message and confirm the code:').'

'; echo "
$encrypted
"; ?>
-
+
- +
- +
-

Info | - Logged in as | - Register - | Webmail-Login register.php"> + | | - + - | Manage account | Web-XMPP

+ | Manage account'); + } ?> |

$msg

"; if ( empty( $_SESSION[ 'email_user' ] ) ) { ?>
-
+
-
+
- +
@@ -272,62 +279,58 @@ if ( empty( $_SESSION[ 'email_user' ] ) ) { ?> $tls_status = $stmt->fetch( PDO::FETCH_ASSOC ); ?>
-

Settings

-

Delivery

-

Edit how your mail is delivered. You can add forwarding addresses one per line, or comma seperated. When you - disable the "keep a local copy" checkbox, your mail will only be sent to your forwarding addresses.

+

+

+

-
+
-
+
>
-

Encryption

-

If you are having issues sending or receiving mails with some other provider, you can try disabling forced - encryption here. But be aware, that this makes it possible for 3rd parties on the network to read your - emails. Make sure to ask your correspondent to demand encryption support from their provider for a safer - internet.

+

+

-
+
>
-
+
>
- +
-

Change password

+

-
+
-
+
- +
@@ -338,7 +341,7 @@ if ( empty( $_SESSION[ 'email_user' ] ) ) { ?> $pgp_status = $stmt->fetch( PDO::FETCH_ASSOC ); if ( ! empty( $pgp_status[ 'pgp_key' ] ) ) { if ( $pgp_status[ 'tfa' ] === 1 ) { - echo "

Yay, PGP based 2FA is enabled!

"; + echo '

'._('Yay, PGP based 2FA is enabled!').'

'; } else { $gpg = gnupg_init(); gnupg_seterrormode( $gpg, GNUPG_ERROR_WARNING ); @@ -348,7 +351,7 @@ if ( empty( $_SESSION[ 'email_user' ] ) ) { ?> $key_info = gnupg_keyinfo( $gpg, $imported_key[ 'fingerprint' ] ); foreach ( $key_info as $key ) { if ( ! $key[ 'can_encrypt' ] ) { - echo "

Sorry, this key can't be used to encrypt a message to you. Your key may have expired or has been revoked.

"; + echo '

'._('Sorry, this key can\'t be used to encrypt a message to you. Your key may have expired or has been revoked.').'

'; } else { foreach ( $key[ 'subkeys' ] as $subkey ) { gnupg_addencryptkey( $gpg, $subkey[ 'fingerprint' ] ); @@ -356,17 +359,17 @@ if ( empty( $_SESSION[ 'email_user' ] ) ) { ?> } } $_SESSION[ 'enable_2fa_code' ] = bin2hex( random_bytes( 3 ) ); - if ( $encrypted = gnupg_encrypt( $gpg, "To enable 2FA, please enter the following code to confirm ownership of your key:\n\n$_SESSION[enable_2fa_code]\n" ) ) { - echo '

Enable 2FA

'; - echo "

To enable 2FA using your PGP key, please decrypt the following PGP encrypted message and confirm the code:

"; + if ( $encrypted = gnupg_encrypt( $gpg, _('To enable 2FA, please enter the following code to confirm ownership of your key:'). "\n\n$_SESSION[enable_2fa_code]\n" ) ) { + echo '

'._( 'Enable 2FA').'

'; + echo '

'._('To enable 2FA using your PGP key, please decrypt the following PGP encrypted message and confirm the code:').'

'; echo "
$encrypted
"; ?>
-
+
- +
@@ -377,39 +380,36 @@ if ( empty( $_SESSION[ 'email_user' ] ) ) { ?> } ?> -

Add PGP key for 2FA and end-to-end encryption

+

+ aria-label="">
- +
-

Disable/Delete account

-

Warning, this is permanent and cannot be undone. Disabling an account will delete your email data from the - server, but leave the account blocked in the database for a year, so no one else can use it. Deleting your - account will completely wipe all records of it and it will be available for new registrations again.

+

+

- +
- +
- diff --git a/www/register.php b/www/register.php index ad54581..568b75d 100644 --- a/www/register.php +++ b/www/register.php @@ -4,6 +4,7 @@ use Egulias\EmailValidator\EmailValidator; use Egulias\EmailValidator\Validation\NoRFCWarningsValidation; require_once( '../common_config.php' ); +global $language, $dir, $locale; session_start(); if ( empty( $_SESSION[ 'csrf_token' ] ) || $_SESSION[ 'UA' ] !== $_SERVER[ 'HTTP_USER_AGENT' ] ) { $_SESSION[ 'csrf_token' ] = sha1( uniqid() ); @@ -14,22 +15,22 @@ if ( isset( $_POST[ 'user' ] ) ) { $ok = true; if ( $_SESSION[ 'csrf_token' ] !== $_POST[ 'csrf_token' ] ?? '' ) { $ok = false; - $msg .= ''; + $msg .= ''; } if ( ! check_captcha( $_POST[ 'challenge' ] ?? '', $_POST[ 'captcha' ] ?? '' ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } $db = get_db_instance(); if ( ! preg_match( '/^([^+\/\'"]+?)(@([^@]+))?$/iu', $_POST[ 'user' ], $match ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } $user = mb_strtolower( $match[ 1 ] ?? '' ); $domain = $match[ 3 ] ?? 'danwin1210.de'; if ( $ok && ( empty( $_POST[ 'pwd' ] ) || empty( $_POST[ 'pwd2' ] ) || $_POST[ 'pwd' ] !== $_POST[ 'pwd2' ] ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } elseif ( $ok ) { $stmt = $db->prepare( 'SELECT target_domain FROM alias_domain WHERE alias_domain = ? AND active=1;' ); $stmt->execute( [ $domain ] ); @@ -40,15 +41,15 @@ if ( isset( $_POST[ 'user' ] ) ) { $stmt->execute( [ $domain ] ); if ( ! $stmt->fetch() ) { $ok = false; - $msg .= ''; + $msg .= ''; } else { $validator = new EmailValidator(); if ( ! $validator->isValid( "$user@$domain", new NoRFCWarningsValidation() ) ) { $ok = false; - $msg .= ''; + $msg .= ''; } elseif(in_array($user, RESERVED_USERNAMES, true)){ $ok = false; - $msg .= ''; + $msg .= ''; } } @@ -58,7 +59,7 @@ if ( isset( $_POST[ 'user' ] ) ) { $stmt->execute( [ "$user@$domain", "$user@$domain" ] ); if ( $stmt->fetch() ) { $ok = false; - $msg .= ''; + $msg .= ''; } if ( $ok ) { $hash = password_hash( $_POST[ 'pwd' ], PASSWORD_ARGON2ID ); @@ -66,52 +67,58 @@ if ( isset( $_POST[ 'user' ] ) ) { $stmt->execute( [ "$user@$domain", "$user@$domain", $domain ] ); $stmt = $db->prepare( 'INSERT INTO mailbox (username, password, quota, local_part, domain, created, modified, password_hash_type, openpgpkey_wkd) VALUES(?, ?, 51200000, ?, ?, NOW(), NOW(), ?, ?);' ); $stmt->execute( [ "$user@$domain", $hash, $user, $domain, '{ARGON2ID}', z_base32_encode( hash( 'sha1', mb_strtolower( $user ), true ) ) ] ); - $msg .= ''; + $msg .= ''; } } } ?> - + - Daniel - E-Mail and XMPP - Register + <?php echo _('E-Mail and XMPP - Register'); ?> - - + + + + + + + + +
-

Info | Register | Webmail-Login | - Manage account | Web-XMPP +

| | | + |

$msg

"; ?>
-
+
-
+
-
+
-
+
- +