Skip to content

Commit a59ad3a

Browse files
committed
Merged revisions 1806-1811,1816 from stable.
1 parent f8ec4be commit a59ad3a

File tree

8 files changed

+32
-12
lines changed

8 files changed

+32
-12
lines changed

interface/lib/classes/listform.inc.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,17 @@ public function getSearchSQL($sql_where = '')
129129
//* Get config variable
130130
$list_name = $this->listDef['name'];
131131
$search_prefix = $this->listDef['search_prefix'];
132+
133+
if(isset($_REQUEST['Filter']) && !isset($_SESSION['search'][$list_name])) {
134+
//* Jump back to page 1 of the list when a new search gets started.
135+
$_SESSION['search'][$list_name]['page'] = 0;
136+
}
132137

133138
//* store retrieval query
134139
foreach($this->listDef['item'] as $i) {
135140
$field = $i['field'];
136141

137-
//*TODO: comment = hat sich die suche ge�ndert
142+
//* The search string has been changed
138143
if(isset($_REQUEST[$search_prefix.$field]) && isset($_SESSION['search'][$list_name][$search_prefix.$field]) && $_REQUEST[$search_prefix.$field] != $_SESSION['search'][$list_name][$search_prefix.$field]){
139144
$this->searchChanged = 1;
140145

interface/web/dns/form/dns_soa.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
1 => array ( 'type' => 'UNIQUE',
8383
'errmsg'=> 'origin_error_unique'),
8484
2 => array ( 'type' => 'REGEX',
85-
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}[\.]{0,1}$/',
85+
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z]{2,10}[\.]{0,1}$/',
8686
'errmsg'=> 'origin_error_regex'),
8787
),
8888
'default' => '',

server/conf/autoresponder.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if ($RETURNCODE==1)
1313
RESPONDDB="{vmail_mailbox_base}/mailfilters/$HOST/$USER/.vacation.lst"
1414

1515
# The following must be one contiguous line
16-
cc "| mailbot -t $RESPOND -d $RESPONDDB -D 1 \
16+
cc "| mailbot -t $RESPOND -d $RESPONDDB -c 'UTF-8' -D 1 \
1717
-A 'From: $RECIPIENT' -s 'Auto Response: from $RECIPIENT' \
1818
/usr/sbin/sendmail -t -f ''"
1919
}

server/conf/bind_named.conf.local.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<tmpl_if name='zone'>
44
zone "<tmpl_var name='zone'>" {
55
type master;
6-
file "<tmpl_var name='zonefile_path'>";
6+
<tmpl_var name='options'> file "<tmpl_var name='zonefile_path'>";
77
};
88
</tmpl_if>
99
</tmpl_loop>

server/conf/bind_pri.domain.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $TTL {tmpl_var name='ttl'}
3939
{tmpl_var name='name'} RP {tmpl_var name='data'}
4040
</tmpl_if>
4141
<tmpl_if name="type" op='==' value='SRV'>
42-
{tmpl_var name='name'} SRV {tmpl_var name='data'}
42+
{tmpl_var name='name'} SRV 0 {tmpl_var name='data'}
4343
</tmpl_if>
4444
<tmpl_if name="type" op='==' value='TXT'>
4545
{tmpl_var name='name'} TXT {tmpl_var name='data'}

server/lib/classes/system.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,9 @@ function maildirmake($maildir_path, $user = '', $subfolder = '') {
12021202

12031203
if($user != '' && $this->is_user($user) && $user != 'root') {
12041204
$user = escapeshellarg($user);
1205-
exec("chown $user $dir $dir_cur $dir_new $dir_tmp");
1205+
// I assume that the name of the (vmail group) is the same as the name of the mail user in ispconfig 3
1206+
$group = $user;
1207+
exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp");
12061208
}
12071209

12081210
//* Add the subfolder to the subscriptions and courierimapsubscribed files

server/plugins-available/bind_plugin.inc.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ function soa_update($event_name,$data) {
9999

100100
$records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$zone['id']." AND active = 'Y'");
101101
$tpl->setLoop('zones',$records);
102+
102103

103104
$filename = escapeshellcmd($dns_config['bind_zonefiles_dir'].'/pri.'.substr($zone['origin'],0,-1));
104105
$app->log("Writing BIND domain file: ".$filename,LOGLEVEL_DEBUG);
105106
file_put_contents($filename,$tpl->grab());
106107
exec('chown '.escapeshellcmd($dns_config['bind_user']).':'.escapeshellcmd($dns_config['bind_group']).' '.$filename);
107108
unset($tpl);
108109
unset($records);
110+
unset($records_out);
109111
unset($zone);
110112
}
111113

@@ -136,9 +138,9 @@ function soa_delete($event_name,$data) {
136138
$this->write_named_conf($data,$dns_config);
137139

138140
//* Delete the domain file
139-
$filename = $dns_config['bind_zonefiles_dir'].'/pri.'.substr($data['old']['origin'],0,-1);
140-
if(is_file($filename)) unset($filename);
141-
$app->log("Deleting BIND domain file: ".$filename,LOGLEVEL_DEBUG);
141+
$zone_file_name = $dns_config['bind_zonefiles_dir'].'/pri.'.substr($data['old']['origin'],0,-1);
142+
if(is_file($zone_file_name)) unlink($zone_file_name);
143+
$app->log("Deleting BIND domain file: ".$zone_file_name,LOGLEVEL_DEBUG);
142144

143145
//* Reload bind nameserver
144146
$app->services->restartServiceDelayed('bind','reload');
@@ -186,11 +188,18 @@ function rr_delete($event_name,$data) {
186188
function write_named_conf($data, $dns_config) {
187189
global $app, $conf;
188190

189-
$tmps = $app->db->queryAllRecords("SELECT origin FROM dns_soa WHERE active = 'Y'");
191+
$tmps = $app->db->queryAllRecords("SELECT origin, xfer, also_notify FROM dns_soa WHERE active = 'Y'");
190192
$zones = array();
193+
191194
foreach($tmps as $tmp) {
195+
196+
$options = '';
197+
if(trim($tmp['xfer']) != '') $options .= ' allow-transfer {'.str_replace(',',';',$tmp['xfer']).";};\n";
198+
if(trim($tmp['also_notify']) != '') $options .= ' also-notify {'.str_replace(',',';',$tmp['also_notify']).";};\n";
199+
192200
$zones[] = array( 'zone' => substr($tmp['origin'],0,-1),
193-
'zonefile_path' => $dns_config['bind_zonefiles_dir'].'/pri.'.substr($tmp['origin'],0,-1)
201+
'zonefile_path' => $dns_config['bind_zonefiles_dir'].'/pri.'.substr($tmp['origin'],0,-1),
202+
'options' => $options
194203
);
195204
}
196205

server/plugins-available/postfix_server_plugin.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ function update($event_name,$data) {
8686

8787
if($mail_config["relayhost"] != '') {
8888
exec("postconf -e 'relayhost = ".$mail_config["relayhost"]."'");
89-
exec("postconf -e 'smtp_sasl_auth_enable = yes'");
89+
if($mail_config["relayhost_user"] != '' && $mail_config["relayhost_password"] != '') {
90+
exec("postconf -e 'smtp_sasl_auth_enable = yes'");
91+
} else {
92+
exec("postconf -e 'smtp_sasl_auth_enable = no'");
93+
}
9094
exec("postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'");
9195
exec("postconf -e 'smtp_sasl_security_options ='");
9296

0 commit comments

Comments
 (0)