Skip to content

Commit a008884

Browse files
committed
Merged revisions 3536-3555 from 3.0.5 stable branch.
1 parent ae171fa commit a008884

File tree

166 files changed

+1358
-906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1358
-906
lines changed

interface/lib/classes/ispcmail.inc.php

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class ispcmail {
5555
private $body = '';
5656
private $_mail_sender = '';
5757
private $_sent_mails = 0;
58+
private $user_agent = 'ISPConfig/3 (Mailer Class)';
5859
/**#@-*/
5960

6061
/**
@@ -100,6 +101,22 @@ class ispcmail {
100101
* How many mails should be sent via one single smtp connection
101102
*/
102103
private $smtp_max_mails = 20;
104+
/**
105+
* Should the mail be signed
106+
*/
107+
private $sign_email = false;
108+
/**
109+
* The cert and key to use for email signing
110+
*/
111+
private $sign_key = '';
112+
private $sign_key_pass = '';
113+
private $sign_cert = '';
114+
private $sign_bundle = '';
115+
private $_is_signed = false;
116+
/**
117+
* get disposition notification
118+
*/
119+
private $notification = false;
103120
/**#@-*/
104121

105122
public function __construct($options = array()) {
@@ -110,6 +127,7 @@ public function __construct($options = array()) {
110127
$this->attachments = array();
111128

112129
$this->headers['MIME-Version'] = '1.0';
130+
$this->headers['User-Agent'] = $this->user_agent;
113131
if(is_array($options) && count($options) > 0) $this->setOptions($options);
114132
}
115133

@@ -155,9 +173,27 @@ public function setOption($key, $value) {
155173
if($value != 'ssl' && $value != 'tls') $value = '';
156174
$this->smtp_crypt = $value;
157175
break;
176+
case 'sign_email':
177+
$this->sign_email = ($value == true ? true : false);
178+
break;
179+
case 'sign_key':
180+
$this->sign_key = $value;
181+
break;
182+
case 'sign_key_pass':
183+
$this->sign_key_pass = $value;
184+
break;
185+
case 'sign_cert':
186+
$this->sign_cert = $value;
187+
break;
188+
case 'sign_bundle':
189+
$this->sign_bundle = $value;
190+
break;
158191
case 'mail_charset':
159192
$this->mail_charset = $value;
160193
break;
194+
case 'notify':
195+
$this->notification = ($value == true ? true : false);
196+
break;
161197
}
162198
}
163199

@@ -394,7 +430,8 @@ private function create() {
394430
$this->body .= "--{$this->mime_boundary}\n" .
395431
"Content-Type: " . $att['type'] . ";\n" .
396432
" name=\"" . $att['filename'] . "\"\n" .
397-
"Content-Transfer-Encoding: base64\n\n" .
433+
"Content-Transfer-Encoding: base64\n" .
434+
"Content-Disposition: attachment;\n\n" .
398435
chunk_split(base64_encode($att['content'])) . "\n\n";
399436
}
400437
}
@@ -415,6 +452,44 @@ private function create() {
415452
}
416453
}
417454

455+
/**
456+
* Function to sign an email body
457+
*/
458+
private function sign() {
459+
if($this->sign_email == false || $this->sign_key == '' || $this->sign_cert == '') return false;
460+
if(function_exists('openssl_pkcs7_sign') == false) return false;
461+
462+
$tmpin = tempnam(sys_get_temp_dir(), 'sign');
463+
$tmpout = tempnam(sys_get_temp_dir(), 'sign');
464+
if(!file_exists($tmpin) || !is_writable($tmpin)) return false;
465+
466+
file_put_contents($tmpin, 'Content-Type: ' . $this->getHeader('Content-Type') . "\n\n" . $this->body);
467+
$tmpf_key = tempnam(sys_get_temp_dir(), 'sign');
468+
file_put_contents($tmpf_key, $this->sign_key);
469+
$tmpf_cert = tempnam(sys_get_temp_dir(), 'sign');
470+
file_put_contents($tmpf_cert, $this->sign_cert);
471+
if($this->sign_bundle != '') {
472+
$tmpf_bundle = tempnam(sys_get_temp_dir(), 'sign');
473+
file_put_contents($tmpf_bundle, $this->sign_bundle);
474+
openssl_pkcs7_sign($tmpin, $tmpout, 'file://' . realpath($tmpf_cert), array('file://' . realpath($tmpf_key), $this->sign_key_pass), array(), PKCS7_DETACHED, realpath($tmpf_bundle));
475+
} else {
476+
openssl_pkcs7_sign($tmpin, $tmpout, 'file://' . realpath($tmpf_cert), array('file://' . realpath($tmpf_key), $this->sign_key_pass), array());
477+
}
478+
unlink($tmpin);
479+
unlink($tmpf_cert);
480+
unlink($tmpf_key);
481+
if(file_exists($tmpf_bundle)) unlink($tmpf_bundle);
482+
483+
if(!file_exists($tmpout) || !is_readable($tmpout)) return false;
484+
$this->body = file_get_contents($tmpout);
485+
unlink($tmpout);
486+
487+
unset($this->headers['Content-Type']);
488+
unset($this->headers['MIME-Version']);
489+
490+
$this->_is_signed = true;
491+
}
492+
418493
/**
419494
* Function to encode a header if necessary
420495
* according to RFC2047
@@ -496,6 +571,7 @@ public function send($recipients) {
496571
else $this->_crlf = "\n";
497572

498573
$this->create();
574+
if($this->sign_email == true) $this->sign();
499575

500576
$subject = '';
501577
if (!empty($this->headers['Subject'])) {
@@ -506,6 +582,8 @@ public function send($recipients) {
506582
unset($this->headers['Subject']);
507583
}
508584

585+
if($this->notification == true) $this->setHeader('Disposition-Notification-To', $this->getHeader('From'));
586+
509587
unset($this->headers['To']); // always reset the To header to prevent from sending to multiple users at once
510588
$this->headers['Date'] = date('r'); //date('D, d M Y H:i:s O');
511589

@@ -554,7 +632,7 @@ public function send($recipients) {
554632
$mail_content .= 'To: ' . $this->getHeader('To') . $this->_crlf;
555633
if($this->getHeader('Bcc') != '') $mail_content .= 'Bcc: ' . $this->_encodeHeader($this->getHeader('Bcc'), $this->mail_charset) . $this->_crlf;
556634
if($this->getHeader('Cc') != '') $mail_content .= 'Cc: ' . $this->_encodeHeader($this->getHeader('Cc'), $this->mail_charset) . $this->_crlf;
557-
$mail_content .= implode($this->_crlf, $headers) . $this->_crlf . $this->_crlf . $this->body;
635+
$mail_content .= implode($this->_crlf, $headers) . $this->_crlf . ($this->_is_signed == false ? $this->_crlf : '') . $this->body;
558636

559637
fputs($this->_smtp_conn, $mail_content . $this->_crlf . '.' . $this->_crlf);
560638
$response = fgets($this->_smtp_conn, 515);
@@ -605,6 +683,7 @@ public function finish() {
605683
$this->html_part = '';
606684

607685
$this->headers['MIME-Version'] = '1.0';
686+
$this->headers['User-Agent'] = $this->user_agent;
608687

609688
$this->smtp_helo = '';
610689
$this->smtp_host = '';
@@ -615,6 +694,7 @@ public function finish() {
615694
$this->smtp_crypt = false;
616695
$this->mail_charset = 'UTF-8';
617696
$this->_sent_mails = 0;
697+
618698
return;
619699
}
620700
}

interface/lib/lang/de.lng

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ $wb['top_menu_sites'] = 'Webseiten';
3636
$wb['top_menu_dns'] = 'DNS';
3737
$wb['top_menu_tools'] = 'Einstellungen';
3838
$wb['top_menu_help'] = 'Support';
39-
$wb['top_menu_billing'] = 'Billing';
40-
$wb['top_menu_mailuser'] = 'Mailuser';
39+
$wb['top_menu_billing'] = 'Fakturierung';
40+
$wb['top_menu_mailuser'] = 'Mail Benutzer';
4141
$wb['top_menu_domain'] = 'Domains';
4242
$wb['top_menu_dashboard'] = 'Home';
4343
$wb['latest_news_txt'] = 'Neuigkeiten';
@@ -70,7 +70,7 @@ $wb['monthnamesshort_nov'] = 'Nov';
7070
$wb['monthnamesshort_dec'] = 'Dez';
7171
$wb['datepicker_nextText'] = 'Vor';
7272
$wb['datepicker_prevText'] = 'Zurück';
73-
$wb['logout_txt'] = 'Logout';
73+
$wb['logout_txt'] = 'Abmelden';
7474
$wb['submit_confirmation'] = 'Wollen Sie diese Aktion wirlich ausführen?';
7575
$wb['globalsearch_resultslimit_of_txt'] = 'von';
7676
$wb['globalsearch_resultslimit_results_txt'] = 'Treffern';

interface/web/admin/lib/lang/de.lng

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ $wb['Add group'] = 'Gruppe hinzufügen';
1111
$wb['Edit group'] = 'Gruppe bearbeiten';
1212
$wb['Edit server'] = 'Server bearbeiten';
1313
$wb['Sync. Now'] = 'Jetzt synchronisieren';
14-
$wb['DB Sync.'] = 'DB Synchronisation';
15-
$wb['User Management'] = 'User Management';
16-
$wb['CP Users'] = 'CP-Benutzer';
17-
$wb['Remote Users'] = 'Remote-Benutzer';
14+
$wb['DB Sync.'] = 'Datenbank Synchronisation';
15+
$wb['User Management'] = 'Benutzerverwaltung';
16+
$wb['CP Users'] = 'CP Benutzer';
17+
$wb['Remote Users'] = 'Remote Benutzer';
1818
$wb['System'] = 'System';
19-
$wb['Server Services'] = 'Server-Dienste';
19+
$wb['Server Services'] = 'Server Dienste';
2020
$wb['Services'] = 'Dienste';
2121
$wb['Server Config'] = 'Serverkonfiguration';
2222
$wb['Server'] = 'Server';
@@ -25,26 +25,26 @@ $wb['Getmail'] = 'Getmail';
2525
$wb['Web'] = 'Web';
2626
$wb['FastCGI'] = 'FastCGI';
2727
$wb['Jailkit'] = 'Jailkit';
28-
$wb['Rescue'] = 'Rescue';
29-
$wb['Server IP addresses'] = 'Server IP-Adressen';
30-
$wb['Additional PHP Versions'] = 'Zusätzliche PHP-Versionen';
31-
$wb['Directive Snippets'] = 'Direktiven-Schnipsel';
28+
$wb['Rescue'] = 'Überwachung';
29+
$wb['Server IP addresses'] = 'Server IP Adressen';
30+
$wb['Additional PHP Versions'] = 'Zusätzliche PHP Versionen';
31+
$wb['Directive Snippets'] = 'Direktiven Schnipsel';
3232
$wb['Firewall'] = 'Firewall';
33-
$wb['Interface'] = 'Interface';
34-
$wb['Interface Config'] = 'Main Config';
33+
$wb['Interface'] = 'Benutzeroberfläche';
34+
$wb['Interface Config'] = 'Einstellungen';
3535
$wb['Domains'] = 'Domains';
36-
$wb['Misc'] = 'Misc';
36+
$wb['Misc'] = 'Diverses';
3737
$wb['Software'] = 'Apps & Addons';
38-
$wb['Repositories'] = 'Repositories';
39-
$wb['Packages'] = 'Packages';
38+
$wb['Repositories'] = 'Bibliotheken';
39+
$wb['Packages'] = 'Pakete';
4040
$wb['Updates'] = 'Updates';
41-
$wb['Language Editor'] = 'Sprachen-Editor';
41+
$wb['Language Editor'] = 'Sprachen Editor';
4242
$wb['Languages'] = 'Sprachen';
4343
$wb['New Language'] = 'Neue Sprache';
4444
$wb['Merge'] = 'Zusammenführen';
4545
$wb['Export'] = 'Exportieren';
4646
$wb['Import'] = 'Importieren';
47-
$wb['Remote Actions'] = 'Remote Actions';
48-
$wb['Do OS-Update'] = 'Do OS-Update';
49-
$wb['Do ISPConfig-Update'] = 'Do ISPConfig-Update';
47+
$wb['Remote Actions'] = 'Wartung';
48+
$wb['Do OS-Update'] = 'Betriebssystem Update';
49+
$wb['Do ISPConfig-Update'] = 'ISPConfig Update';
5050
?>
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
2-
$wb["Directive Snippets"] = 'Direktiven-Schnipsel';
3-
$wb["name_txt"] = 'Name des Schnipsels';
4-
$wb["type_txt"] = 'Typ';
5-
$wb["snippet_txt"] = 'Schnipsel';
6-
$wb["active_txt"] = 'Aktiv';
7-
$wb["directive_snippets_name_empty"] = 'Bitte geben Sie einen Namen für den Schnipsel an.';
8-
$wb["directive_snippets_name_error_unique"] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.';
9-
?>
2+
$wb['Directive Snippets'] = 'Direktiven Schnipsel';
3+
$wb['name_txt'] = 'Name des Schnipsels';
4+
$wb['type_txt'] = 'Typ';
5+
$wb['snippet_txt'] = 'Schnipsel';
6+
$wb['active_txt'] = 'Aktiv';
7+
$wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Schnipsel an.';
8+
$wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.';
9+
?>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
$wb["list_head_txt"] = 'Direcktiven-Schnipsel';
3-
$wb["active_txt"] = 'Aktiv';
4-
$wb["name_txt"] = 'Name des Schnipsels';
5-
$wb["type_txt"] = 'Typ';
6-
$wb["add_new_record_txt"] = 'Direcktiven-Schnipsel hinzufügen';
7-
?>
2+
$wb['list_head_txt'] = 'Direcktiven Schnipsel';
3+
$wb['active_txt'] = 'Aktiv';
4+
$wb['name_txt'] = 'Name des Schnipsels';
5+
$wb['type_txt'] = 'Typ';
6+
$wb['add_new_record_txt'] = 'Direcktiven Schnipsel hinzufügen';
7+
?>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
$wb['server_id_txt'] = 'Server';
3-
$wb['tcp_port_txt'] = 'Offene TCP-Ports';
4-
$wb['udp_port_txt'] = 'Offene UDP-Ports';
3+
$wb['tcp_port_txt'] = 'Offene TCP Ports';
4+
$wb['udp_port_txt'] = 'Offene UDP Ports';
55
$wb['tcp_port_help_txt'] = 'Getrennt durch Kommata';
66
$wb['udp_port_help_txt'] = 'Getrennt durch Kommata';
77
$wb['active_txt'] = 'Aktiv';
88
$wb['firewall_error_unique'] = 'Es gibt bereits einen Firewalldatensatz für diesen Server.';
9-
$wb['tcp_ports_error_regex'] = 'Zeichen nicht erlaubt in TCP-Port Definition. Erlaubte Zeichen sind Nummern, : und ,.';
10-
$wb['udp_ports_error_regex'] = 'Zeichen nicht erlaubt in UDP-Port Definition. Erlaubte Zeichen sind Nummern, : und ,.';
9+
$wb['tcp_ports_error_regex'] = 'Zeichen nicht erlaubt in TCP Port Definition. Erlaubte Zeichen sind Nummern, : und ,.';
10+
$wb['udp_ports_error_regex'] = 'Zeichen nicht erlaubt in UDP Port Definition. Erlaubte Zeichen sind Nummern, : und ,.';
1111
?>

interface/web/admin/lib/lang/de_firewall_list.lng

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$wb['list_head_txt'] = 'Firewall';
33
$wb['active_txt'] = 'Aktiv';
44
$wb['server_id_txt'] = 'Server';
5-
$wb['tcp_port_txt'] = 'Offene TCP-Ports';
6-
$wb['udp_port_txt'] = 'Offene UDP-Ports';
5+
$wb['tcp_port_txt'] = 'Offene TCP Ports';
6+
$wb['udp_port_txt'] = 'Offene UD Ports';
77
$wb['add_new_record_txt'] = 'Firewalleintrag hinzufügen';
88
?>

interface/web/admin/lib/lang/de_iptables.lng

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ $wb['multiport_txt'] = 'Multi Port';
44
$wb['singleport_txt'] = 'Single Port';
55
$wb['protocol_txt'] = 'Protokoll';
66
$wb['table_txt'] = 'Table';
7-
$wb['target_txt'] = 'Target';
8-
$wb['state_txt'] = 'State';
9-
$wb['destination_ip_txt'] = 'Destination Address';
10-
$wb['source_ip_txt'] = 'Source Address';
7+
$wb['target_txt'] = 'Ziel';
8+
$wb['state_txt'] = 'Status';
9+
$wb['destination_ip_txt'] = 'Ziel Address';
10+
$wb['source_ip_txt'] = 'Ausgangs Adresse';
1111
$wb['active_txt'] = 'Aktiv';
12-
$wb['iptables_error_unique'] = 'Es besteht bereits eine Firewall-Regel für diesen Server.';
12+
$wb['iptables_error_unique'] = 'Es besteht bereits eine Firewall Regel für diesen Server.';
1313
?>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22
$wb['list_head_txt'] = 'IPTables';
3-
$wb['add_new_rule_txt'] = 'Neue IPTables-Regel hinzufügen';
3+
$wb['add_new_rule_txt'] = 'Neue IPTables Regel hinzufügen';
44
$wb['server_id_txt'] = 'Server';
55
$wb['multiport_txt'] = 'Multi Port';
66
$wb['singleport_txt'] = 'Single Port';
77
$wb['protocol_txt'] = 'Protokoll';
88
$wb['table_txt'] = 'Table';
9-
$wb['target_txt'] = 'Target';
10-
$wb['state_txt'] = 'State';
11-
$wb['destination_ip_txt'] = 'Destination Address';
12-
$wb['source_ip_txt'] = 'Source Address';
9+
$wb['target_txt'] = 'Ziel';
10+
$wb['state_txt'] = 'Status';
11+
$wb['destination_ip_txt'] = 'Ziel Adresse';
12+
$wb['source_ip_txt'] = 'Ausgangs Adresse';
1313
$wb['active_txt'] = 'Aktiv';
14-
$wb['iptables_error_unique'] = 'Es besteht bereits eine Firewall-Regel für diesen Server.';
14+
$wb['iptables_error_unique'] = 'Es besteht bereits eine Firewall Regel für diesen Server.';
1515
?>

interface/web/admin/lib/lang/de_language_edit.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
$wb['list_head_txt'] = 'Sprachdatei-Editor';
2+
$wb['list_head_txt'] = 'Sprachdatei Editor';
33
$wb['language_select_txt'] = 'Sprache auswählen';
44
$wb['module_txt'] = 'Modul';
55
$wb['lang_file_txt'] = 'Sprachdatei';

0 commit comments

Comments
 (0)