Commit ac3b1f6f authored by tbrehm's avatar tbrehm

Changes in mail module.

parent cb206310
This diff is collapsed.
......@@ -32,8 +32,9 @@ ini_set('register_globals',0);
$conf["app_title"] = "ISPConfig";
$conf["app_version"] = "3.0.0";
//$conf["rootpath"] = "F:\\server\\www\\ispconfig3\\interface";
$conf["rootpath"] = "D:\\www\\ispconfig3\\interface";
$conf["rootpath"] = "D:\\server\\www\\ispconfig3\\interface";
//$conf["rootpath"] = "D:\\www\\ispconfig3\\interface";
//$conf["rootpath"] = "/home/www/ispconfig3/web/cms";
$conf["fs_div"] = "\\"; // File system divider, \\ on windows and / on linux and unix
......@@ -41,10 +42,23 @@ $conf["classpath"] = $conf["rootpath"].$conf["fs_div"]."lib".$conf["fs_div"]."
$conf["temppath"] = $conf["rootpath"].$conf["fs_div"]."temp";
define("DIR_TRENNER","\\");
define("SERVER_ROOT","D:\\server\\www\\ispconfig3\\interface");
define("INCLUDE_ROOT",SERVER_ROOT.DIR_TRENNER."lib");
define("CLASSES_ROOT",INCLUDE_ROOT.DIR_TRENNER."classes");
/*
Database Settings
*/
define("DB_TYPE","mysql");
define("DB_HOST","localhost");
define("DB_DATABASE","ispconfig3");
define("DB_USER","root");
define("DB_PASSWORD","");
$conf["db_type"] = 'mysql';
$conf["db_host"] = 'localhost';
......@@ -65,9 +79,9 @@ $conf["programs"]["wput"] = $conf["rootpath"]."\\tools\\wput\\wput.exe";
Themes
*/
$conf["theme"] = 'default';
$conf["theme"] = 'default';
$conf["html_content_encoding"] = 'text/html; charset=iso-8859-1';
$conf["logo"] = 'themes/default/images/mydnsconfig_logo.gif';
$conf["logo"] = 'themes/default/images/mydnsconfig_logo.gif';
/*
Default Language
......@@ -80,7 +94,7 @@ $conf["language"] = 'en';
Auto Load Modules
*/
$conf["start_db"] = true;
$conf["start_db"] = true;
$conf["start_session"] = true;
/*
......
[global]
webserver=apache
mailserver=exim
mailserver=postfix
dnsserver=mydns
[mail]
module=exim_mysql
maildir_path=/var/spool/mail/[domain]/[localpart]
mailuser_uid=0
mailuser_gid=0
module=postfix_mysql
maildir_path=/var/spool/mail/[domain]/[localpart]/
homedir_path=/var/spool/mail/[domain]/[localpart]/
mailuser_uid=5000
mailuser_gid=5000
[web]
module=generic
......
......@@ -37,8 +37,8 @@ $form["title"] = "Email Alias";
$form["description"] = "";
$form["name"] = "mail_alias";
$form["action"] = "mail_alias_edit.php";
$form["db_table"] = "mail_redirect";
$form["db_table_idx"] = "redirect_id";
$form["db_table"] = "mail_forwarding";
$form["db_table_idx"] = "forwarding_id";
$form["db_history"] = "yes";
$form["tab_default"] = "alias";
$form["list_default"] = "mail_alias_list.php";
......@@ -66,7 +66,7 @@ $form["tabs"]['alias'] = array (
'width' => '30',
'maxlength' => '255'
),
'email' => array (
'source' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL',
......@@ -82,7 +82,7 @@ $form["tabs"]['alias'] = array (
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT email FROM mail_box WHERE {AUTHSQL} ORDER BY email',
'querystring' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email',
'keyfield' => 'email',
'valuefield' => 'email'
),
......
<?php
/*
Form Definition
Tabledefinition
Datatypes:
- INTEGER (Forces the input to Int)
- DOUBLE
- CURRENCY (Formats the values to currency notation)
- VARCHAR (no format check, maxlength: 255)
- TEXT (no format check)
- DATE (Dateformat, automatic conversion to timestamps)
Formtype:
- TEXT (Textfield)
- TEXTAREA (Textarea)
- PASSWORD (Password textfield, input is not shown when edited)
- SELECT (Select option field)
- RADIO
- CHECKBOX
- CHECKBOXARRAY
- FILE
VALUE:
- Wert oder Array
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
*/
$form["title"] = "Mail DomainAlias";
$form["description"] = "";
$form["name"] = "mail_domain_alias";
$form["action"] = "mail_domain_alias_edit.php";
$form["db_table"] = "mail_domain";
$form["db_table_idx"] = "domain_id";
$form["db_history"] = "yes";
$form["tab_default"] = "domain";
$form["list_default"] = "mail_domain_alias_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
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$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",
'width' => 100,
'template' => "templates/mail_domain_alias_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 (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'domain_error_empty'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'destination' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'destination_error_empty'),
1 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
'errmsg'=> 'destination_error_regex'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
'value' => array('alias' => 'alias','local' => 'local','relay'=>'relay','manual_relay'=>'manual Relay')
),
'active' => array (
'datatype' => 'INTEGER',
'formtype' => 'CHECKBOX',
'default' => '1',
'value' => '1'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
<?php
/*
Form Definition
Tabledefinition
Datatypes:
- INTEGER (Forces the input to Int)
- DOUBLE
- CURRENCY (Formats the values to currency notation)
- VARCHAR (no format check, maxlength: 255)
- TEXT (no format check)
- DATE (Dateformat, automatic conversion to timestamps)
Formtype:
- TEXT (Textfield)
- TEXTAREA (Textarea)
- PASSWORD (Password textfield, input is not shown when edited)
- SELECT (Select option field)
- RADIO
- CHECKBOX
- CHECKBOXARRAY
- FILE
VALUE:
- Wert oder Array
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
*/
$form["title"] = "Domain Relay";
$form["description"] = "";
$form["name"] = "mail_domain_relay";
$form["action"] = "mail_domain_relay_edit.php";
$form["db_table"] = "mail_domain";
$form["db_table_idx"] = "domain_id";
$form["db_history"] = "yes";
$form["tab_default"] = "domain";
$form["list_default"] = "mail_domain_relay_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
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$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",
'width' => 100,
'template' => "templates/mail_domain_relay_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 (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'domain_error_empty'),
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'type' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
'value' => array('relay'=>'relay','local' => 'local','manual_relay'=>'manual Relay')
),
'active' => array (
'datatype' => 'INTEGER',
'formtype' => 'CHECKBOX',
'default' => '1',
'value' => '1'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
......@@ -35,13 +35,13 @@
$form["title"] = "Mailbox";
$form["description"] = "";
$form["name"] = "mail_box";
$form["action"] = "mail_box_edit.php";
$form["db_table"] = "mail_box";
$form["db_table_idx"] = "mailbox_id";
$form["name"] = "mail_user";
$form["action"] = "mail_user_edit.php";
$form["db_table"] = "mail_user";
$form["db_table_idx"] = "mailuser_id";
$form["db_history"] = "yes";
$form["tab_default"] = "mailbox";
$form["list_default"] = "mail_box_list.php";
$form["tab_default"] = "mailuser";
$form["list_default"] = "mail_user_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,10 +50,10 @@ $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"]['mailbox'] = array (
$form["tabs"]['mailuser'] = array (
'title' => "Mailbox",
'width' => 100,
'template' => "templates/mail_box_mailbox_edit.htm",
'template' => "templates/mail_user_mailbox_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
......@@ -79,7 +79,7 @@ $form["tabs"]['mailbox'] = array (
'width' => '30',
'maxlength' => '255'
),
'cryptpwd' => array (
'password' => array (
'datatype' => 'VARCHAR',
'formtype' => 'PASSWORD',
'encryption'=> 'CRYPT',
......@@ -107,7 +107,37 @@ $form["tabs"]['mailbox'] = array (
'width' => '30',
'maxlength' => '255'
),
'active' => array (
'homedir' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'uid' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '10',
'maxlength' => '10'
),
'gid' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '10',
'maxlength' => '10'
),
'postfix' => array (
'datatype' => 'INTEGER',
'formtype' => 'CHECKBOX',
'default' => '1',
'value' => '1'
),
'access' => array (
'datatype' => 'INTEGER',
'formtype' => 'CHECKBOX',
'default' => '1',
......@@ -122,7 +152,7 @@ $form["tabs"]['mailbox'] = array (
$form["tabs"]['autoresponder'] = array (
'title' => "Autoresponder",
'width' => 100,
'template' => "templates/mail_box_autoresponder_edit.htm",
'template' => "templates/mail_user_autoresponder_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
......
<?php
$wb["server_id_txt"] = 'Server';
$wb["domain_txt"] = 'Domain';
$wb["destination_txt"] = 'Destination domain';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
$wb["btn_cancel_txt"] = 'Cancel';
$wb["domain_error_empty"] = 'Domain is empty.';
$wb["domain_error_unique"] = 'Duplicate Domain.';
$wb["destination_error_empty"] = 'Destination is empty.';
$wb["domain_error_regex"] = 'Invalid domain name od domain contains invalid characters.';
$wb["destination_error_regex"] = 'Destination domain is invalid or contains invalid characters.';
?>
\ No newline at end of file
<?php
$wb["list_head_txt"] = 'Domain Alias';
$wb["server_id_txt"] = 'Server';
$wb["domain_txt"] = 'Domain';
$wb["destination_txt"] = 'Destination';
$wb["page_txt"] = 'Page';
$wb["page_of_txt"] = 'of';
$wb["page_next_txt"] = 'Next';
$wb["page_back_txt"] = 'Back';
$wb["delete_txt"] = 'Delete';
$wb["filter_txt"] = 'Filter';
$wb["add_new_record_txt"] = 'Add new Alias Domain';
$wb["active_txt"] = 'Active';
?>
\ No newline at end of file
<?php
$wb["server_id_txt"] = 'Server';
$wb["domain_txt"] = 'Domain';
$wb["active_txt"] = 'active';
$wb["btn_save_txt"] = 'Save';
$wb["btn_cancel_txt"] = 'Cancel';
$wb["domain_error_empty"] = 'Domain is empty.';
$wb["domain_error_unique"] = 'Duplicate Domain.';
$wb["domain_error_regex"] = 'Invalid domain name od domain contains invalid characters.';
?>
\ No newline at end of file
<?php
$wb["list_head_txt"] = 'Relay Domain';
$wb["server_id_txt"] = 'Server';
$wb["domain_txt"] = 'Domain';
$wb["page_txt"] = 'Page';
$wb["page_of_txt"] = 'of';
$wb["page_next_txt"] = 'Next';
$wb["page_back_txt"] = 'Back';
$wb["delete_txt"] = 'Delete';
$wb["filter_txt"] = 'Filter';
$wb["add_new_record_txt"] = 'Add new Relay Domain';
$wb["active_txt"] = 'Active';
?>
\ No newline at end of file
<?php
$wb["email_txt"] = 'Email';
$wb["email_txt"] = 'email';
$wb["cryptpwd_txt"] = 'Password';
$wb["active_txt"] = 'Active';
$wb["btn_save_txt"] = 'Save';
......@@ -8,8 +8,13 @@ $wb["email_error_isemail"] = 'Email address is invalid.';
$wb["email_error_unique"] = 'Duplicate Emailaddress.';
$wb["autoresponder_text_txt"] = 'Text';
$wb["autoresponder_txt"] = 'Autoresponder';
$wb["no_domain_perm"] = "You have no permission for this domain.";
$wb["error_no_pwd"] = "Password is empty.";
$wb["no_domain_perm"] = 'You have no permission for this domain.';
$wb["error_no_pwd"] = 'Password is empty.';
$wb["quota_error_isint"] = 'Mailbox size must be a number.';
$wb["quota_txt"] = 'Mailbox size';
$wb["quota_txt"] = 'quota';
$wb["server_id_txt"] = 'server_id';
$wb["password_txt"] = 'password';
$wb["maildir_txt"] = 'maildir';
$wb["postfix_txt"] = 'Enable Receiving';
$wb["access_txt"] = 'Enable Access';
?>
\ No newline at end of file
......@@ -20,23 +20,11 @@ $module = array (
'target' => 'content',
'link' => 'mail/mail_domain_list.php',
),
1 =>
array (
'title' => 'Domain Alias',
'target' => 'content',
'link' => 'mail/mail_domain_alias_list.php',
),
2 =>
array (
'title' => 'Domain Relay',
'target' => 'content',
'link' => 'mail/mail_domain_relay_list.php',
),
3 =>
array (
'title' => 'Email Mailbox',
'target' => 'content',
'link' => 'mail/mail_box_list.php',
'link' => 'mail/mail_user_list.php',
),
4 =>
array (
......
<?php
/*
Datatypes:
- INTEGER
- DOUBLE
- CURRENCY
- VARCHAR
- TEXT
- DATE
*/
// Name of the list
$liste["name"] = "mail_alias";
// Database table
$liste["table"] = "mail_redirect";
// Index index field of the database table
$liste["table_idx"] = "redirect_id";
// Search Field Prefix
$liste["search_prefix"] = "search_";
// Records per page
$liste["records_per_page"] = 15;
// Script File of the list
$liste["file"] = "mail_alias_list.php";
// Script file of the edit form
$liste["edit_file"] = "mail_alias_edit.php";
// Script File of the delete script
$liste["delete_file"] = "mail_alias_del.php";
// Paging Template
$liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable auth
$liste["auth"] = "yes";
/*****************************************************
* Suchfelder
*****************************************************/
$liste["item"][] = array( 'field' => "active",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('1' => "Yes",'0' => "No"));