Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Helmo
ISPConfig 3
Commits
1e8064d9
Unverified
Commit
1e8064d9
authored
Aug 24, 2022
by
Helmo
Browse files
Merge remote-tracking branch 'origin/develop' into patch-bind-zonefiles-prefix
parents
7b467d17
51f507e0
Pipeline
#11894
passed with stage
in 6 minutes and 48 seconds
Changes
224
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
install/lib/installer_base.lib.php
View file @
1e8064d9
...
...
@@ -3847,6 +3847,10 @@ class installer_base {
$root_cron_jobs
[]
=
"0 0 * * * "
.
$install_dir
.
"/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null"
;
}
if
(
$conf
[
'services'
][
'mail'
]
==
1
)
{
$root_cron_jobs
[]
=
"30 23 * * * "
.
$install_dir
.
"/server/scripts/handle_mailbox_soft_deleted.sh &> /dev/null"
;
}
foreach
(
$root_cron_jobs
as
$cron_job
)
{
if
(
!
in_array
(
$cron_job
.
"
\n
"
,
$existing_root_cron_jobs
))
{
$existing_root_cron_jobs
[]
=
$cron_job
.
"
\n
"
;
...
...
install/sql/incremental/upd_dev_collection.sql
View file @
1e8064d9
ALTER
TABLE
`sys_user`
ADD
`otp_type`
SET
(
'none'
,
'email'
)
NOT
NULL
DEFAULT
'none'
AFTER
`lost_password_reqtime`
,
ADD
`otp_data`
VARCHAR
(
255
)
NULL
AFTER
`otp_type`
,
ADD
`otp_recovery`
VARCHAR
(
64
)
NULL
AFTER
`otp_data`
,
ADD
`otp_attempts`
TINYINT
NOT
NULL
DEFAULT
'0'
AFTER
`otp_recovery`
;
install/sql/ispconfig3.sql
View file @
1e8064d9
...
...
@@ -1842,6 +1842,10 @@ CREATE TABLE `sys_user` (
`lost_password_function`
tinyint
(
1
)
NOT
NULL
default
'1'
,
`lost_password_hash`
VARCHAR
(
50
)
NOT
NULL
default
''
,
`lost_password_reqtime`
DATETIME
NULL
default
NULL
,
`otp_type`
set
(
'none'
,
'email'
)
NOT
NULL
DEFAULT
'none'
,
`otp_data`
varchar
(
255
)
DEFAULT
NULL
,
`otp_recovery`
varchar
(
64
)
DEFAULT
NULL
,
`otp_attempts`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
,
PRIMARY
KEY
(
`userid`
)
)
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
1
;
...
...
install/tpl/debian6_dovecot-sql.conf.master
View file @
1e8064d9
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# CREATE TABLE users (
# userid VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
driver = mysql
connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port}
...
...
@@ -20,4 +11,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
# iterate_query = SELECT email as user FROM mail_user WHERE
disabledoveadm='n' AND
server_id = '{server_id}'
install/tpl/debian_dovecot-sql.conf.master
View file @
1e8064d9
# This file is opened as root, so it should be owned by root and mode 0600.
#
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# For the sql passdb module, you'll need a database with a table that
# contains fields for at least the userid and password. If you want to
# use the user@domain syntax, you might want to have a separate domain
# field as well.
#
# If your users all have the same uig/gid, and have predictable home
# directories, you can use the static userdb module to generate the home
# dir based on the userid and domain. In this case, you won't need fields
# for home, uid, or gid in the database.
#
# If you prefer to use the sql userdb module, you'll want to add fields
# for home, uid, and gid. Here is an example table:
#
# CREATE TABLE users (
# userid VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
# Database driver: mysql, pgsql, sqlite
#driver =
# Database connection string. This is driver-specific setting.
#
# pgsql:
# For available options, see the PostgreSQL documention for the
# PQconnectdb function of libpq.
#
# mysql:
# Basic options emulate PostgreSQL option names:
# host, port, user, password, dbname
#
# But also adds some new settings:
# client_flags - See MySQL manual
# ssl_ca, ssl_ca_path - Set either one or both to enable SSL
# ssl_cert, ssl_key - For sending client-side certificates to server
# ssl_cipher - Set minimum allowed cipher security (default: HIGH)
#
# You can connect to UNIX sockets by using host: host=/var/run/mysqld/mysqld.sock
# Note that currently you can't use spaces in parameters.
#
# sqlite:
# The path to the database file.
#
# Examples:
# connect = host=192.168.1.1 dbname=users
# connect = host=sql.example.com dbname=virtual user=virtual password=blarg
# connect = /etc/dovecot/authdb.sqlite
#
#connect = dbname=virtual user=virtual
# Default password scheme.
#
# List of supported schemes is in
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = PLAIN-MD5
# Query to retrieve the password.
#
# This query must return only one row with "user" and "password" columns.
# The query can also return other fields which have a special meaning, see
# http://wiki.dovecot.org/PasswordDatabase/ExtraFields
#
# The "user" column is needed to make sure the username gets used with exactly
# the same casing as it's in the database. Note that if you store username and
# domain in separate fields, you most likely want to return a combination of
# them as the "user" column, otherwise the domain gets stripped.
#
# Commonly used available substitutions (see
# http://wiki.dovecot.org/Variables for full list):
# %u = entire userid
# %n = user part of user@domain
# %d = domain part of user@domain
#
# Note that these can be used only as input to SQL query. If the query outputs
# any of these substitutions, they're not touched. Otherwise it would be
# difficult to have eg. usernames containing '%' characters.
#
# Example:
# password_query = SELECT concat(userid, '@', domain) AS user, password FROM users WHERE userid = '%n' AND domain = '%d'
# password_query = SELECT pw AS password FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = SELECT userid as user, password FROM users WHERE userid = '%u'
# Query to retrieve the user information.
#
# The query must return only one row. Commonly returned columns are:
# uid - System UID
# gid - System GID
# home - Home directory
# mail - Mail location
#
# Either home or mail is required. uid and gid are required. If more than one
# row is returned or there are missing fields, the login will fail. For a list
# of all fields that can be returned, see
# http://wiki.dovecot.org/UserDatabase/ExtraFields
#
# Examples
# user_query = SELECT home, uid, gid FROM users WHERE userid = '%n' AND domain = '%d'
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
#password_query = SELECT userid as user, password, home as userdb_home, uid as userdb_uid, gid as userdb_gid FROM users WHERE userid = '%u'
driver = mysql
connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port}
...
...
@@ -127,5 +11,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
# iterate_query = SELECT email as user FROM mail_user WHERE disabledoveadm='n' AND server_id = '{server_id}'
install/tpl/fedora_dovecot-sql.conf.master
View file @
1e8064d9
# This file is opened as root, so it should be owned by root and mode 0600.
#
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# For the sql passdb module, you'll need a database with a table that
# contains fields for at least the username and password. If you want to
# use the user@domain syntax, you might want to have a separate domain
# field as well.
#
# If your users all have the same uig/gid, and have predictable home
# directories, you can use the static userdb module to generate the home
# dir based on the username and domain. In this case, you won't need fields
# for home, uid, or gid in the database.
#
# If you prefer to use the sql userdb module, you'll want to add fields
# for home, uid, and gid. Here is an example table:
#
# CREATE TABLE users (
# username VARCHAR(128) NOT NULL,
# domain VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
# Database driver: mysql, pgsql, sqlite
#driver =
# Database connection string. This is driver-specific setting.
#
# pgsql:
# For available options, see the PostgreSQL documention for the
# PQconnectdb function of libpq.
#
# mysql:
# Basic options emulate PostgreSQL option names:
# host, port, user, password, dbname
#
# But also adds some new settings:
# client_flags - See MySQL manual
# ssl_ca, ssl_ca_path - Set either one or both to enable SSL
# ssl_cert, ssl_key - For sending client-side certificates to server
# ssl_cipher - Set minimum allowed cipher security (default: HIGH)
# option_file - Read options from the given file instead of
# the default my.cnf location
# option_group - Read options from the given group (default: client)
#
# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
# Note that currently you can't use spaces in parameters.
#
# MySQL supports multiple host parameters for load balancing / HA.
#
# sqlite:
# The path to the database file.
#
# Examples:
# connect = host=192.168.1.1 dbname=users
# connect = host=sql.example.com dbname=virtual user=virtual password=blarg
# connect = /etc/dovecot/authdb.sqlite
#
#connect =
# Default password scheme.
#
# List of supported schemes is in
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = MD5
# passdb query to retrieve the password. It can return fields:
# password - The user's password. This field must be returned.
# user - user@domain from the database. Needed with case-insensitive lookups.
# username and domain - An alternative way to represent the "user" field.
#
# The "user" field is often necessary with case-insensitive lookups to avoid
# e.g. "name" and "nAme" logins creating two different mail directories. If
# your user and domain names are in separate fields, you can return "username"
# and "domain" fields instead of "user".
#
# The query can also return other fields which have a special meaning, see
# http://wiki.dovecot.org/PasswordDatabase/ExtraFields
#
# Commonly used available substitutions (see http://wiki.dovecot.org/Variables
# for full list):
# %u = entire user@domain
# %n = user part of user@domain
# %d = domain part of user@domain
#
# Note that these can be used only as input to SQL query. If the query outputs
# any of these substitutions, they're not touched. Otherwise it would be
# difficult to have eg. usernames containing '%' characters.
#
# Example:
# password_query = SELECT userid AS user, pw AS password \
# FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = \
# SELECT username, domain, password \
# FROM users WHERE username = '%n' AND domain = '%d'
# userdb query to retrieve the user information. It can return fields:
# uid - System UID (overrides mail_uid setting)
# gid - System GID (overrides mail_gid setting)
# home - Home directory
# mail - Mail location (overrides mail_location setting)
#
# None of these are strictly required. If you use a single UID and GID, and
# home or mail directory fits to a template string, you could use userdb static
# instead. For a list of all fields that can be returned, see
# http://wiki.dovecot.org/UserDatabase/ExtraFields
#
# Examples:
# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = \
# SELECT home, uid, gid \
# FROM users WHERE username = '%n' AND domain = '%d'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
#password_query = \
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
driver = mysql
connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port}
...
...
@@ -140,4 +11,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
# iterate_query = SELECT email as user FROM mail_user WHERE
disabledoveadm='n' AND
server_id = '{server_id}'
install/tpl/opensuse_dovecot-sql.conf.master
View file @
1e8064d9
# This file is opened as root, so it should be owned by root and mode 0600.
#
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# For the sql passdb module, you'll need a database with a table that
# contains fields for at least the username and password. If you want to
# use the user@domain syntax, you might want to have a separate domain
# field as well.
#
# If your users all have the same uig/gid, and have predictable home
# directories, you can use the static userdb module to generate the home
# dir based on the username and domain. In this case, you won't need fields
# for home, uid, or gid in the database.
#
# If you prefer to use the sql userdb module, you'll want to add fields
# for home, uid, and gid. Here is an example table:
#
# CREATE TABLE users (
# username VARCHAR(128) NOT NULL,
# domain VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
# Database driver: mysql, pgsql, sqlite
#driver =
# Database connection string. This is driver-specific setting.
#
# pgsql:
# For available options, see the PostgreSQL documention for the
# PQconnectdb function of libpq.
#
# mysql:
# Basic options emulate PostgreSQL option names:
# host, port, user, password, dbname
#
# But also adds some new settings:
# client_flags - See MySQL manual
# ssl_ca, ssl_ca_path - Set either one or both to enable SSL
# ssl_cert, ssl_key - For sending client-side certificates to server
# ssl_cipher - Set minimum allowed cipher security (default: HIGH)
# option_file - Read options from the given file instead of
# the default my.cnf location
# option_group - Read options from the given group (default: client)
#
# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
# Note that currently you can't use spaces in parameters.
#
# MySQL supports multiple host parameters for load balancing / HA.
#
# sqlite:
# The path to the database file.
#
# Examples:
# connect = host=192.168.1.1 dbname=users
# connect = host=sql.example.com dbname=virtual user=virtual password=blarg
# connect = /etc/dovecot/authdb.sqlite
#
#connect =
# Default password scheme.
#
# List of supported schemes is in
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = MD5
# passdb query to retrieve the password. It can return fields:
# password - The user's password. This field must be returned.
# user - user@domain from the database. Needed with case-insensitive lookups.
# username and domain - An alternative way to represent the "user" field.
#
# The "user" field is often necessary with case-insensitive lookups to avoid
# e.g. "name" and "nAme" logins creating two different mail directories. If
# your user and domain names are in separate fields, you can return "username"
# and "domain" fields instead of "user".
#
# The query can also return other fields which have a special meaning, see
# http://wiki.dovecot.org/PasswordDatabase/ExtraFields
#
# Commonly used available substitutions (see http://wiki.dovecot.org/Variables
# for full list):
# %u = entire user@domain
# %n = user part of user@domain
# %d = domain part of user@domain
#
# Note that these can be used only as input to SQL query. If the query outputs
# any of these substitutions, they're not touched. Otherwise it would be
# difficult to have eg. usernames containing '%' characters.
#
# Example:
# password_query = SELECT userid AS user, pw AS password \
# FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = \
# SELECT username, domain, password \
# FROM users WHERE username = '%n' AND domain = '%d'
# userdb query to retrieve the user information. It can return fields:
# uid - System UID (overrides mail_uid setting)
# gid - System GID (overrides mail_gid setting)
# home - Home directory
# mail - Mail location (overrides mail_location setting)
#
# None of these are strictly required. If you use a single UID and GID, and
# home or mail directory fits to a template string, you could use userdb static
# instead. For a list of all fields that can be returned, see
# http://wiki.dovecot.org/UserDatabase/ExtraFields
#
# Examples:
# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = \
# SELECT home, uid, gid \
# FROM users WHERE username = '%n' AND domain = '%d'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
#password_query = \
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
driver = mysql
connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port}
...
...
@@ -140,4 +11,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
# iterate_query = SELECT email as user FROM mail_user WHERE
disabledoveadm='n' AND
server_id = '{server_id}'
install/tpl/server.ini.master
View file @
1e8064d9
...
...
@@ -56,10 +56,12 @@ relayhost_user=
relayhost_password=
mailbox_size_limit=0
message_size_limit=0
mailbox_soft_delete=n
mailbox_quota_stats=y
realtime_blackhole_list=zen.spamhaus.org
overquota_notify_threshold=90
overquota_notify_admin=y
overquota_notify_reseller=y
overquota_notify_client=y
overquota_notify_freq=7
overquota_notify_onok=n
...
...
@@ -103,6 +105,7 @@ enable_sni=y
skip_le_check=n
enable_ip_wildcard=y
overtraffic_notify_admin=y
overtraffic_notify_reseller=y
overtraffic_notify_client=y
nginx_cgi_socket=/var/run/fcgiwrap.socket
php_fpm_init_script=php5-fpm
...
...
@@ -121,10 +124,12 @@ php_ini_check_minutes=1
overtraffic_disable_web=y
overquota_notify_threshold=90
overquota_notify_admin=y
overquota_notify_reseller=y
overquota_notify_client=y
overquota_notify_freq=7
overquota_db_notify_threshold=90
overquota_db_notify_admin=y
overquota_db_notify_reseller=y
overquota_db_notify_client=y
overquota_notify_onok=n
logging=yes
...
...
install/tpl/system.ini.master
View file @
1e8064d9
...
...
@@ -39,6 +39,7 @@ web_php_options=no,fast-cgi,mod,php-fpm
show_aps_menu=n
client_protection=y
ssh_authentication=
le_caa_autocreate_options=y
[tools]
...
...
interface/lib/app.inc.php
100755 → 100644
View file @
1e8064d9
...
...
@@ -212,6 +212,12 @@ class app {
}
}
public
function
auth_log
(
$msg
)
{
$authlog_handle
=
fopen
(
$this
->
_conf
[
'ispconfig_log_dir'
]
.
'/auth.log'
,
'a'
);
fwrite
(
$authlog_handle
,
$msg
.
PHP_EOL
);
fclose
(
$authlog_handle
);
}
/** Priority values are: 0 = DEBUG, 1 = WARNING, 2 = ERROR */
public
function
error
(
$msg
,
$next_link
=
''
,
$stop
=
true
,
$priority
=
1
)
{
//$this->uses("error");
...
...
interface/lib/classes/functions.inc.php
View file @
1e8064d9
...
...
@@ -334,6 +334,14 @@ class functions {
$domain
=
substr
(
$domain
,
strrpos
(
$domain
,
'@'
)
+
1
);
}
// idn_to_* chokes on leading dots, but we need them for amavis, so remove it for later
if
(
substr
(
$domain
,
0
,
1
)
===
'.'
)
{
$leading_dot
=
true
;
$domain
=
substr
(
$domain
,
1
);
}
else
{
$leading_dot
=
false
;
}
if
(
$encode
==
true
)
{
if
(
function_exists
(
'idn_to_ascii'
))
{
if
(
defined
(
'IDNA_NONTRANSITIONAL_TO_ASCII'
)
&&
defined
(
'INTL_IDNA_VARIANT_UTS46'
)
&&
constant
(
'IDNA_NONTRANSITIONAL_TO_ASCII'
))
{
...
...
@@ -378,6 +386,10 @@ class functions {
}
}
if
(
$leading_dot
==
true
)
{
$domain
=
'.'
.
$domain
;
}
if
(
$user_part
!==
false
)
return
$user_part
.
'@'
.
$domain
;
else
return
$domain
;
}
...
...
interface/lib/classes/remote.d/client.inc.php
View file @
1e8064d9
...
...
@@ -397,6 +397,8 @@ class remoting_client extends remoting {
return
false
;
}
// DUPLICATE CODE IN interface/web/client/client_del.php
$client_id
=
$app
->
functions
->
intval
(
$client_id
);
if
(
$client_id
>
0
)
{
...
...
@@ -413,7 +415,7 @@ class remoting_client extends remoting {
$app
->
db
->
query
(
"DELETE FROM sys_user WHERE client_id = ?"
,
$client_id
);
//* Delete all records (sub-clients, mail, web, etc....) of this client.
$tables
=
'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_
domain,mail_
forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain,mail_mailinglist,client,spamfilter_wblist'
;
$tables
=
'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,
mail_domain,
support_message,web_database,web_database_user,web_domain,web_traffic,domain,mail_mailinglist,client,spamfilter_wblist'
;
$tables_array
=
explode
(
','
,
$tables
);
$client_group_id
=
$app
->
functions
->
intval
(
$client_group
[
'groupid'
]);
if
(
$client_group_id
>
1
)
{
...
...
interface/lib/classes/remote.d/mail.inc.php
View file @
1e8064d9
...
...
@@ -196,6 +196,24 @@ class remoting_mail extends remoting {
return
$app
->
remoting_lib
->
getDataRecord
(
$primary_id
);
}
//* Get mail user details for all account that belong to a client.
public
function
mail_user_get_all_by_client
(
$session_id
,
$client_id
)
{
global
$app
;
if
(
!
$this
->
checkPerm
(
$session_id
,
'mail_user_get_all_by_client'
))
{
throw
new
SoapFault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
$app
->
uses
(
'remoting_lib'
);
$sql
=
"SELECT u.* FROM `mail_user` u
LEFT JOIN `sys_group` g ON (u.sys_groupid=g.groupid)
WHERE g.client_id=?"
;
$params
[]
=
$client_id
;
$result
=
$app
->
db
->
queryAllRecords
(
$sql
,
true
,
$params
);
return
$result
;
}
//* Add mail domain
public
function
mail_user_add
(
$session_id
,
$client_id
,
$params
){
...
...
@@ -1110,4 +1128,4 @@ class remoting_mail extends remoting {
}
?>
\ No newline at end of file
?>
interface/lib/lang/ar.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'Unlimited';
$wb
[
'server_id_0_error_txt'
]
=
'Please select a valid Server. Server ID must be > 0.'
;
$wb
[
'datalog_changes_close_txt'
]
=
'Close'
;
$wb
[
'non_admin_error'
]
=
'Requires administrator level permissions'
;
$wb
[
'copy_to_clipboard_txt'
]
=
'Copy to clipboard'
;
?>
interface/lib/lang/bg.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'Неограничен';
$wb
[
'server_id_0_error_txt'
]
=
'Please select a valid Server. Server ID must be > 0.'
;
$wb
[
'datalog_changes_close_txt'
]
=
'Close'
;
$wb
[
'non_admin_error'
]
=
'Requires administrator level permissions'
;
$wb
[
'copy_to_clipboard_txt'
]
=
'Copy to clipboard'
;
?>
interface/lib/lang/br.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'Ilimitado';
$wb
[
'server_id_0_error_txt'
]
=
'Por favor, selecione um servidor válido. O ID do servidor deve ser > 0.'
;
$wb
[
'datalog_changes_close_txt'
]
=
'Fechar'
;
$wb
[
'non_admin_error'
]
=
'Requires administrator level permissions'
;
$wb
[
'copy_to_clipboard_txt'
]
=
'Copy to clipboard'
;
?>
interface/lib/lang/ca.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'Illimité';
$wb
[
'server_id_0_error_txt'
]
=
'Please select a valid Server. Server ID must be > 0.'
;
$wb
[
'datalog_changes_close_txt'
]
=
'Close'
;
$wb
[
'non_admin_error'
]
=
'Requires administrator level permissions'
;
$wb
[
'copy_to_clipboard_txt'
]
=
'Copy to clipboard'
;
?>
interface/lib/lang/cz.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'Neomezený';
$wb
[
'server_id_0_error_txt'
]
=
'Please select a valid Server. Server ID must be > 0.'
;
$wb
[
'datalog_changes_close_txt'
]
=
'Close'
;
$wb
[
'non_admin_error'
]
=
'Requires administrator level permissions'
;
$wb
[
'copy_to_clipboard_txt'
]
=
'Copy to clipboard'
;
?>
interface/lib/lang/de.lng
View file @
1e8064d9
...
...
@@ -173,3 +173,5 @@ $wb['unlimited_txt'] = 'unlimitiert';
$wb
[
'server_id_0_error_txt'
]
=
'Bitte Server auswählen. Server ID muss > als 0 sein.'
;