SF.net SVN: postfixadmin: [238] trunk/DOCUMENTS
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2007-11-19 00:51:15
|
Revision: 238 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=238&view=rev Author: christian_boltz Date: 2007-11-18 16:51:20 -0800 (Sun, 18 Nov 2007) Log Message: ----------- UPGRADE.txt: - removed references to TABLE_CHANGES.txt and TABLE_BACKUP_MX.txt - added reference to setup.php (superadmin creation) and upgrade.php - made the "change permissions" section easier - swapped "configure" and "database update" sections - added "delete setup.php" - several small changes TABLE_CHANGES.txt, TABLE_BACKUP_MX.txt: - obsoleted by upgrade.php - DELETED Modified Paths: -------------- trunk/DOCUMENTS/UPGRADE.txt Removed Paths: ------------- trunk/DOCUMENTS/TABLE_BACKUP_MX.txt trunk/DOCUMENTS/TABLE_CHANGES.txt Deleted: trunk/DOCUMENTS/TABLE_BACKUP_MX.txt =================================================================== --- trunk/DOCUMENTS/TABLE_BACKUP_MX.txt 2007-11-18 22:12:41 UTC (rev 237) +++ trunk/DOCUMENTS/TABLE_BACKUP_MX.txt 2007-11-19 00:51:20 UTC (rev 238) @@ -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; Deleted: trunk/DOCUMENTS/TABLE_CHANGES.txt =================================================================== --- trunk/DOCUMENTS/TABLE_CHANGES.txt 2007-11-18 22:12:41 UTC (rev 237) +++ trunk/DOCUMENTS/TABLE_CHANGES.txt 2007-11-19 00:51:20 UTC (rev 238) @@ -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; Modified: trunk/DOCUMENTS/UPGRADE.txt =================================================================== --- trunk/DOCUMENTS/UPGRADE.txt 2007-11-18 22:12:41 UTC (rev 237) +++ trunk/DOCUMENTS/UPGRADE.txt 2007-11-19 00:51:20 UTC (rev 238) @@ -16,19 +16,16 @@ 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. +This document describes upgrading from an older PostfixAdmin version +(>= v1.5x) 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 upgrading Postfix Admin, make sure you backup your database before +running upgrade.php. -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 @@ -43,42 +40,48 @@ 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 + $ tar -zxvf postfixadmin-2.2.tgz 3. Change permissions ---------------------- -Since the database password is stored in the config.inc.php it's a good idea +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 - + $ cd /usr/local/www/postfixadmin + $ find -type f -print0 | xargs -0 chmod 640 + $ find -type f -print0 | xargs -0 chown root:www -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/ +(the last command assumes your Apache is running with group "www") -5. Configure +4. Configure ------------ Check the config.inc.php file. There you can specify settings that are relevant to your setup. +Comparing config.inc.php with your previous using "diff" might save you some +time. -6. Done + +5. Modify the MySQL Tables +-------------------------- +Open upgrade.php in your browser to update your database scheme. + +If you update from 2.1 or older, also open setup.php to create a superadmin +account. + +Note that admin/ has been merged into the main directory. Login with the +superadmin account to setup domains and domain admins. + + +6. Delete setup.php +------------------- +Delete setup.php - it allown non-authorized users to create a superadmin +account! + + +7. 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. |