summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Moc <jakub@gentoo.org>2007-09-09 00:12:40 +0000
committerJakub Moc <jakub@gentoo.org>2007-09-09 00:12:40 +0000
commit10a1d42bfe48b2d71f9b847ef68860f5f83f014a (patch)
tree9af1ee6810e198caaf72e3afb59d9b7df191a2e7 /net-mail/postfixadmin
parentMove to mail-client category (diff)
downloadwebapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.tar.gz
webapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.tar.bz2
webapps-experimental-10a1d42bfe48b2d71f9b847ef68860f5f83f014a.zip
net-mail/postfixadmin: Move to net-mail category
svn path=/experimental/; revision=467
Diffstat (limited to 'net-mail/postfixadmin')
-rw-r--r--net-mail/postfixadmin/ChangeLog27
-rw-r--r--net-mail/postfixadmin/Manifest9
-rw-r--r--net-mail/postfixadmin/files/config-hook.sh10
-rw-r--r--net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r23
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch50
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch149
-rw-r--r--net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch49
-rw-r--r--net-mail/postfixadmin/files/postinstall-en.txt45
-rw-r--r--net-mail/postfixadmin/metadata.xml10
-rw-r--r--net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild113
10 files changed, 465 insertions, 0 deletions
diff --git a/net-mail/postfixadmin/ChangeLog b/net-mail/postfixadmin/ChangeLog
new file mode 100644
index 0000000..f44f7e4
--- /dev/null
+++ b/net-mail/postfixadmin/ChangeLog
@@ -0,0 +1,27 @@
+# ChangeLog for net-mail/postfixadmin
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/ChangeLog,v 1.1 2006/02/02 19:35:13 wrobel Exp $
+
+ 08 Sep 2007; Jakub Moc <jakub@gentoo.org> postfixadmin-2.1.0-r2.ebuild:
+ Fix dependencies, remove implicit system deps, do not depend on DBs and
+ check all required php features at once. Quoting, ebuild cleanup.
+
+ 02 May 2006; Renat Lumpau <rl03@gentoo.org> ChangeLog:
+ Keyworded ~amd64 (untested), ticket:29
+
+*postfixadmin-2.1.0 (02 Feb 2006)
+
+ 02 Feb 2006; <wrobel@gentoo.org> +files/config-hook.sh,
+ +files/postinstall-en.txt, +metadata.xml, +postfixadmin-2.1.0.ebuild:
+ Fixed the use of enewuser. Moved ebuild to portage
+
+ 03 Jan 2006; <wrobel@gentoo.org> ChangeLog:
+ Repoman fixes.
+
+ 28 Dec 2005; Gunnar Wrobel <php@gunnarwrobel.de> ChangeLog:
+ Minor cleanup for postfixadmin. Seems to work with php5.
+
+ 14 Dec 2005; <php@gunnarwrobel.de> ChangeLog:
+ Initial ebuild import into the overlay. Original ebuild from SteveB
+ <tp22a@softhome.net>. See bug #50035
+
diff --git a/net-mail/postfixadmin/Manifest b/net-mail/postfixadmin/Manifest
new file mode 100644
index 0000000..a4d85ff
--- /dev/null
+++ b/net-mail/postfixadmin/Manifest
@@ -0,0 +1,9 @@
+AUX config-hook.sh 202 RMD160 5330c8319a0b4b1d89ceee9eb3d7adac0a046034 SHA1 84efe994c7c82b4ed16f9b1b6b51e09c26fd95d4 SHA256 a80dc6ea1f7144391e76029d857c2cf5f0554c4feb49613af6ed09ba2c84c565
+AUX postfixadmin-2.1.0-postgres-1.patch 3372 RMD160 e13163d0abdba9fc14ab04ac4a0be4c880d171de SHA1 1938ff94c2a0d0ae401cc819d95183c4a0241d87 SHA256 9dc87737720b23e8390af22bb1919d8b21203aa4ce57df2f80d14685d0851568
+AUX postfixadmin-2.1.0-postgres-2.patch 8555 RMD160 79ae220fa85442aa85c3618cf833cafe88ece247 SHA1 8ce951bd0c7b0fd433145fc93b5f9b22618ba3e8 SHA256 06d310237c15d4bbff303c349f6123cd2b00ec367e296a7a376a8f3ed5e6c627
+AUX postfixadmin-2.1.0-postgres-3.patch 1623 RMD160 efbe95eda2cfa1ca465cda8574b76240b02594fc SHA1 d34ac67e3dcc208ebb56739b9903c2e5f67f12ef SHA256 95a5ffbf48a8efce7aeaba264caeac4757063ac1863661f7b4f285babf6fc712
+AUX postinstall-en.txt 1859 RMD160 8ba29b5fae66503e38b822fe0f483a688935b6a3 SHA1 214df1f8404bcdfc97712798d4d8e60569512861 SHA256 a8d58a82e734ce28acf3cc5730805c7db7ebb54cbb6eeff67dd379cb8a6f234e
+DIST postfixadmin-2.1.0.tgz 160525 RMD160 a90773bcfd9caa0a197fb11a39ac1350a053ebc2 SHA1 9c87962a543df7639a547a021d192998e5c96ca2 SHA256 8c34f17b91c1f82923b8fc3f0fb73716e853f874b2015998a975bd9909029a44
+EBUILD postfixadmin-2.1.0-r2.ebuild 3576 RMD160 758bca539d36b33bd481660c5d58346d59149a50 SHA1 6d0de1518c1702c1a13276e1fc6ab9872e7d78c6 SHA256 4b2edaa57da7a9c069228903857c6207b6071b58d4a2a59eac0c6b19fc94af65
+MISC ChangeLog 1094 RMD160 61019a21da550eca174ca735cdf4632492ab7c90 SHA1 afdab5691b87ceebfe7dab155a384ff4a6c3e74b SHA256 2a4a935d09a6176b77c42f41de85fdf9cf3534a81ae90efdb36500719cca5899
+MISC metadata.xml 300 RMD160 bf586296c9109dde24954321b649d4209515a655 SHA1 4d51a604920a4063599ce594e66c89bade642e2b SHA256 ede26e0fd846cfff8f6fbe5207a5f62606d3fdd8b7dd36fbc7eca81f5059c9e9
diff --git a/net-mail/postfixadmin/files/config-hook.sh b/net-mail/postfixadmin/files/config-hook.sh
new file mode 100644
index 0000000..bc22227
--- /dev/null
+++ b/net-mail/postfixadmin/files/config-hook.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+case "$1" in
+ install)
+ sed -i "s:^\(AuthUserFile \).*$:\1${MY_INSTALLDIR}/admin/.htpasswd:gI" ${MY_INSTALLDIR}/admin/.htaccess || exit
+ ;;
+ *)
+ # Nothing to do for clean up
+ ;;
+esac
diff --git a/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2 b/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2
new file mode 100644
index 0000000..69c0e10
--- /dev/null
+++ b/net-mail/postfixadmin/files/digest-postfixadmin-2.1.0-r2
@@ -0,0 +1,3 @@
+MD5 89043e52796298f44a06d65eaddaef09 postfixadmin-2.1.0.tgz 160525
+RMD160 a90773bcfd9caa0a197fb11a39ac1350a053ebc2 postfixadmin-2.1.0.tgz 160525
+SHA256 8c34f17b91c1f82923b8fc3f0fb73716e853f874b2015998a975bd9909029a44 postfixadmin-2.1.0.tgz 160525
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch
new file mode 100644
index 0000000..88bafcf
--- /dev/null
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-1.patch
@@ -0,0 +1,50 @@
+diff -aur pfa/languages/it.lang postfixAdmin/languages/it.lang
+--- pfa/languages/it.lang 2006-02-08 19:00:49.170559750 +0100
++++ postfixAdmin/languages/it.lang 2006-02-08 17:42:17.462480000 +0100
+@@ -156,16 +156,16 @@
+ $PALANG['pSendmail_result_error'] = '<span class="error_msg">Impossibile creare la casella di posta!</span>';
+ $PALANG['pSendmail_result_succes'] = 'La casella di posta&egrave; stata creata!';
+
+-$PALANG['pAdminMenu_list_admin'] = 'Lista degli amministratori';
+-$PALANG['pAdminMenu_list_domain'] = 'Lista dei domini';
+-$PALANG['pAdminMenu_list_virtual'] = 'Lista virtuale';
+-$PALANG['pAdminMenu_viewlog'] = 'Vedi Log';
+-$PALANG['pAdminMenu_backup'] = 'Fai Backup';
+-$PALANG['pAdminMenu_create_domain_admins'] = 'Amministratori del dominio';
+-$PALANG['pAdminMenu_create_admin'] = 'Nuovo Amministratore';
++$PALANG['pAdminMenu_list_admin'] = 'Admins';
++$PALANG['pAdminMenu_list_domain'] = 'Dominii';
++$PALANG['pAdminMenu_list_virtual'] = 'Stato dominii';
++$PALANG['pAdminMenu_viewlog'] = 'Log';
++$PALANG['pAdminMenu_backup'] = 'Backup';
++$PALANG['pAdminMenu_create_domain_admins'] = 'Admin dominio';
++$PALANG['pAdminMenu_create_admin'] = 'Nuovo Admin';
+ $PALANG['pAdminMenu_create_domain'] = 'Nuovo Dominio';
+-$PALANG['pAdminMenu_create_alias'] = 'Aggiungi Alias';
+-$PALANG['pAdminMenu_create_mailbox'] = 'Aggiungi casella di posta';
++$PALANG['pAdminMenu_create_alias'] = 'Nuovo Alias';
++$PALANG['pAdminMenu_create_mailbox'] = 'Nuova casella';
+
+ $PALANG['pAdminList_admin_domain'] = 'Dominio';
+ $PALANG['pAdminList_admin_username'] = 'Amministratori';
+@@ -199,7 +199,7 @@
+ $PALANG['pAdminCreate_domain_welcome'] = 'Aggiungi nuovo dominio';
+ $PALANG['pAdminCreate_domain_domain'] = 'Dominio';
+ $PALANG['pAdminCreate_domain_domain_text_error'] = '<span class="error_msg">Il dominio esiste di gi&agrave;!</span>';
+-$PALANG['pAdminCreate_domain_description'] = 'Descri<ione';
++$PALANG['pAdminCreate_domain_description'] = 'Descrizione';
+ $PALANG['pAdminCreate_domain_aliases'] = 'Alias';
+ $PALANG['pAdminCreate_domain_aliases_text'] = '-1 = disabilita | 0 = illimitati';
+ $PALANG['pAdminCreate_domain_mailboxes'] = 'Caselle di posta';
+diff -aur pfa/templates/admin_list-admin.tpl postfixAdmin/templates/admin_list-admin.tpl
+--- pfa/templates/admin_list-admin.tpl 2006-02-08 19:00:50.022613000 +0100
++++ postfixAdmin/templates/admin_list-admin.tpl 2006-02-08 18:47:26.551992250 +0100
+@@ -18,7 +18,7 @@
+ print " <td><a href=\"list-domain.php?username=" . $list_admins[$i] . "\">" . $list_admins[$i] . "</a></td>";
+ print " <td>" . $admin_properties[$i]['domain_count'] . "</td>";
+ print " <td>" . $admin_properties[$i]['modified'] . "</td>";
+- $active = ($admin_properties[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
++ $active = ($admin_properties[$i]['active'] == t) ? $PALANG['YES'] : $PALANG['NO'];
+ print " <td><a href=\"edit-active-admin.php?username=" . $list_admins[$i] . "\">" . $active . "</a></td>";
+ print " <td><a href=\"edit-admin.php?username=" . $list_admins[$i] . "\">" . $PALANG['edit'] . "</a></td>";
+ print " <td><a href=\"delete.php?table=admin&where=username&delete=" . $list_admins[$i] . "\" onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pAdminList_admin_username'] . ": " . $list_admins[$i] . "')\">" . $PALANG['del'] . "</a></td>";
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch
new file mode 100644
index 0000000..3b21e2d
--- /dev/null
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-2.patch
@@ -0,0 +1,149 @@
+diff -aNru pfa/admin/create-admin.php postfixAdmin/admin/create-admin.php
+--- pfa/admin/create-admin.php 2006-02-08 19:00:47.510456000 +0100
++++ postfixAdmin/admin/create-admin.php 2006-02-09 16:07:48.646646750 +0100
+@@ -79,7 +79,7 @@
+ $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text'];
+
+
+- $result = db_query ("INSERT INTO admin (username,password,created,modified) VALUES ('$fUsername','$password',NOW(),NOW())");
++ $result = db_query ("INSERT INTO admin (username,password,created,modified,active) VALUES ('$fUsername','$password',NOW(),NOW(),'t')");
+ if ($result['rows'] != 1)
+ {
+ $tMessage = $PALANG['pAdminCreate_admin_result_error'] . "<br />($fUsername)<br />";
+diff -aNru pfa/admin/create-domain.php postfixAdmin/admin/create-domain.php
+--- pfa/admin/create-domain.php 2006-02-08 19:00:47.574460000 +0100
++++ postfixAdmin/admin/create-domain.php 2006-02-09 16:05:24.385631000 +0100
+@@ -81,14 +81,14 @@
+ $fAliases = -1;
+ $fMailboxes = -1;
+ $fMaxquota = -1;
+- $fBackupmx = 1;
++ $fBackupmx = 't';
+ }
+ else
+ {
+- $fBackupmx = 0;
++ $fBackupmx = 'f';
+ }
+
+- $result = db_query ("INSERT INTO domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$fBackupmx,NOW(),NOW())");
++ $result = db_query ("INSERT INTO domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport','$fBackupmx',NOW(),NOW())");
+ if ($result['rows'] != 1)
+ {
+ $tMessage = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />";
+diff -aNru pfa/admin/edit-active-admin.php postfixAdmin/admin/edit-active-admin.php
+--- pfa/admin/edit-active-admin.php 2006-02-08 19:00:47.674466250 +0100
++++ postfixAdmin/admin/edit-active-admin.php 2006-02-09 15:54:24.412385250 +0100
+@@ -25,8 +25,8 @@
+ if ($_SERVER['REQUEST_METHOD'] == "GET")
+ {
+ if (isset ($_GET['username'])) $fUsername = escape_string ($_GET['username']);
+-
+- $result = db_query ("UPDATE admin SET active=1-active WHERE username='$fUsername'");
++
++ $result = db_query ("UPDATE admin SET active=NOT active WHERE username='$fUsername'");
+ if ($result['rows'] != 1)
+ {
+ $error = 1;
+diff -aNru pfa/admin/edit-active-domain.php postfixAdmin/admin/edit-active-domain.php
+--- pfa/admin/edit-active-domain.php 2006-02-08 19:00:47.706468250 +0100
++++ postfixAdmin/admin/edit-active-domain.php 2006-02-09 15:54:45.329692500 +0100
+@@ -26,7 +26,7 @@
+ {
+ if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
+
+- $result = db_query ("UPDATE domain SET active=1-active WHERE domain='$fDomain'");
++ $result = db_query ("UPDATE domain SET active=NOT active WHERE domain='$fDomain'");
+ if ($result['rows'] != 1)
+ {
+ $error = 1;
+diff -aNru pfa/admin/edit-active.php postfixAdmin/admin/edit-active.php
+--- pfa/admin/edit-active.php 2006-02-08 19:00:47.742470500 +0100
++++ postfixAdmin/admin/edit-active.php 2006-02-09 15:58:32.827910250 +0100
+@@ -28,7 +28,7 @@
+ if (isset ($_GET['username'])) $fUsername = escape_string ($_GET['username']);
+ if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
+
+- $result = db_query ("UPDATE mailbox SET active=1-active WHERE username='$fUsername' AND domain='$fDomain'");
++ $result = db_query ("UPDATE mailbox SET active= NOT active WHERE username='$fUsername' AND domain='$fDomain'");
+ if ($result['rows'] != 1)
+ {
+ $error = 1;
+diff -aNru pfa/admin/edit-admin.php postfixAdmin/admin/edit-admin.php
+--- pfa/admin/edit-admin.php 2006-02-08 19:00:47.774472500 +0100
++++ postfixAdmin/admin/edit-admin.php 2006-02-09 16:10:36.421132000 +0100
+@@ -75,13 +75,15 @@
+
+ if (empty ($fPassword) and empty ($fPassword2))
+ {
+- if ($fActive == "on") $fActive = 1;
++ if ($fActive == "on") $fActive = 't';
++ else $fActive = 'f';
+ $result = db_query ("UPDATE admin SET modified=NOW(),active='$fActive' WHERE username='$username'");
+ }
+ else
+ {
+ $password = pacrypt ($fPassword);
+- if ($fActive == "on") $fActive = 1;
++ if ($fActive == "on") $fActive = 't';
++ else $fActive = 'f';
+ $result = db_query ("UPDATE admin SET password='$password',modified=NOW(),active='$fActive' WHERE username='$username'");
+ }
+
+diff -aNru pfa/admin/viewlog.php postfixAdmin/admin/viewlog.php
+--- pfa/admin/viewlog.php 2006-02-08 19:00:48.074491250 +0100
++++ postfixAdmin/admin/viewlog.php 2006-02-08 17:51:06.043514250 +0100
+@@ -30,7 +30,7 @@
+
+ if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) $fDomain = $list_domains[0];
+
+- $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
++ $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 100");
+ if ($result['rows'] > 0)
+ {
+ while ($row = db_array ($result['result']))
+@@ -49,7 +49,7 @@
+ {
+ $fDomain = escape_string ($_POST['fDomain']);
+
+- $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
++ $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 100");
+ if ($result['rows'] > 0)
+ {
+ while ($row = db_array ($result['result']))
+diff -aNru pfa/edit-active.php postfixAdmin/edit-active.php
+--- pfa/edit-active.php 2006-02-08 19:00:48.222500500 +0100
++++ postfixAdmin/edit-active.php 2006-02-09 16:14:10.890535500 +0100
+@@ -37,7 +37,7 @@
+ }
+ else
+ {
+- $result = db_query ("UPDATE mailbox SET active=1-active WHERE username='$fUsername' AND domain='$fDomain'");
++ $result = db_query ("UPDATE mailbox SET active=NOT active WHERE username='$fUsername' AND domain='$fDomain'");
+ if ($result['rows'] != 1)
+ {
+ $error = 1;
+diff -aNru pfa/templates/admin_list-virtual.tpl postfixAdmin/templates/admin_list-virtual.tpl
+--- pfa/templates/admin_list-virtual.tpl 2006-02-08 19:00:50.090617250 +0100
++++ postfixAdmin/templates/admin_list-virtual.tpl 2006-02-09 16:01:38.463511750 +0100
+@@ -95,7 +95,7 @@
+ print " <td>" . $tMailbox[$i]['name'] . "</td>\n";
+ if ($CONF['quota'] == 'YES') print " <td>" . $tMailbox[$i]['quota'] / $CONF['quota_multiplier'] . "</td>\n";
+ print " <td>" . $tMailbox[$i]['modified'] . "</td>\n";
+- $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
++ $active = ($tMailbox[$i]['active'] == 't') ? $PALANG['YES'] : $PALANG['NO'];
+ print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n";
+ print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n";
+ print " <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";
+diff -aNru pfa/templates/overview.tpl postfixAdmin/templates/overview.tpl
+--- pfa/templates/overview.tpl 2006-02-08 19:00:50.650652250 +0100
++++ postfixAdmin/templates/overview.tpl 2006-02-09 16:16:36.891660000 +0100
+@@ -127,7 +127,7 @@
+ print "</td>\n";
+ }
+ print " <td>" . $tMailbox[$i]['modified'] . "</td>\n";
+- $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
++ $active = ($tMailbox[$i]['active'] == 't') ? $PALANG['YES'] : $PALANG['NO'];
+ print " <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n";
+ print " <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n";
+ print " <td><a href=\"delete.php?delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";
diff --git a/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch
new file mode 100644
index 0000000..6766cf5
--- /dev/null
+++ b/net-mail/postfixadmin/files/postfixadmin-2.1.0-postgres-3.patch
@@ -0,0 +1,49 @@
+diff -aNru pfa/admin/backup.php postfixAdmin/admin/backup.php
+--- pfa/admin/backup.php 2006-02-08 19:00:47.478454000 +0100
++++ postfixAdmin/admin/backup.php 2006-02-22 15:16:43.677891000 +0100
+@@ -40,41 +40,11 @@
+ }
+ else
+ {
+- fwrite ($fh, $header);
+-
+- $tables = array('admin','alias','domain','domain_admins','log','mailbox','vacation');
+-
+- for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
+- {
+- $result = db_query ("SHOW CREATE TABLE $tables[$i]");
+- if ($result['rows'] > 0)
+- {
+- while ($row = db_array ($result['result']))
+- {
+- fwrite ($fh, "$row[1]\n\n");
+- }
+- }
+- }
+-
+- for ($i = 0 ; $i < sizeof ($tables) ; ++$i)
+- {
+- $result = db_query ("SELECT * FROM $tables[$i]");
+- if ($result['rows'] > 0)
+- {
+- while ($row = db_assoc ($result['result']))
+- {
+- foreach ($row as $key=>$val)
+- {
+- $fields[] = $key;
+- $values[] = $val;
+- }
+-
+- fwrite ($fh, "INSERT INTO ". $tables[$i] . " (". implode (',',$fields) . ") VALUES ('" . implode ('\',\'',$values) . "')\n");
+- $fields = "";
+- $values = "";
+- }
+- }
++ exec('/usr/bin/pg_dump -U postgres postfix', $exec_dump);
++ foreach($exec_dump as $row) {
++ fwrite($fh, $row. "\r\n");
+ }
++ fclose($fh);
+ }
+ header ("Content-Type: application/octet-stream");
+ header ("Content-Disposition: attachment; filename=\"$filename\"");
diff --git a/net-mail/postfixadmin/files/postinstall-en.txt b/net-mail/postfixadmin/files/postinstall-en.txt
new file mode 100644
index 0000000..c28ec30
--- /dev/null
+++ b/net-mail/postfixadmin/files/postinstall-en.txt
@@ -0,0 +1,45 @@
+To complete installation, you must:
+ 1. Create the needed MySQL database and tables and user:
+ mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/${PVR}_create.sql
+ 2. Reload MySQL:
+ /etc/init.d/mysql restart
+ 3. Change the password for the admin user! Inital password is
+ "admin" (without the qotes).
+
+
+Updating from older version of Postfix Admin:
+ * When you are upgrading from an older Postfix Admin version, make sure you
+ * backup your database before you run the update script on your database.
+ * mysqldump -a -u root -p > /tmp/postfixadmin-backup.sql
+
+ For update from 2.0.x version of Postfix Admin:
+ 1. Please read the BACKUP_MX.TXT
+ 2. Update the needed MySQL database and tables:
+ mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/2.0.x_to_${PVR}.sql
+ 3. Reload MySQL:
+ /etc/init.d/mysql restart
+
+ For update from 1.5x (or older) version of Postfix Admin:
+ 1. Please read the UPGRADE.TXT
+ 2. Update the needed MySQL database and tables:
+ mysql -u root -p < ${MY_SQLSCRIPTSDIR}/mysql/1.5x_to_${PVR}.sql
+ 3. Reload MySQL:
+ /etc/init.d/mysql restart
+
+
+To use Virtual Vacation, please read VIRTUAL_VACATION_INSTALL.
+
+Check the config.inc.php file. There you can specify settings that are
+relevant to your setup.
+
+Postfix Admin contains 3 views of administration:
+ 1. Site Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/admin/.
+ 2. Domain Admin view, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/.
+ 3. User Admin View, located at http://${VHOST_HOSTNAME}${VHOST_APPDIR}/users/.
+
+In order to do the initial configuration you have to go to the Site Admin view.
+
+The default password for the Site Admin view of Postfix Admin is admin/admin.
+
+This is specified in the .htpasswd file in the /admin directory. Make sure
+that the location of the .htpasswd file matches your path.
diff --git a/net-mail/postfixadmin/metadata.xml b/net-mail/postfixadmin/metadata.xml
new file mode 100644
index 0000000..2dde2f7
--- /dev/null
+++ b/net-mail/postfixadmin/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>web-apps</herd>
+<maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ <description>Primary maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild b/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild
new file mode 100644
index 0000000..8827390
--- /dev/null
+++ b/net-mail/postfixadmin/postfixadmin-2.1.0-r2.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Source: http://bugs.gentoo.org/show_bug.cgi?id=50035
+# Submitted-By: SteveB <tp22a@softhome.net>
+# Reviewed-By: wrobel 2005-12-14
+
+inherit eutils webapp depend.php depend.apache
+
+DESCRIPTION="Web Based Management tool for Postfix for dealing with Postfix Style Virtual Domains
+and Virtual Users that are stored in MySQL."
+HOMEPAGE="http://sourceforge.net/projects/postfixadmin/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="MPL-1.1"
+KEYWORDS="~x86 ~amd64"
+IUSE="mysql postgres"
+
+RDEPEND="virtual/httpd-php
+ >=mail-mta/postfix-2.0.0
+ mysql? ( dev-perl/DBI dev-perl/DBD-mysql )"
+
+need_apache
+
+pkg_setup() {
+ webapp_pkg_setup
+ if use mysql; then
+ enewgroup vacation
+ enewuser vacation -1 -1 /dev/null vacation
+ fi
+
+ local flags="pcre session"
+ use mysql && flags="${flags} mysql"
+ use postgres && flags="${flags} postgres"
+ require_php_with_use ${flags}
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Remove .cvs* files and CVS directories
+ find ${S} -name .cvs\* -or \( -type d -name CVS -prune \) -exec rm -rf {} \;
+
+ # Database support (we don't care wich one is used. Allow both of them!)
+ if use mysql; then
+ cp ./DATABASE_MYSQL.TXT ${T}/mysql-setup.sql || die "Creating MySQL setup script failed!"
+ cp ./TABLE_CHANGES.TXT ${T}/mysql-update.sql || die "Creating MySQL update script failed!"
+ cp ./VIRTUAL_VACATION/INSTALL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT
+ fi
+ if use postgres ; then
+ cp ./DATABASE_PGSQL.TXT ${T}/pgsql-setup.sql || die "Creating PostgreSQL setup script failed!"
+ epatch "${FILESDIR}"/${P}-postgres-1.patch || die "Patching for postgres failed."
+ epatch "${FILESDIR}"/${P}-postgres-2.patch || die "Patching for postgres failed."
+ epatch "${FILESDIR}"/${P}-postgres-3.patch || die "Patching for postgres failed."
+ fi
+
+ # Rename config.inc.php
+ cp ./config.inc.php.sample ${T}/config.inc.php || die "Creating config file failed!"
+}
+
+src_install() {
+ webapp_src_preinst
+
+ # Virtual Vacation only works with MySQL
+ if use mysql; then
+ diropts -m0770 -o vacation -g vacation
+ keepdir /var/spool/vacation
+ insinto /var/spool/vacation
+ insopts -m770 -o vacation -g vacation
+ doins "${S}"/VIRTUAL_VACATION/vacation.pl
+ fi
+
+ # install the SQL scripts available to us
+ # unfortunately, we do not have scripts to upgrade from older versions
+ # these are things we need to add at a later date
+ #
+ if use mysql; then
+ webapp_sqlscript mysql ${T}/mysql-setup.sql
+ webapp_sqlscript mysql ${T}/mysql-update.sql 2.0.x
+ webapp_sqlscript mysql ${T}/mysql-update.sql 1.5x
+ fi
+ if use postgres ; then
+ webapp_sqlscript pgsql ${T}/pgsql-setup.sql
+ fi
+
+
+ einfo "Installing main files"
+ dodir ${MY_HTDOCSDIR}
+ cp -r . "${D}"${MY_HTDOCSDIR} || die "cp failed"
+ cp ${T}/config.inc.php "${D}"${MY_HTDOCSDIR} || die "cp failed"
+
+ # handle documentation files
+ local docs="{BACKUP_MX,CHANGELOG,INSTALL,LANGUAGE,LICENSE.TXT,TABLE_BACKUP_MX,TABLE_CHANGES,UPGRADE}.TXT"
+ use mysql && docs="${docs} DATABASE_MYSQL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT"
+ use postgres && docs="${docs} DATABASE_PGSQL.TXT"
+
+ dodoc ${docs}
+ for foo in ${docs} DATABASE_MYSQL.TXT DATABASE_PGSQL.TXT ADDITIONS VIRTUAL_VACATION ; do
+ rm -rf "${D}"${MY_HTDOCSDIR}/${foo}
+ done
+
+ webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
+ webapp_configfile ${MY_HTDOCSDIR}/admin/.htpasswd
+
+ # Add the hook file to fix the .htaccess file
+ webapp_hook_script "${FILESDIR}"/config-hook.sh
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}