Implemented optional custom login name for mailboxes.
| | |
| | | # SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid' |
| | | # |
| | | |
| | | MYSQL_LOGIN_FIELD email |
| | | MYSQL_LOGIN_FIELD login |
| | | |
| | | ##NAME: MYSQL_HOME_FIELD:0 |
| | | # |
| | |
| | | `sys_perm_other` varchar(5) NOT NULL default '', |
| | | `server_id` int(11) unsigned NOT NULL default '0', |
| | | `email` varchar(255) NOT NULL default '', |
| | | `login` varchar(255) NOT NULL, |
| | | `password` varchar(255) NOT NULL, |
| | | `name` varchar(255) NOT NULL default '', |
| | | `uid` int(11) unsigned NOT NULL default '5000', |
| | |
| | | #MYSQL_CLEAR_PWFIELD password |
| | | MYSQL_UID_FIELD uid |
| | | MYSQL_GID_FIELD gid |
| | | MYSQL_LOGIN_FIELD email |
| | | MYSQL_LOGIN_FIELD login |
| | | MYSQL_HOME_FIELD homedir |
| | | MYSQL_MAILDIR_FIELD maildir |
| | | #MYSQL_NAME_FIELD |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | #user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email AS user, maildir AS home, CONCAT('*:storage=', quota , 'B') AS quota_rule FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | #user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email AS user, maildir AS home, CONCAT('*:storage=', quota , 'B') AS quota_rule FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | |
| | | |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | |
| | | dbname = {mysql_server_database} |
| | | table = mail_user |
| | | select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
| | | where_field = email |
| | | where_field = login |
| | | additional_conditions = and postfix = 'y' and server_id = {server_id} |
| | | hosts = {mysql_server_ip} |
| | | hosts = {mysql_server_ip} |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n' |
| | | password_query = SELECT password FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE login = '%u' AND disable%Ls = 'n' |
| | |
| | | auth required pam_mysql.so user={mysql_server_ispconfig_user} passwd={mysql_server_ispconfig_password} host={mysql_server_ip} db={mysql_server_database} table=mail_user usercolumn=email passwdcolumn=password crypt=1 |
| | | account sufficient pam_mysql.so user={mysql_server_ispconfig_user} passwd={mysql_server_ispconfig_password} host={mysql_server_ip} db={mysql_server_database} table=mail_user usercolumn=email passwdcolumn=password crypt=1 |
| | | auth required pam_mysql.so user={mysql_server_ispconfig_user} passwd={mysql_server_ispconfig_password} host={mysql_server_ip} db={mysql_server_database} table=mail_user usercolumn=login passwdcolumn=password crypt=1 |
| | | account sufficient pam_mysql.so user={mysql_server_ispconfig_user} passwd={mysql_server_ispconfig_password} host={mysql_server_ip} db={mysql_server_database} table=mail_user usercolumn=login passwdcolumn=password crypt=1 |
| | |
| | | sql_user: {mysql_server_ispconfig_user} |
| | | sql_passwd: {mysql_server_ispconfig_password} |
| | | sql_database: {mysql_server_database} |
| | | sql_select: select password from mail_user where email = '%u' |
| | | sql_select: select password from mail_user where login = '%u' |
| | |
| | | [dns] |
| | | |
| | | [mail] |
| | | enable_custom_login=n |
| | | mailboxlist_webmail_link=y |
| | | webmail_url= |
| | | |
| | |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'enable_custom_login' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'mailboxlist_webmail_link' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | |
| | | $wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.'; |
| | | $wb['new_domain_txt'] = 'HTML to create a new domain'; |
| | | $wb['webftp_url_txt'] = 'WebFTP URL'; |
| | | $wb['enable_custom_login_txt'] = 'Abweichenden Login-Namen erlauben'; |
| | | ?> |
| | |
| | | $wb["shelluser_prefix_error_regex"] = 'Char not allowed in shell user prefix.'; |
| | | $wb["webdavuser_prefix_error_regex"] = 'Char not allowed in webdav user prefix.'; |
| | | $wb["dblist_phpmyadmin_link_txt"] = 'Link to phpmyadmin in DB list'; |
| | | $wb['enable_custom_login_txt'] = 'Allow custom login name'; |
| | | $wb["mailboxlist_webmail_link_txt"] = 'Link to webmail in Mailbox list'; |
| | | $wb["webmail_url_txt"] = 'Webmail URL'; |
| | | $wb["mailmailinglist_link_txt"] = 'Link to mailing list in Mailing list list'; |
| | |
| | | $wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.'; |
| | | $wb["new_domain_txt"] = 'HTML to create a new domain'; |
| | | $wb["webftp_url_txt"] = 'WebFTP URL'; |
| | | $wb['admin_mail_txt'] = 'Administrator\'s e-mail';
|
| | | $wb["monitor_key_txt"] = 'Monitor keyword';
|
| | | $wb['admin_name_txt'] = 'Administrator\'s name';
|
| | | $wb['admin_mail_txt'] = 'Administrator\'s e-mail'; |
| | | $wb["monitor_key_txt"] = 'Monitor keyword'; |
| | | $wb['admin_name_txt'] = 'Administrator\'s name'; |
| | | ?> |
| | |
| | | <input name="mailbox_size_limit" id="mailbox_size_limit" value="{tmpl_var name='mailbox_size_limit'}" size="10" maxlength="15" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="message_size_limit">{tmpl_var name='message_size_limit_txt'}</label> |
| | | <label for="message_size_limit">{tmpl_var name='message_size_limit_txt'}</label> |
| | | <input name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" size="10" maxlength="15" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='enable_custom_login_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='enable_custom_login'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailboxlist_webmail_link_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='mailboxlist_webmail_link'} |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'login' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'login_error_unique'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[a-z][\w\.\-_\+@]{1,63}$/', |
| | | 'errmsg'=> 'login_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'password' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'PASSWORD', |
| | |
| | | $wb['autoresponder_active'] = 'Enable the autoresponder'; |
| | | $wb['cc_txt'] = 'Send copy to'; |
| | | $wb['cc_error_isemail'] = 'The Send copy to field does not conatin a valid email address'; |
| | | $wb['login_error_unique'] = 'Login wird bereits verwendet.'; |
| | | $wb['login_error_regex'] = 'Zulässige Zeichen sind A-Z, a-z, 0-9, ., _ und -.'; |
| | | $wb['login_txt'] = 'Login (optional)'; |
| | | $wb['error_login_email_txt'] = 'Dieser Loginname ist nicht zulässig. Bitte verwenden Sie einen anderen Loginnamen oder die E-Mail-Adresse als Login.'; |
| | | ?> |
| | |
| | | $wb['autoresponder_txt'] = 'Autoresponder'; |
| | | $wb['add_new_record_txt'] = 'Neue Mailbox hinzufügen'; |
| | | $wb['name_txt'] = 'Realname'; |
| | | $wb['login_txt'] = 'Login'; |
| | | ?> |
| | |
| | | $wb['cc_error_isemail'] = 'The -Send copy to- field does not conatin a valid email address'; |
| | | $wb['domain_txt'] = 'Domain'; |
| | | $wb['now_txt']='Now'; |
| | | $wb['login_error_unique'] = 'Login is already taken.'; |
| | | $wb['login_error_regex'] = 'Valid characters are A-Z, a-z, 0-9, ., _ and -.'; |
| | | $wb['login_txt'] = 'Login (optional)'; |
| | | $wb['error_login_email_txt'] = 'This login is not allowed. Please enter a different login or use the mail address as login.'; |
| | | ?> |
| | |
| | | $wb["autoresponder_txt"] = 'Autoresponder'; |
| | | $wb["add_new_record_txt"] = 'Add new Mailbox'; |
| | | $wb["name_txt"] = 'Realname'; |
| | | $wb["login_txt"] = 'Login'; |
| | | ?> |
| | |
| | | * Suchfelder |
| | | *****************************************************/ |
| | | |
| | | $liste["item"][] = array( 'field' => "email", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | $liste["item"][] = array( 'field' => "email", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "login", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'width' => "", |
| | | 'value' => ""); |
| | | |
| | | $liste["item"][] = array( 'field' => "name", |
| | | 'datatype' => "VARCHAR", |
| | |
| | | $app->tpl->setVar("email_local_part",$email_parts[0]); |
| | | |
| | | // Getting Domains of the user |
| | | $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain'; |
| | | $sql = "SELECT domain, server_id FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain'; |
| | | $domains = $app->db->queryAllRecords($sql); |
| | | $domain_select = ''; |
| | | if(is_array($domains)) { |
| | |
| | | $app->tpl->setVar("ar_active", 'checked="checked"'); |
| | | } else { |
| | | $app->tpl->setVar("ar_active", ''); |
| | | } |
| | | |
| | | $app->uses('getconf'); |
| | | $mail_config = $app->getconf->get_global_config('mail'); |
| | | if($mail_config["enable_custom_login"] == "y") { |
| | | $app->tpl->setVar("enable_custom_login", 1); |
| | | } else { |
| | | $app->tpl->setVar("enable_custom_login", 0); |
| | | } |
| | | |
| | | parent::onShowEnd(); |
| | |
| | | } // end if user is not admin |
| | | |
| | | |
| | | $app->uses('getconf'); |
| | | $mail_config = $app->getconf->get_server_config($domain["server_id"],'mail'); |
| | | |
| | | //* compose the email field |
| | | if(isset($_POST["email_local_part"]) && isset($_POST["email_domain"])) { |
| | | $this->dataRecord["email"] = strtolower($_POST["email_local_part"]."@".$_POST["email_domain"]); |
| | |
| | | if($this->dataRecord["quota"] != -1) $this->dataRecord["quota"] = $this->dataRecord["quota"] * 1024 * 1024; |
| | | |
| | | // setting Maildir, Homedir, UID and GID |
| | | $app->uses('getconf'); |
| | | $mail_config = $app->getconf->get_server_config($domain["server_id"],'mail'); |
| | | $maildir = str_replace("[domain]",$domain["domain"],$mail_config["maildir_path"]); |
| | | $maildir = str_replace("[localpart]",strtolower($_POST["email_local_part"]),$maildir); |
| | | $this->dataRecord["maildir"] = $maildir; |
| | |
| | | |
| | | } |
| | | |
| | | $sys_config = $app->getconf->get_global_config('mail'); |
| | | if($sys_config["enable_custom_login"] == "y") { |
| | | if(!isset($_POST["login"])) $this->dataRecord["login"] = $this->dataRecord["email"]; |
| | | elseif(strpos($_POST["login"], '@') !== false && $_POST["login"] != $this->dataRecord["email"]) $app->tform->errorMessage .= $app->tform->lng("error_login_email_txt")."<br>"; |
| | | } else { |
| | | $this->dataRecord["login"] = $this->dataRecord["email"]; |
| | | } |
| | | //* if autoresponder checkbox not selected, do not save dates |
| | | if (!isset($_POST['autoresponder']) && array_key_exists('autoresponder_start_date', $_POST)) { |
| | | $this->dataRecord['autoresponder_start_date'] = array_map(create_function('$item','return 0;'), $this->dataRecord['autoresponder_start_date']); |
| | |
| | | } else { |
| | | $app->tpl->setVar('mailboxlist_webmail_link',0); |
| | | } |
| | | |
| | | if($global_config["enable_custom_login"] == "y") { |
| | | $app->tpl->setVar("enable_custom_login", 1); |
| | | } else { |
| | | $app->tpl->setVar("enable_custom_login", 0); |
| | | } |
| | | |
| | | parent::onShow(); |
| | | } |
| | |
| | | <thead> |
| | | <tr> |
| | | <th class="tbl_col_email" scope="col"><tmpl_var name="email_txt"></th> |
| | | <th class="tbl_col_name" scope="col"><tmpl_var name="name_txt"></th> |
| | | <tmpl_if name="enable_custom_login"><th class="tbl_col_login" scope="col"><tmpl_var name="login_txt"></th></tmpl_if> |
| | | <th class="tbl_col_name" scope="col"><tmpl_var name="name_txt"></th> |
| | | <th class="tbl_col_autoresponder" scope="col"><tmpl_var name="autoresponder_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col"> </th> |
| | | </tr> |
| | | <tr> |
| | | <td class="tbl_col_email"><input type="text" name="search_email" value="{tmpl_var name='search_email'}" /></td> |
| | | <td class="tbl_col_name"><input type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <tmpl_if name="enable_custom_login"><td class="tbl_col_login"><input type="text" name="search_login" value="{tmpl_var name='search_login'}" /></td></tmpl_if> |
| | | <td class="tbl_col_autoresponder"><input type="text" name="search_autoresponder" value="{tmpl_var name='search_autoresponder'}" /></td> |
| | | <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_user_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td> |
| | | </tr> |
| | |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_email"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="email"}</a></td> |
| | | <tmpl_if name="enable_custom_login"><td class="tbl_col_login"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="login"}</a></td></tmpl_if> |
| | | <td class="tbl_col_name"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="name"}</a></td> |
| | | <td class="tbl_col_autoresponder"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="autoresponder"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | |
| | | |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="4"><tmpl_var name="paging"></td> |
| | | <td class="tbl_footer tbl_paging" colspan="<tmpl_if name="enable_custom_login">5<tmpl_else>4</tmpl_if>"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | |
| | | <label for="email_domain" class="blockLabel formLengthEmailDomain">{tmpl_var name='domain_txt'}<select name="email_domain" id="email_domain" class="selectInput">{tmpl_var name='email_domain'}</select></label> |
| | | </div> |
| | | </div> |
| | | <tmpl_if name="enable_custom_login"><div class="ctrlHolder"> |
| | | <label for="login">{tmpl_var name='login_txt'}</label> |
| | | <input type="text" id="login" name="login" size="20" value="{tmpl_var name='login'}" class="textInput" /></label> |
| | | </div></tmpl_if> |
| | | <div class="ctrlHolder"> |
| | | <label for="password">{tmpl_var name='password_txt'}</label> |
| | | <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" onkeyup="pass_check(this.value)" /> |