SF.net SVN: postfixadmin: [226] trunk/DOCUMENTS
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-11-14 21:43:02
|
Revision: 226 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=226&view=rev Author: GingerDog Date: 2007-11-14 13:43:02 -0800 (Wed, 14 Nov 2007) Log Message: ----------- file extensions should be lower case ;) Added Paths: ----------- trunk/DOCUMENTS/BACKUP_MX.txt trunk/DOCUMENTS/DOVECOT.txt trunk/DOCUMENTS/HORDE.txt trunk/DOCUMENTS/LANGUAGE.txt trunk/DOCUMENTS/POSTFIXADMIN.txt trunk/DOCUMENTS/POSTFIX_CONF.txt trunk/DOCUMENTS/SUPERADMIN.txt trunk/DOCUMENTS/TABLE_BACKUP_MX.txt trunk/DOCUMENTS/TABLE_CHANGES.txt trunk/DOCUMENTS/UPGRADE.txt Removed Paths: ------------- trunk/DOCUMENTS/BACKUP_MX.TXT trunk/DOCUMENTS/DOVECOT.TXT trunk/DOCUMENTS/HORDE.TXT trunk/DOCUMENTS/LANGUAGE.TXT trunk/DOCUMENTS/POSTFIXADMIN.TXT trunk/DOCUMENTS/POSTFIX_CONF.TXT trunk/DOCUMENTS/SUPERADMIN.TXT trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT trunk/DOCUMENTS/TABLE_CHANGES.TXT trunk/DOCUMENTS/UPGRADE.TXT Deleted: trunk/DOCUMENTS/BACKUP_MX.TXT =================================================================== --- trunk/DOCUMENTS/BACKUP_MX.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/BACKUP_MX.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,49 +0,0 @@ -# -# Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT -# - -REQUIRED!! ----------- -- You are using Postfix 2.0 or higher. -- You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher. -- You are using PHP 4.1 or higher. -- You are using MySQL 3.23 or higher. - - -READ THIS FIRST! ----------------- -When this is an upgrade from Postfix Admin 1.5.4 please read UPGRADE.TXT!! - -When you are upgrading from 2.0.x please read DOCUMENTS/TABLE_BACKUP_MX.TXT - -More information is available on http://high5.net/howto/ - - -1. Modify main.cf ------------------ -In order for Postfix to use MySQL for relay_domains add the following -to your main.cf - -relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf - - -2. mysql_relay_domains_maps.cf ------------------------------- -You will need to put this into a text file for postfix to pickup. - -user = postfix -password = postfix -hosts = localhost -dbname = postfix -table = domain -select_field = domain -where_field = domain -additional_conditions = and backupmx = '1' - - -3. Restart Postfix -------------------- -When you are done make sure to restart Postfix so the changes take effect. Copied: trunk/DOCUMENTS/BACKUP_MX.txt (from rev 222, trunk/DOCUMENTS/BACKUP_MX.TXT) =================================================================== --- trunk/DOCUMENTS/BACKUP_MX.txt (rev 0) +++ trunk/DOCUMENTS/BACKUP_MX.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,49 @@ +# +# Postfix Admin +# by Mischa Peters <mischa at high5 dot net> +# Copyright (c) 2002 - 2005 High5! +# Licensed under GPL for more info check GPL-LICENSE.TXT +# + +REQUIRED!! +---------- +- You are using Postfix 2.0 or higher. +- You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher. +- You are using PHP 4.1 or higher. +- You are using MySQL 3.23 or higher. + + +READ THIS FIRST! +---------------- +When this is an upgrade from Postfix Admin 1.5.4 please read UPGRADE.TXT!! + +When you are upgrading from 2.0.x please read DOCUMENTS/TABLE_BACKUP_MX.TXT + +More information is available on http://high5.net/howto/ + + +1. Modify main.cf +----------------- +In order for Postfix to use MySQL for relay_domains add the following +to your main.cf + +relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf + + +2. mysql_relay_domains_maps.cf +------------------------------ +You will need to put this into a text file for postfix to pickup. + +user = postfix +password = postfix +hosts = localhost +dbname = postfix +table = domain +select_field = domain +where_field = domain +additional_conditions = and backupmx = '1' + + +3. Restart Postfix +------------------- +When you are done make sure to restart Postfix so the changes take effect. Deleted: trunk/DOCUMENTS/DOVECOT.TXT =================================================================== --- trunk/DOCUMENTS/DOVECOT.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/DOVECOT.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,52 +0,0 @@ -# -# Dovecot configuration for Postfix Admin -# Written by: Massimo <AndyCapp> Danieli -# - -1. Dovecot setup ------------------ - -dovecot.conf relevant part for postfixadmin setup -Please refer to Dovecot documentation for complete information. - -default_mail_env = maildir:/usr/local/virtual/%u/ - - -# auth_userdb specifies maildir location and user/group ID to use -auth_userdb = mysql /etc/dovecot/dovecot-mysql.conf - -# auth_passdb specifies user passwords -auth_passdb = mysql /etc/dovecot/dovecot-mysql.conf - -# Valid UID range for users, defaults to 500 and above. -first_valid_uid = 1001 # Change this to your postifx UID - - -2. Dovecot mysql setup ----------------------- - -Below you'll find the relevant part of dovecot-mysql.conf file regarding our setup -Things you may need to change are db_password, uid and gid - -db_host = localhost -db_port = 3306 -# Default sock for Debian sarge -db_unix_socket = /var/run/mysqld/mysqld.sock -db = postfix -db_user = postfix -db_passwd = postfix -db_client_flags = 0 - -# Default password scheme. - -default_pass_scheme = PLAIN-MD5 - -# Query to retrieve password. - -password_query = SELECT password FROM mailbox WHERE username = '%u' - -# Query to retrieve user information. - -user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' - -NB The GID and UID are for postfix user and group ID, NOT MySQL user and group ID. Copied: trunk/DOCUMENTS/DOVECOT.txt (from rev 222, trunk/DOCUMENTS/DOVECOT.TXT) =================================================================== --- trunk/DOCUMENTS/DOVECOT.txt (rev 0) +++ trunk/DOCUMENTS/DOVECOT.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,52 @@ +# +# Dovecot configuration for Postfix Admin +# Written by: Massimo <AndyCapp> Danieli +# + +1. Dovecot setup +----------------- + +dovecot.conf relevant part for postfixadmin setup +Please refer to Dovecot documentation for complete information. + +default_mail_env = maildir:/usr/local/virtual/%u/ + + +# auth_userdb specifies maildir location and user/group ID to use +auth_userdb = mysql /etc/dovecot/dovecot-mysql.conf + +# auth_passdb specifies user passwords +auth_passdb = mysql /etc/dovecot/dovecot-mysql.conf + +# Valid UID range for users, defaults to 500 and above. +first_valid_uid = 1001 # Change this to your postifx UID + + +2. Dovecot mysql setup +---------------------- + +Below you'll find the relevant part of dovecot-mysql.conf file regarding our setup +Things you may need to change are db_password, uid and gid + +db_host = localhost +db_port = 3306 +# Default sock for Debian sarge +db_unix_socket = /var/run/mysqld/mysqld.sock +db = postfix +db_user = postfix +db_passwd = postfix +db_client_flags = 0 + +# Default password scheme. + +default_pass_scheme = PLAIN-MD5 + +# Query to retrieve password. + +password_query = SELECT password FROM mailbox WHERE username = '%u' + +# Query to retrieve user information. + +user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' + +NB The GID and UID are for postfix user and group ID, NOT MySQL user and group ID. Deleted: trunk/DOCUMENTS/HORDE.TXT =================================================================== --- trunk/DOCUMENTS/HORDE.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/HORDE.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,50 +0,0 @@ -Horde integration with Postfixadmin - -This is taken from the following thread : - -https://sourceforge.net/forum/forum.php?thread_id=1869141&forum_id=676076 - -Namely : - -"Hi, people, I was wondering if anyone was using PA with Horde3. I want my users to be able to change teir password from inside Horde, so I was wondering if anyone has implemented a custom hook or defined a SQL query to make the password change possible. " - - -Solution : - -"Hi, - -that works for me without any hook - with the SQL driver. I connect through IP to localhost. You can also try socket connection... - -my horde/passwd/config/backends.php looks like: - -$backends['sql'] = array ( -'name' => 'Mail SQL Server', -'preferred' => '', -'password policy' => array( -'minLength' => 3, -'maxLength' => 8, -'maxSpace' => 0, -'minUpper' => 1, -'minLower' => 1, -'minNumeric' => 1, -'minSymbols' => 1 -), -'driver' => 'sql', -'params' => array( -'phptype' => 'mysql', -'hostspec' => '127.0.0.1', -'port' => '3306', -'protocol' => 'tcp', -'username' => 'postfix', -'password' => 'yourpostfixdbpassword', -'encryption' => 'crypt-md5', -'database' => 'postfix', -'table' => 'mailbox', -'user_col' => 'username', -'pass_col' => 'password', -'show_encryption' => false -) -); " - -Thanks to 'Kope' for the solution, and of course Luis Hernán Otegui (slimshady76) for asking the question. - Copied: trunk/DOCUMENTS/HORDE.txt (from rev 225, trunk/DOCUMENTS/HORDE.TXT) =================================================================== --- trunk/DOCUMENTS/HORDE.txt (rev 0) +++ trunk/DOCUMENTS/HORDE.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,50 @@ +Horde integration with Postfixadmin + +This is taken from the following thread : + +https://sourceforge.net/forum/forum.php?thread_id=1869141&forum_id=676076 + +Namely : + +"Hi, people, I was wondering if anyone was using PA with Horde3. I want my users to be able to change teir password from inside Horde, so I was wondering if anyone has implemented a custom hook or defined a SQL query to make the password change possible. " + + +Solution : + +"Hi, + +that works for me without any hook - with the SQL driver. I connect through IP to localhost. You can also try socket connection... + +my horde/passwd/config/backends.php looks like: + +$backends['sql'] = array ( +'name' => 'Mail SQL Server', +'preferred' => '', +'password policy' => array( +'minLength' => 3, +'maxLength' => 8, +'maxSpace' => 0, +'minUpper' => 1, +'minLower' => 1, +'minNumeric' => 1, +'minSymbols' => 1 +), +'driver' => 'sql', +'params' => array( +'phptype' => 'mysql', +'hostspec' => '127.0.0.1', +'port' => '3306', +'protocol' => 'tcp', +'username' => 'postfix', +'password' => 'yourpostfixdbpassword', +'encryption' => 'crypt-md5', +'database' => 'postfix', +'table' => 'mailbox', +'user_col' => 'username', +'pass_col' => 'password', +'show_encryption' => false +) +); " + +Thanks to 'Kope' for the solution, and of course Luis Hernán Otegui (slimshady76) for asking the question. + Deleted: trunk/DOCUMENTS/LANGUAGE.TXT =================================================================== --- trunk/DOCUMENTS/LANGUAGE.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/LANGUAGE.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,46 +0,0 @@ -# -# Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT -# - -READ THIS FIRST! ----------------- -*** Unlimited and disable value have been changed *** -If you are using any other language then english, please make sure that: - -1 means disable - 0 means unlimited - - -Additional Language Strings for Postfix Admin 2.1.0 ---------------------------------------------------- -$PALANG['check_update'] = 'Check for update'; - -$PALANG['pOverview_disabled'] = 'Disabled'; -$PALANG['pOverview_unlimited'] = 'Unlimited'; -$PALANG['pOverview_title'] = ':: Defined Domains'; -$PALANG['pOverview_up_arrow'] = 'Go Top'; -$PALANG['pOverview_right_arrow'] = 'Next Page'; -$PALANG['pOverview_left_arrow'] = 'Previous Page'; -$PALANG['pOverview_alias_title'] = ':: Alias'; -$PALANG['pOverview_mailbox_title'] = ':: Mailboxes'; - -$PALANG['pAdminList_domain_transport'] = 'Transport'; - -$PALANG['pAdminCreate_domain_transport'] = 'Transport'; -$PALANG['pAdminCreate_domain_transport_text'] = 'Define transport'; - -$PALANG['pAdminEdit_domain_transport'] = 'Transport'; -$PALANG['pAdminEdit_domain_transport_text'] = 'Define transport'; - -$PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; -$PALANG['pCreate_dbLog_createalias'] = 'create alias'; -$PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; -$PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; - -$PALANG['pEdit_dbLog_editactive'] = 'change active state'; -$PALANG['pEdit_dbLog_editalias'] = 'edit alias'; -$PALANG['pEdit_dbLog_editmailbox'] = 'edit mailbox'; - -$PALANG['pSearch_welcome'] = 'Searching for: '; Copied: trunk/DOCUMENTS/LANGUAGE.txt (from rev 222, trunk/DOCUMENTS/LANGUAGE.TXT) =================================================================== --- trunk/DOCUMENTS/LANGUAGE.txt (rev 0) +++ trunk/DOCUMENTS/LANGUAGE.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,46 @@ +# +# Postfix Admin +# by Mischa Peters <mischa at high5 dot net> +# Copyright (c) 2002 - 2005 High5! +# Licensed under GPL for more info check GPL-LICENSE.TXT +# + +READ THIS FIRST! +---------------- +*** Unlimited and disable value have been changed *** +If you are using any other language then english, please make sure that: + -1 means disable + 0 means unlimited + + +Additional Language Strings for Postfix Admin 2.1.0 +--------------------------------------------------- +$PALANG['check_update'] = 'Check for update'; + +$PALANG['pOverview_disabled'] = 'Disabled'; +$PALANG['pOverview_unlimited'] = 'Unlimited'; +$PALANG['pOverview_title'] = ':: Defined Domains'; +$PALANG['pOverview_up_arrow'] = 'Go Top'; +$PALANG['pOverview_right_arrow'] = 'Next Page'; +$PALANG['pOverview_left_arrow'] = 'Previous Page'; +$PALANG['pOverview_alias_title'] = ':: Alias'; +$PALANG['pOverview_mailbox_title'] = ':: Mailboxes'; + +$PALANG['pAdminList_domain_transport'] = 'Transport'; + +$PALANG['pAdminCreate_domain_transport'] = 'Transport'; +$PALANG['pAdminCreate_domain_transport_text'] = 'Define transport'; + +$PALANG['pAdminEdit_domain_transport'] = 'Transport'; +$PALANG['pAdminEdit_domain_transport_text'] = 'Define transport'; + +$PALANG['pCreate_dbLog_createmailbox'] = 'create mailbox'; +$PALANG['pCreate_dbLog_createalias'] = 'create alias'; +$PALANG['pDelete_dbLog_deletealias'] = 'delete alias'; +$PALANG['pDelete_dbLog_deletemailbox'] = 'delete mailbox'; + +$PALANG['pEdit_dbLog_editactive'] = 'change active state'; +$PALANG['pEdit_dbLog_editalias'] = 'edit alias'; +$PALANG['pEdit_dbLog_editmailbox'] = 'edit mailbox'; + +$PALANG['pSearch_welcome'] = 'Searching for: '; Deleted: trunk/DOCUMENTS/POSTFIXADMIN.TXT =================================================================== --- trunk/DOCUMENTS/POSTFIXADMIN.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/POSTFIXADMIN.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,20 +0,0 @@ - ---------------------------------------- - The different parts of PostfixAdmin - -/admin directory scripts are used by superadmins, also known as 'site admins'. -When you log in as a superadmin you'll be running scripts from /admin that -won't bother checking to see if you are allowed to admin for a domain. As -a superadmin you can add and remove domains, mailboxes, aliases, domain admins, -and create more superadmins. A superadmin will be not stopped from doing -anything, so be careful, you can delete your our login account. - -login.php sorts out what type of admin you are and sends you to the right place. -The scripts in / are used by domain admins and always check to see if you are -an admin for the domain (or user within a domain) you are attempting to change. - -End user scripts only do operations on the currently logged in user. -If the end user options provide more than you want your users to have, -check the user options in config.inc.php, or, even better, edit the -user templates and remove the options. - Copied: trunk/DOCUMENTS/POSTFIXADMIN.txt (from rev 222, trunk/DOCUMENTS/POSTFIXADMIN.TXT) =================================================================== --- trunk/DOCUMENTS/POSTFIXADMIN.txt (rev 0) +++ trunk/DOCUMENTS/POSTFIXADMIN.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,20 @@ + +--------------------------------------- + The different parts of PostfixAdmin + +/admin directory scripts are used by superadmins, also known as 'site admins'. +When you log in as a superadmin you'll be running scripts from /admin that +won't bother checking to see if you are allowed to admin for a domain. As +a superadmin you can add and remove domains, mailboxes, aliases, domain admins, +and create more superadmins. A superadmin will be not stopped from doing +anything, so be careful, you can delete your our login account. + +login.php sorts out what type of admin you are and sends you to the right place. +The scripts in / are used by domain admins and always check to see if you are +an admin for the domain (or user within a domain) you are attempting to change. + +End user scripts only do operations on the currently logged in user. +If the end user options provide more than you want your users to have, +check the user options in config.inc.php, or, even better, edit the +user templates and remove the options. + Deleted: trunk/DOCUMENTS/POSTFIX_CONF.TXT =================================================================== --- trunk/DOCUMENTS/POSTFIX_CONF.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/POSTFIX_CONF.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,69 +0,0 @@ - - Postfix configuration for use with PostfixAdmin - ------------------------ - - Your installation of Postfix MUST support either MySQL or Postgres -lookup tables. You can verify that with 'postconf -m' - -Its generally recommended to use proxy as well (which should also appear in -postconf -m) Three main.cf variables are involved: - -virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf -virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf -virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf - -Where you chose to store the .cf files doesn't really matter, but they will -have database passwords stored in plain text so they should be readable only -by user postfix, or in a directory only accessible to user postfix. - -This isn't necessarily all you need to do to Postfix to get up and -running. Also, additional changes are needed for the vacation -autoreply features. - -------------------------- - - Contents of the files - -These are examples only, you will likely have to and want to make some -cumtomizations. You will also want to consider the config.inc.php -settings for domain_path and domain_in_mailbox. These examples -use values of domain_path=YES and domain_in_mailbox=NO - -mysql_virtual_alias_maps.cf: -user = postfix -password = password -hosts = localhost -dbname = postfix -query = SELECT goto FROM alias WHERE address='%s' AND active = '1' -#expansion_limit = 100 - - -mysql_virtual_domains_maps.cf: -user = postfix -password = password -hosts = localhost -dbname = postfix -query = SELECT domain FROM domain WHERE domain='%u' -#query = SELECT domain FROM domain WHERE domain='%s' -#optional query to use when relaying for backup MX -#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1' -#expansion_limit = 100 - - -mysql_virtual_mailbox_maps.cf: -user = postfix -password = password -hosts = localhost -dbname = postfix -query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = '1' -#expansion_limit = 100 - -------------------------- - - More information - HowTo docs that use PostfixAdmin - -http://postfix.wiki.xs4all.nl/index.php?title=Virtual_Users_and_Domains_with_Courier-IMAP_and_MySQL -http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL - - Copied: trunk/DOCUMENTS/POSTFIX_CONF.txt (from rev 222, trunk/DOCUMENTS/POSTFIX_CONF.TXT) =================================================================== --- trunk/DOCUMENTS/POSTFIX_CONF.txt (rev 0) +++ trunk/DOCUMENTS/POSTFIX_CONF.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,69 @@ + + Postfix configuration for use with PostfixAdmin + +----------------------- + + Your installation of Postfix MUST support either MySQL or Postgres +lookup tables. You can verify that with 'postconf -m' + +Its generally recommended to use proxy as well (which should also appear in +postconf -m) Three main.cf variables are involved: + +virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf +virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf +virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf + +Where you chose to store the .cf files doesn't really matter, but they will +have database passwords stored in plain text so they should be readable only +by user postfix, or in a directory only accessible to user postfix. + +This isn't necessarily all you need to do to Postfix to get up and +running. Also, additional changes are needed for the vacation +autoreply features. + +------------------------- + + Contents of the files + +These are examples only, you will likely have to and want to make some +cumtomizations. You will also want to consider the config.inc.php +settings for domain_path and domain_in_mailbox. These examples +use values of domain_path=YES and domain_in_mailbox=NO + +mysql_virtual_alias_maps.cf: +user = postfix +password = password +hosts = localhost +dbname = postfix +query = SELECT goto FROM alias WHERE address='%s' AND active = '1' +#expansion_limit = 100 + + +mysql_virtual_domains_maps.cf: +user = postfix +password = password +hosts = localhost +dbname = postfix +query = SELECT domain FROM domain WHERE domain='%u' +#query = SELECT domain FROM domain WHERE domain='%s' +#optional query to use when relaying for backup MX +#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1' +#expansion_limit = 100 + + +mysql_virtual_mailbox_maps.cf: +user = postfix +password = password +hosts = localhost +dbname = postfix +query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = '1' +#expansion_limit = 100 + +------------------------- + + More information - HowTo docs that use PostfixAdmin + +http://postfix.wiki.xs4all.nl/index.php?title=Virtual_Users_and_Domains_with_Courier-IMAP_and_MySQL +http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL + + Deleted: trunk/DOCUMENTS/SUPERADMIN.TXT =================================================================== --- trunk/DOCUMENTS/SUPERADMIN.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/SUPERADMIN.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,37 +0,0 @@ ------------------------------------- - Recreating a superadmin account - - -When you run setup.php you will be required to enter a super user name and password. -This user will be able to login and modify any domain or setting. Hence, superadmin!. - -With that login you can create new superadmins (and you should delete or change the -password of ad...@do...d). If that user is no longer there or you didn't use -the .TXT files, you could add another manually from the database. - -(The example uses MySQL, the syntax will be similar for PostgreSQL) - -# mysql -Welcome to the MySQL monitor. Commands end with ; or \g. -Your MySQL connection id is 8186 to server version: 5.0.27 - -Type 'help;' or '\h' for help. Type '\c' to clear the buffer. - -mysql> use postfix -Reading table information for completion of table and column names -You can turn off this feature to get a quicker startup with -A - -Database changed -mysql> INSERT INTO domain_admins (username, domain, active) VALUES ('ne...@do...d','ALL','1'); -Query OK, 1 row affected (0.00 sec) - -mysql> INSERT INTO admin (username, password, active) VALUES ('ne...@do...d','$1$0fec9189$bgI6ncWrldPOsXnkUBIjl1','1'); -Query OK, 1 row affected (0.00 sec) - -mysql> exit -Bye - -Then you can log in as ne...@do...d, password: admin - - -(The domain 'ALL' should already exist in the domain table; if not you'll need to recreate it) Copied: trunk/DOCUMENTS/SUPERADMIN.txt (from rev 222, trunk/DOCUMENTS/SUPERADMIN.TXT) =================================================================== --- trunk/DOCUMENTS/SUPERADMIN.txt (rev 0) +++ trunk/DOCUMENTS/SUPERADMIN.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,37 @@ +------------------------------------ + Recreating a superadmin account + + +When you run setup.php you will be required to enter a super user name and password. +This user will be able to login and modify any domain or setting. Hence, superadmin!. + +With that login you can create new superadmins (and you should delete or change the +password of ad...@do...d). If that user is no longer there or you didn't use +the .TXT files, you could add another manually from the database. + +(The example uses MySQL, the syntax will be similar for PostgreSQL) + +# mysql +Welcome to the MySQL monitor. Commands end with ; or \g. +Your MySQL connection id is 8186 to server version: 5.0.27 + +Type 'help;' or '\h' for help. Type '\c' to clear the buffer. + +mysql> use postfix +Reading table information for completion of table and column names +You can turn off this feature to get a quicker startup with -A + +Database changed +mysql> INSERT INTO domain_admins (username, domain, active) VALUES ('ne...@do...d','ALL','1'); +Query OK, 1 row affected (0.00 sec) + +mysql> INSERT INTO admin (username, password, active) VALUES ('ne...@do...d','$1$0fec9189$bgI6ncWrldPOsXnkUBIjl1','1'); +Query OK, 1 row affected (0.00 sec) + +mysql> exit +Bye + +Then you can log in as ne...@do...d, password: admin + + +(The domain 'ALL' should already exist in the domain table; if not you'll need to recreate it) Deleted: trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT =================================================================== --- trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,19 +0,0 @@ -# -# Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT -# - -# mysql -u root [-p] < DOCUMENTS/TABLE_BACKUP_MX.TXT - -# -# Table structure for table domain_admins -# -USE postfix; - -# -# Modify table structure for table domain -# -ALTER TABLE domain ADD transport VARCHAR(255) AFTER maxquota; -ALTER TABLE domain ADD backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport; Copied: trunk/DOCUMENTS/TABLE_BACKUP_MX.txt (from rev 222, trunk/DOCUMENTS/TABLE_BACKUP_MX.TXT) =================================================================== --- trunk/DOCUMENTS/TABLE_BACKUP_MX.txt (rev 0) +++ trunk/DOCUMENTS/TABLE_BACKUP_MX.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,19 @@ +# +# Postfix Admin +# by Mischa Peters <mischa at high5 dot net> +# Copyright (c) 2002 - 2005 High5! +# Licensed under GPL for more info check GPL-LICENSE.TXT +# + +# mysql -u root [-p] < DOCUMENTS/TABLE_BACKUP_MX.TXT + +# +# Table structure for table domain_admins +# +USE postfix; + +# +# Modify table structure for table domain +# +ALTER TABLE domain ADD transport VARCHAR(255) AFTER maxquota; +ALTER TABLE domain ADD backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport; Deleted: trunk/DOCUMENTS/TABLE_CHANGES.TXT =================================================================== --- trunk/DOCUMENTS/TABLE_CHANGES.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/TABLE_CHANGES.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,104 +0,0 @@ -# -# Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT -# - -# mysql -u root [-p] < TABLE_CHANGES.TXT - -# -# Table structure for table domain_admins -# -USE postfix; -CREATE TABLE IF NOT EXISTS domain_admins ( - username varchar(255) NOT NULL default '', - domain varchar(255) NOT NULL default '', - created datetime NOT NULL default '0000-00-00 00:00:00', - active tinyint(1) NOT NULL default '1', - KEY username (username) -) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins'; - -# -# Table structure for table log -# -CREATE TABLE IF NOT EXISTS log ( - timestamp datetime NOT NULL default '0000-00-00 00:00:00', - username varchar(255) NOT NULL default '', - domain varchar(255) NOT NULL default '', - action varchar(255) NOT NULL default '', - data varchar(255) NOT NULL default '', - KEY timestamp (timestamp) -) TYPE=MyISAM COMMENT='Postfix Admin - Log'; - -# -# Table structure for table vacation -# -CREATE TABLE IF NOT EXISTS vacation ( - email varchar(255) NOT NULL default '', - subject varchar(255) NOT NULL default '', - body text NOT NULL, - cache text NOT NULL, - domain varchar(255) NOT NULL default '', - created datetime NOT NULL default '0000-00-00 00:00:00', - active tinyint(1) NOT NULL default '1', - PRIMARY KEY (email), - KEY email (email) -) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation'; - -# -# Modify table structure for table admin -# -ALTER TABLE admin CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE admin CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE admin ADD INDEX (username); - -# -# Modify table structure for table alias -# -ALTER TABLE alias CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE alias CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE alias ADD INDEX (address); - -# -# Modify table structure for table domain -# -ALTER TABLE domain CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE domain CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE domain ADD aliases INT(10) DEFAULT '-1' NOT NULL AFTER description; -ALTER TABLE domain ADD mailboxes INT(10) DEFAULT '-1' NOT NULL AFTER aliases; -ALTER TABLE domain ADD maxquota INT(10) DEFAULT '-1' NOT NULL AFTER mailboxes; -ALTER TABLE domain ADD transport VARCHAR(255) AFTER maxquota; -ALTER TABLE domain ADD backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport; -ALTER TABLE domain ADD INDEX (domain); - -# -# Modify table structure for table mailbox -# -ALTER TABLE mailbox CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE mailbox CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; -ALTER TABLE mailbox ADD quota INT(10) DEFAULT '-1' NOT NULL AFTER maildir; -ALTER TABLE mailbox ADD INDEX (username); - -# -# Modify table structure for table vacation -# -ALTER TABLE vacation ADD domain VARCHAR(255) DEFAULT '' NOT NULL AFTER cache; -ALTER TABLE vacation ADD created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL AFTER domain; -ALTER TABLE vacation ADD active TINYINT(1) DEFAULT '1' NOT NULL AFTER created; -ALTER TABLE vacation DROP PRIMARY KEY, ADD PRIMARY KEY(email); - -# -# Dumping data for table domain_admins -# -INSERT INTO domain_admins (username,domain,created) SELECT admin.username,admin.domain,domain.created FROM admin LEFT JOIN domain ON domain.domain=admin.domain; - -# -# Modify data for table vacation -# -UPDATE vacation SET domain=SUBSTRING_INDEX(email, '@', -1) WHERE email=email; - -# -# Modify table structure for table domain -# -ALTER TABLE admin DROP domain; Copied: trunk/DOCUMENTS/TABLE_CHANGES.txt (from rev 222, trunk/DOCUMENTS/TABLE_CHANGES.TXT) =================================================================== --- trunk/DOCUMENTS/TABLE_CHANGES.txt (rev 0) +++ trunk/DOCUMENTS/TABLE_CHANGES.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,104 @@ +# +# Postfix Admin +# by Mischa Peters <mischa at high5 dot net> +# Copyright (c) 2002 - 2005 High5! +# Licensed under GPL for more info check GPL-LICENSE.TXT +# + +# mysql -u root [-p] < TABLE_CHANGES.TXT + +# +# Table structure for table domain_admins +# +USE postfix; +CREATE TABLE IF NOT EXISTS domain_admins ( + username varchar(255) NOT NULL default '', + domain varchar(255) NOT NULL default '', + created datetime NOT NULL default '0000-00-00 00:00:00', + active tinyint(1) NOT NULL default '1', + KEY username (username) +) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins'; + +# +# Table structure for table log +# +CREATE TABLE IF NOT EXISTS log ( + timestamp datetime NOT NULL default '0000-00-00 00:00:00', + username varchar(255) NOT NULL default '', + domain varchar(255) NOT NULL default '', + action varchar(255) NOT NULL default '', + data varchar(255) NOT NULL default '', + KEY timestamp (timestamp) +) TYPE=MyISAM COMMENT='Postfix Admin - Log'; + +# +# Table structure for table vacation +# +CREATE TABLE IF NOT EXISTS vacation ( + email varchar(255) NOT NULL default '', + subject varchar(255) NOT NULL default '', + body text NOT NULL, + cache text NOT NULL, + domain varchar(255) NOT NULL default '', + created datetime NOT NULL default '0000-00-00 00:00:00', + active tinyint(1) NOT NULL default '1', + PRIMARY KEY (email), + KEY email (email) +) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation'; + +# +# Modify table structure for table admin +# +ALTER TABLE admin CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE admin CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE admin ADD INDEX (username); + +# +# Modify table structure for table alias +# +ALTER TABLE alias CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE alias CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE alias ADD INDEX (address); + +# +# Modify table structure for table domain +# +ALTER TABLE domain CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE domain CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE domain ADD aliases INT(10) DEFAULT '-1' NOT NULL AFTER description; +ALTER TABLE domain ADD mailboxes INT(10) DEFAULT '-1' NOT NULL AFTER aliases; +ALTER TABLE domain ADD maxquota INT(10) DEFAULT '-1' NOT NULL AFTER mailboxes; +ALTER TABLE domain ADD transport VARCHAR(255) AFTER maxquota; +ALTER TABLE domain ADD backupmx TINYINT(1) DEFAULT '0' NOT NULL AFTER transport; +ALTER TABLE domain ADD INDEX (domain); + +# +# Modify table structure for table mailbox +# +ALTER TABLE mailbox CHANGE create_date created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE mailbox CHANGE change_date modified DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL; +ALTER TABLE mailbox ADD quota INT(10) DEFAULT '-1' NOT NULL AFTER maildir; +ALTER TABLE mailbox ADD INDEX (username); + +# +# Modify table structure for table vacation +# +ALTER TABLE vacation ADD domain VARCHAR(255) DEFAULT '' NOT NULL AFTER cache; +ALTER TABLE vacation ADD created DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL AFTER domain; +ALTER TABLE vacation ADD active TINYINT(1) DEFAULT '1' NOT NULL AFTER created; +ALTER TABLE vacation DROP PRIMARY KEY, ADD PRIMARY KEY(email); + +# +# Dumping data for table domain_admins +# +INSERT INTO domain_admins (username,domain,created) SELECT admin.username,admin.domain,domain.created FROM admin LEFT JOIN domain ON domain.domain=admin.domain; + +# +# Modify data for table vacation +# +UPDATE vacation SET domain=SUBSTRING_INDEX(email, '@', -1) WHERE email=email; + +# +# Modify table structure for table domain +# +ALTER TABLE admin DROP domain; Deleted: trunk/DOCUMENTS/UPGRADE.TXT =================================================================== --- trunk/DOCUMENTS/UPGRADE.TXT 2007-11-14 21:40:39 UTC (rev 225) +++ trunk/DOCUMENTS/UPGRADE.TXT 2007-11-14 21:43:02 UTC (rev 226) @@ -1,84 +0,0 @@ -# -# Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT -# - -REQUIRED!! ----------- -- You are using Postfix 2.0 or higher. -- You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher. -- You are using PHP 4.1 or higher. -- You are using MySQL 3.23 or higher. - - -READ THIS FIRST! ----------------- - -Note: !!This document describes upgrading from v1.5x to 2.0. Only -items 3 and 5 apply to general PostfixAdmin installs!! See SVN.TXT -for how to update versions 2.1.0 and higher. - -It's recommened that you install Postfix Admin in a new folder and not -on-top of the old install!! - -When you are upgrading from Postfix Admin 1.5x (or older), make sure you -backup your database before you run the DOCUMENTS/TABLE_CHANGES.TXT on your database. - -When you are upgrading from Postfix Admin 2.0.x, please read the DOCUMENTS/BACKUP_MX.TXT. - - -1. Backup the Database ----------------------- -When you install from a previous version make sure you backup your database -first. There are a lot of changes in the database structure since Postfix Admin -1.5.4. - - $ mysqldump -a -u root -p > /tmp/postfixadmin-backup.sql - - -2. Unarchive new Postfix Admin ------------------------------- -Make sure that you are in your WWW directory and then unarchive the -Postfix Admin archive (whatever the filename is): - - $ tar -zxvf postfixadmin-2.0.0.tgz - - -3. Change permissions ----------------------- -Since the database password is stored in the config.inc.php it's a good idea -to have change the permissions for Postfix Admin. - - $ cd /usr/local/www/postfixadmin-2.0.0 - $ chmod 640 *.php *.css - $ cd /usr/local/www/postfixadmin-2.0.0/admin/ - $ chmod 640 *.php .ht* - $ cd /usr/local/www/postfixadmin-2.0.0/images/ - $ chmod 640 *.gif *.png - $ cd /usr/local/www/postfixadmin-2.0.0/languages/ - $ chmod 640 *.lang - $ cd /usr/local/www/postfixadmin-2.0.0/templates/ - $ chmod 640 *.tpl - $ cd /usr/local/www/postfixadmin-2.0.0/users/ - $ chmod 640 *.php - - -4. Modify the MySQL Tables --------------------------- -In TABLE_CHANGES.TXT or TABLE_BACKUP_MX.TXT you can find the table structure that you need in order -to configure Postfix Admin 2.0.0 and Postfix in general to work with Virtual -Domains and Users. You can find these in DOCUMENTS/ - - -5. Configure ------------- -Check the config.inc.php file. There you can specify settings that are -relevant to your setup. - - -6. Done -------- -This is all that is needed. Fire up your browser and go to the site that you -specified to host Postfix Admin. Copied: trunk/DOCUMENTS/UPGRADE.txt (from rev 222, trunk/DOCUMENTS/UPGRADE.TXT) =================================================================== --- trunk/DOCUMENTS/UPGRADE.txt (rev 0) +++ trunk/DOCUMENTS/UPGRADE.txt 2007-11-14 21:43:02 UTC (rev 226) @@ -0,0 +1,84 @@ +# +# Postfix Admin +# by Mischa Peters <mischa at high5 dot net> +# Copyright (c) 2002 - 2005 High5! +# Licensed under GPL for more info check GPL-LICENSE.TXT +# + +REQUIRED!! +---------- +- You are using Postfix 2.0 or higher. +- You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher. +- You are using PHP 4.1 or higher. +- You are using MySQL 3.23 or higher. + + +READ THIS FIRST! +---------------- + +Note: !!This document describes upgrading from v1.5x to 2.0. Only +items 3 and 5 apply to general PostfixAdmin installs!! See SVN.TXT +for how to update versions 2.1.0 and higher. + +It's recommened that you install Postfix Admin in a new folder and not +on-top of the old install!! + +When you are upgrading from Postfix Admin 1.5x (or older), make sure you +backup your database before you run the DOCUMENTS/TABLE_CHANGES.TXT on your database. + +When you are upgrading from Postfix Admin 2.0.x, please read the DOCUMENTS/BACKUP_MX.TXT. + + +1. Backup the Database +---------------------- +When you install from a previous version make sure you backup your database +first. There are a lot of changes in the database structure since Postfix Admin +1.5.4. + + $ mysqldump -a -u root -p > /tmp/postfixadmin-backup.sql + + +2. Unarchive new Postfix Admin +------------------------------ +Make sure that you are in your WWW directory and then unarchive the +Postfix Admin archive (whatever the filename is): + + $ tar -zxvf postfixadmin-2.0.0.tgz + + +3. Change permissions +---------------------- +Since the database password is stored in the config.inc.php it's a good idea +to have change the permissions for Postfix Admin. + + $ cd /usr/local/www/postfixadmin-2.0.0 + $ chmod 640 *.php *.css + $ cd /usr/local/www/postfixadmin-2.0.0/admin/ + $ chmod 640 *.php .ht* + $ cd /usr/local/www/postfixadmin-2.0.0/images/ + $ chmod 640 *.gif *.png + $ cd /usr/local/www/postfixadmin-2.0.0/languages/ + $ chmod 640 *.lang + $ cd /usr/local/www/postfixadmin-2.0.0/templates/ + $ chmod 640 *.tpl + $ cd /usr/local/www/postfixadmin-2.0.0/users/ + $ chmod 640 *.php + + +4. Modify the MySQL Tables +-------------------------- +In TABLE_CHANGES.TXT or TABLE_BACKUP_MX.TXT you can find the table structure that you need in order +to configure Postfix Admin 2.0.0 and Postfix in general to work with Virtual +Domains and Users. You can find these in DOCUMENTS/ + + +5. Configure +------------ +Check the config.inc.php file. There you can specify settings that are +relevant to your setup. + + +6. Done +------- +This is all that is needed. Fire up your browser and go to the site that you +specified to host Postfix Admin. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |