summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/postfixadmin/files')
-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
6 files changed, 306 insertions, 0 deletions
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.