Skip to content

Commit 4c0bc29

Browse files
committed
Addad a function to disable poip3 and imap per user account.
1 parent fe11e42 commit 4c0bc29

File tree

6 files changed

+31
-2
lines changed

6 files changed

+31
-2
lines changed

install/sql/ispconfig3.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ CREATE TABLE `mail_user` (
448448
`custom_mailfilter` text,
449449
`postfix` enum('y','n') NOT NULL,
450450
`access` enum('y','n') NOT NULL,
451+
`disableimap` enum('0','1') NOT NULL default '0',
452+
`disablepop3` enum('0','1') NOT NULL default '0',
451453
PRIMARY KEY (`mailuser_id`),
452454
KEY `server_id` (`server_id`,`email`),
453455
KEY `email_access` (`email`,`access`)

install/tpl/authmysqlrc.master

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ MYSQL_MAILDIR_FIELD maildir
1414
#MYSQL_NAME_FIELD
1515
#MYSQL_QUOTA_FIELD quota
1616
MYSQL_QUOTA_FIELD concat(quota,'S')
17-
MYSQL_WHERE_CLAUSE access='y'
17+
#MYSQL_WHERE_CLAUSE access='y'
18+
MYSQL_AUXOPTIONS_FIELD concat('disableimap=',disableimap,',disablepop3=',disablepop3)

interface/web/admin/form/firewall.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
'regex' => '/^[\s0-9\,]{0,255}$/',
8080
'errmsg'=> 'tcp_ports_error_regex'),
8181
),
82-
'default' => '21,22,25,53,80,110,443,8080,10000',
82+
'default' => '20,21,22,25,53,80,110,443,8080,10000',
8383
'value' => '',
8484
'width' => '30',
8585
'maxlength' => '255'

interface/web/mail/form/mail_user.tform.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,26 @@
137137
'default' => 'y',
138138
'value' => array(1 => 'y',0 => 'n')
139139
),
140+
/*
140141
'access' => array (
141142
'datatype' => 'VARCHAR',
142143
'formtype' => 'CHECKBOX',
143144
'default' => 'y',
144145
'value' => array(1 => 'y',0 => 'n')
145146
),
147+
*/
148+
'disableimap' => array (
149+
'datatype' => 'VARCHAR',
150+
'formtype' => 'CHECKBOX',
151+
'default' => '0',
152+
'value' => array(1 => '1',0 => '0')
153+
),
154+
'disablepop3' => array (
155+
'datatype' => 'VARCHAR',
156+
'formtype' => 'CHECKBOX',
157+
'default' => 'y',
158+
'value' => array(1 => '1',0 => '0')
159+
),
146160
##################################
147161
# ENDE Datatable fields
148162
##################################

interface/web/mail/lib/lang/en_mail_user.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ $wb["limit_mailbox_txt"] = 'The max. number of mailboxes for your account is rea
2424
$wb["limit_mailquota_txt"] = 'The max space for mailboxes is reached. The max. available space in MB is';
2525
$wb["welcome_mail_subject"] = 'Welcome to your new email account.';
2626
$wb["welcome_mail_message"] = "Welcome to your new email account.\n\nYour webmaster.";
27+
$wb["disableimap_txt"] = 'Disable IMAP';
28+
$wb["disablepop3_txt"] = 'Disable POP3';
2729
?>

interface/web/mail/templates/mail_user_mailbox_edit.htm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,20 @@
2323
<td width="126" class="frmText11">{tmpl_var name='postfix_txt'}:</td>
2424
<td width="366" class="frmText11">{tmpl_var name='postfix'}</td>
2525
</tr>
26+
<tr>
27+
<td width="126" class="frmText11">{tmpl_var name='disableimap_txt'}:</td>
28+
<td width="366" class="frmText11">{tmpl_var name='disableimap'}</td>
29+
</tr>
30+
<tr>
31+
<td width="126" class="frmText11">{tmpl_var name='disablepop3_txt'}:</td>
32+
<td width="366" class="frmText11">{tmpl_var name='disablepop3'}</td>
33+
</tr>
34+
<!--
2635
<tr>
2736
<td width="126" class="frmText11">{tmpl_var name='access_txt'}:</td>
2837
<td width="366" class="frmText11">{tmpl_var name='access'}</td>
2938
</tr>
39+
-->
3040
<tr>
3141
<td class="frmText11">&nbsp;</td>
3242
<td class="frmText11">&nbsp;</td>

0 commit comments

Comments
 (0)