diff --git a/config/exim4/exim4.conf.template b/config/exim4/exim4.conf.template index b99fded9eb42e4b52b117ded44efc6bf46655be8..cbb0e6dff1e84415cb57b1ba18de6a7cd3b6dc72 100644 --- a/config/exim4/exim4.conf.template +++ b/config/exim4/exim4.conf.template @@ -147,7 +147,7 @@ begin routers fail_router: driver = redirect - domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND enabled='no'}{$value}} + domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND active='0'}{$value}} data = ":fail:" allow_fail @@ -205,6 +205,10 @@ mysql_email_alias: allow_defer data = ${lookup mysql{ SELECT destination FROM mail_redirect WHERE email='${local_part}@${domain}' AND type = 'alias'}} +mysql_email_forward: + driver = redirect + data = ${lookup mysql{ SELECT destination FROM mail_redirect WHERE email='${local_part}@${domain}' AND type = 'forward'}} + #spamcheck_router: # driver = manualroute # domains = ${lookup mysql {SELECT SUBSTRING_INDEX(email,'@',-1) FROM MYSQL_EMAILTABLE WHERE email=CONCAT('${quote_mysql:$local_part}','@','${quote_mysql:$domain}') AND spamscan='yes'}{$value}} @@ -400,20 +404,20 @@ begin authenticators fixed_plain: driver = plaintext public_name = PLAIN - server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$2}' AND cryptpwd=encrypt('${quote_mysql:$3}', cryptpwd)}{1}fail} + server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$2}' AND cryptpwd=encrypt('${quote_mysql:$3}' AND active = '1', cryptpwd)}{1}fail} server_set_id = $2 fixed_login: driver = plaintext public_name = LOGIN server_prompts = "Username:: : Password::" - server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$1}' AND cryptpwd=encrypt('${quote_mysql:$2}', cryptpwd)}{1}fail} + server_condition = ${lookup mysql{SELECT email FROM MYSQL_EMAILTABLE WHERE email='${quote_mysql:$1}' AND cryptpwd=encrypt('${quote_mysql:$2}' AND active = '1', cryptpwd)}{1}fail} server_set_id = $1 cram: driver = cram_md5 public_name = CRAM-MD5 - server_secret = "${lookup mysql {SELECT clearpwd FROM mail_box WHERE email = '${sg {$1}{'}{}}' AND is_enabled = 'yes'} {$value} fail}" + server_secret = "${lookup mysql {SELECT clearpwd FROM mail_box WHERE email = '${sg {$1}{'}{}}' AND active = '1'} {$value} fail}" server_set_id = $1 diff --git a/interface/sql/ispconfig3db.sql b/interface/sql/ispconfig3db.sql index a5f5b1169bc9787717e7588c398ee06a83fc16cc..590243f23a3d5c1d9e3d2188d4ea09377609ca29 100644 --- a/interface/sql/ispconfig3db.sql +++ b/interface/sql/ispconfig3db.sql @@ -3,7 +3,7 @@ # http://www.phpmyadmin.net/ (download page) # # Host: localhost -# Erstellungszeit: 23. November 2005 um 17:27 +# Erstellungszeit: 23. November 2005 um 18:15 # Server Version: 4.0.22 # PHP-Version: 5.0.2 # Datenbank: `ispconfig3` @@ -51,7 +51,7 @@ CREATE TABLE mail_box ( forward varchar(50) NOT NULL default '', autoresponder enum('yes','no') NOT NULL default 'no', autoresponder_text tinytext NOT NULL, - enabled enum('yes','no') NOT NULL default 'yes', + active enum('0','1') NOT NULL default '1', antivirus enum('yes','no') NOT NULL default 'no', spamscan enum('yes','no') NOT NULL default 'no', spamdelete enum('yes','no') NOT NULL default 'no', diff --git a/interface/web/sites/form/mail_box.tform.php b/interface/web/sites/form/mail_box.tform.php index 91400dfdfe2795447f132c8bc0a68a948a1a4f38..5f2c9402cc485b33ef81590c338dcc9096a881e1 100644 --- a/interface/web/sites/form/mail_box.tform.php +++ b/interface/web/sites/form/mail_box.tform.php @@ -33,15 +33,15 @@ */ -$form["title"] = "Mail Domain"; +$form["title"] = "Mailbox"; $form["description"] = ""; -$form["name"] = "mail_domain"; -$form["action"] = "mail_domain_edit.php"; -$form["db_table"] = "mail_domain"; -$form["db_table_idx"] = "domain_id"; +$form["name"] = "mail_box"; +$form["action"] = "mail_box_edit.php"; +$form["db_table"] = "mail_box"; +$form["db_table_idx"] = "mailbox_id"; $form["db_history"] = "yes"; -$form["tab_default"] = "domain"; -$form["list_default"] = "mail_domain_list.php"; +$form["tab_default"] = "mailbox"; +$form["list_default"] = "mail_box_list.php"; $form["auth"] = 'yes'; // yes / no $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user @@ -50,43 +50,34 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete -$form["tabs"]['domain'] = array ( - 'title' => "Domain", +$form["tabs"]['mailbox'] = array ( + 'title' => "Mailbox", 'width' => 100, - 'template' => "templates/mail_domain_edit.htm", + 'template' => "templates/mail_box_edit.htm", 'fields' => array ( ################################## # Begin Datatable fields ################################## - 'server_id' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'SELECT', - 'default' => '', - 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT server_id,server_name FROM server WHERE 1 ORDER BY server_name', - 'keyfield'=> 'server_id', - 'valuefield'=> 'server_name' - ), - 'value' => '' - ), - 'domain' => array ( + 'email' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', - 'errmsg'=> 'domain_error_empty'), + 'errmsg'=> 'email_error_empty'), 1 => array ( 'type' => 'UNIQUE', - 'errmsg'=> 'domain_error_unique'), + 'errmsg'=> 'email_error_unique'), ), 'default' => '', 'value' => '', 'width' => '30', 'maxlength' => '255' ), - 'type' => array ( + 'cryptpwd' => array ( 'datatype' => 'VARCHAR', - 'formtype' => 'SELECT', + 'formtype' => 'PASSWORD', 'default' => '', - 'value' => array('local' => 'local','relay'=>'relay','manual_relay'=>'manual Relay') + 'value' => '', + 'width' => '30', + 'maxlength' => '255' ), 'active' => array ( 'datatype' => 'INTEGER',