diff --git a/ADDITIONS/cyrus/Changelog b/ADDITIONS/cyrus/Changelog new file mode 100644 index 00000000..f57c4d65 --- /dev/null +++ b/ADDITIONS/cyrus/Changelog @@ -0,0 +1,8 @@ + +Version 0.1 -- 26/10/2009 +--------------------------- + + * Public Release. + * Postcreation, Postdeletion and Postedit hooks. + + diff --git a/ADDITIONS/cyrus/README-ES.txt b/ADDITIONS/cyrus/README-ES.txt new file mode 100644 index 00000000..e1c0cb37 --- /dev/null +++ b/ADDITIONS/cyrus/README-ES.txt @@ -0,0 +1,7 @@ + +Configuración +------------- + + - Edita el fichero cyrus.conf y modifica las variables $cyrus_*. El usuario debe tener permisos sobre todas las cuentas. + - Edita los ficheros cyrus-*.pl y cambia la ruta de cyrus.conf (linea require '/path/to/cyrus.conf';) + diff --git a/ADDITIONS/cyrus/README.txt b/ADDITIONS/cyrus/README.txt new file mode 100644 index 00000000..fa67e319 --- /dev/null +++ b/ADDITIONS/cyrus/README.txt @@ -0,0 +1,7 @@ + +Configuration +------------- + + - Edit cyrus.conf and set $cyrus_* variables correctly. User must have permission over all accounts. + - Edit cyrus-*.pl and change path to cyrus.conf (require '/path/to/cyrus.conf'; line) + diff --git a/ADDITIONS/cyrus/cyrus-mailbox-postcreation.pl b/ADDITIONS/cyrus/cyrus-mailbox-postcreation.pl new file mode 100755 index 00000000..4a6edf91 --- /dev/null +++ b/ADDITIONS/cyrus/cyrus-mailbox-postcreation.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +# Cyrus Mailbox creation +# +# Iñaki Rodriguez (irodriguez@virtualminds.es / irodriguez@ackstorm.es) +# +# LICENSE +# This source file is subject to the GPL license that is bundled with +# this package in the file LICENSE.TXT. +# +# (26/10/2009) + +use Cyrus::IMAP::Admin; +require '/etc/mail/postfixadmin/cyrus.conf'; +use strict; +use vars qw($cyrus_user $cyrus_password $cyrus_host); + +my %opts; + +my $mailbox = mailbox_name($ARGV[0]); + +my $client = Cyrus::IMAP::Admin->new($cyrus_host); +die_on_error($client); + +$opts{-user} = $cyrus_user; +$opts{-password} = $cyrus_password; + +$client->authenticate(%opts); +die_on_error($client); + +$client->create($mailbox); +die_on_error($client); + +$client->setquota($mailbox,'STORAGE',scalar $ARGV[3]) if ($ARGV[3] > 0); +die_on_error($client); + diff --git a/ADDITIONS/cyrus/cyrus-mailbox-postdelete.pl b/ADDITIONS/cyrus/cyrus-mailbox-postdelete.pl new file mode 100755 index 00000000..a73a8a4c --- /dev/null +++ b/ADDITIONS/cyrus/cyrus-mailbox-postdelete.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +# Cyrus Mailbox deletion +# +# Iñaki Rodriguez (irodriguez@virtualminds.es / irodriguez@ackstorm.es) +# +# LICENSE +# This source file is subject to the GPL license that is bundled with +# this package in the file LICENSE.TXT. +# +# (26/10/2009) + +use Cyrus::IMAP::Admin; +require '/etc/mail/postfixadmin/cyrus.conf'; +use strict; +use vars qw($cyrus_user $cyrus_password $cyrus_host); + +my %opts; + +my $mailbox = mailbox_name($ARGV[0]); + +my $client = Cyrus::IMAP::Admin->new($cyrus_host); +die_on_error($client); + +$opts{-user} = $cyrus_user; +$opts{-password} = $cyrus_password; + +$client->authenticate(%opts); +die_on_error($client); + +$client->setacl($mailbox,$cyrus_user => 'all'); +die_on_error($client); + +$client->deletemailbox($mailbox); +die_on_error($client); + diff --git a/ADDITIONS/cyrus/cyrus-mailbox-postedit.pl b/ADDITIONS/cyrus/cyrus-mailbox-postedit.pl new file mode 100755 index 00000000..e8f7b451 --- /dev/null +++ b/ADDITIONS/cyrus/cyrus-mailbox-postedit.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +# Cyrus Mailbox edition +# +# Iñaki Rodriguez (irodriguez@virtualminds.es / irodriguez@ackstorm.es) +# +# LICENSE +# This source file is subject to the GPL license that is bundled with +# this package in the file LICENSE.TXT. +# +# (26/10/2009) + +use Cyrus::IMAP::Admin; +require '/etc/mail/postfixadmin/cyrus.conf'; +use strict; +use vars qw($cyrus_user $cyrus_password $cyrus_host); + +my %opts; + +my $mailbox = mailbox_name($ARGV[0]); + +my $client = Cyrus::IMAP::Admin->new($cyrus_host); +die_on_error($client); + +$opts{-user} = $cyrus_user; +$opts{-password} = $cyrus_password; + +$client->authenticate(%opts); +die_on_error($client); + +$client->setquota($mailbox,'STORAGE',scalar $ARGV[3]) if ($ARGV[3] > 0); +die_on_error($client); + diff --git a/ADDITIONS/cyrus/cyrus.conf b/ADDITIONS/cyrus/cyrus.conf new file mode 100644 index 00000000..80933309 --- /dev/null +++ b/ADDITIONS/cyrus/cyrus.conf @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Config + +$cyrus_user = 'cyrus'; +$cyrus_password = 'cyruspass'; +$cyrus_host = 'localhost'; + +# unixhierarchysep => 1 (yes) / 0 (no) +$unixhierarchysep = 1; + +# Common routines + +sub mailbox_name { + my $mailbox = shift; + + if($unixhierarchysep) { + $mailbox = 'user/'.$ARGV[0]; + } else { + $mailbox = 'user.'.$ARGV[0]; + } + + return $mailbox; +} + +sub die_on_error { + my $cyradm = shift; + if($cyradm->error) { die $cyradm->error; } +} +1; + diff --git a/ADDITIONS/postfixadmin-0.3-1.4.tar.gz b/ADDITIONS/postfixadmin-0.3-1.4.tar.gz deleted file mode 100644 index c40a840a..00000000 Binary files a/ADDITIONS/postfixadmin-0.3-1.4.tar.gz and /dev/null differ diff --git a/ADDITIONS/squirrelmail-plugin/INSTALL b/ADDITIONS/squirrelmail-plugin/INSTALL new file mode 100644 index 00000000..84d66e6a --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/INSTALL @@ -0,0 +1,39 @@ +Installing the postfixadmin Plugin +====================================== + +Requirements: +============= + + - PHP 5.2.x with php5-xmlrpc installed (if available; it should be available by default anyway) + - http access to a local/remote postfixadmin interface + - Zend Framework - download from http://framework.zend.com + - the Zend directory needs to be in PHP's include_path, or in the same directory + as the plugin. Suggested version 1.10; older versions should work. + +Installation : +============== + +- Check out this code (svn co http://squirrelmail-postfixadmin.palepurple.co.uk/svn/trunk postfixadmin) + into the Squirrelmail plugins directory. + +- Edit config.php and specify the remote URL for the Postfixadmin XmlRpc service. There isn't much more to change. + +- Edit the remote Postfixadmin's XmlRpc service config file and ensure 'xmlrpc_enable' is set to boolean true. + +- Enable the plugin through 'squirrelmail-configure' or 'config/conf.pl'. + Choose option 8 and move the plugin from the "Available Plugins" + category to the "Installed Plugins" category. Save and exit. + + +Security : +========== + +- The XmlRpc client needs to get the user's mailbox password before it will be able to connect to the + XmlRpc server (postfixadmin). The plugin prompts the user for their mailbox password, and caches it in their session + ($_SESSION['password']). This password is then sent once on every page load to the remote XmlRpc server. + +- You should consider doing any of the following : + + - Using https if the server and client are on seperate servers. This will probably require a signed certificate etc, and may require changes to the Zend_XmlRpc_Client's HttpClient. + - Using something like stunnel to encrypt traffic between server(s). + diff --git a/ADDITIONS/squirrelmail-plugin/LICENSE.txt b/ADDITIONS/squirrelmail-plugin/LICENSE.txt new file mode 100644 index 00000000..c43f96e2 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/LICENSE.txt @@ -0,0 +1,40 @@ + +2007/03/29 : + Before I (David Goodwin) customised this plugin, it contained the following within all + files as a header. + + /**************************************************************************************** + + Author ......... Florian Kimmerl + Contact ........ info@spacekoeln.de + Home Site ...... http://www.spacekoeln.de/ + Program ........ postfixadmin + Purpose ........ Allows you to change your postfixadmin settings within squirrelmail + + ************************************************************************************* + + The Original Code is Postfix Admin. + The Initial Developer of the Original Code is Mischa Peters . + Portions created by Mischa Peters are Copyright (c) 2002, 2003, 2004. + All Rights Reserved. + Contributor(s): + This project includes work by Mischa Peters and others that is: + Copyright (c) 2002,2003,2004 Mischa Peters + All rights reserved. + + ****************************************************************************************/ + + + Contacting the author provided no success, so I took over maintainership. + + Please note: + + 1) Changes made by myself (David Goodwin) will be licensed under the GPL + 2) PostfixAdmin has itself been relicensed under the GPL; however this took place _after_ + this plugin was written. + 3) Squirrelmail itself is released under http://squirrelmail.org/wiki/SquirrelMailGPL (GPL) + + +The GNU public license can be found online at : + + http://www.gnu.org/licenses/gpl.txt diff --git a/ADDITIONS/squirrelmail-plugin/README b/ADDITIONS/squirrelmail-plugin/README new file mode 100644 index 00000000..ee9631cc --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/README @@ -0,0 +1,70 @@ +Squirrelmail Plugin Postfixadmin +******************************** + +The Postfixadmin SquirrelMail plugin let users change their virtual alias, +vacation status/message and password if you are using the great postfixadmin +tool from http://high5.net/postfixadmin + +Version 0.4.3 2007/08/14 + +Postfixadmin - Postfixadmin+MySQL/PgSQL plugin for Squirrelmail + + +Author: Florian Kimmerl +Author: Sam Brookes + - Initial conversion to MDB2 + - Fix SQL Injections etc +Author: David Goodwin + - Subsequent tidyup + testing etc +Author: Krzysztof 'Mad Max' Laska - + - Polish Translation. + + + +The Initial Developer of the Original postfixadmin Code is Mischa Peters. +Portions created by Mischa Peters are Copyright (c) 2002, 2003, 2004. +All Rights Reserved. + +REQUIREMENTS + +o SquirrelMail 1.4x + +o A working Mail-System "Virtual Domains and Users with postfix+Courier-IMAP+MySQL" (or PostgreSQL) See http://high5.net/howto/ + +o POSTFIXADMIN version 2.2.0 or higher. See http://sf.net/projects/postfixadmin + +o This plugin only uses the postfixadmin database + +o Pear MDB2 database abstraction layer - see http://pear.php.net + +o PHP installation with register globals TURNED OFF (huraren on IRC reports that the MDB2 driver isn't happy with it turned on) + +INSTALLATION + +See the included file INSTALL + +BUGS + +o Probably vulnerable to cross site scripting, certainly when setting the vacation message. + +o There may be some remaining SQL injection holes. + +TODO + +-Code Cleanup +-Tranlation + + +TRANSLATIONS + +Translations are welcome! Send the *.po-File to: david@NO.codepoets.SPAM.co.uk + + +ACKNOWLEDGMENTS + +Thanks to the SquirrelMail team for building such a great app and +for all the work they do to keep it running. + +Thanks to high5.net for writing the great Postfixadmin tool + + diff --git a/ADDITIONS/squirrelmail-plugin/common.php b/ADDITIONS/squirrelmail-plugin/common.php new file mode 100644 index 00000000..f4f626c7 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/common.php @@ -0,0 +1,39 @@ + Mon, 01 Feb 2010 09:56:00 +0000 + +squirrelmail-postfixadmin (2.2.0) stable; urgency=low + + * Changed DB backend to use prepared statements + * Changed vacation handling to match that of Postfixadmin (vacation.active + etc) + * Changed vacation page to support UTF8 + + -- David Goodwin Wed, 20 Aug 2008 15:25:00 +0000 + +squirrelmail-postfixadmin (2.1.1-1) stable; urgency=low + + * Add NL language support + * Better db error logging (e.g. if wrong mdb2 driver specified etc) + + -- David Goodwin Wed, 12 Dec 2007 16:00:00 +0000 + +squirrelmail-postfixadmin (2.1.0-1) stable; urgency=low + + * Initial release. + + -- David Goodwin Thu, 8 Nov 2007 20:00:00 +0000 diff --git a/ADDITIONS/squirrelmail-plugin/debian/conffiles b/ADDITIONS/squirrelmail-plugin/debian/conffiles new file mode 100644 index 00000000..10d515ac --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/conffiles @@ -0,0 +1 @@ +/etc/squirrelmail/plugins/postfixadmin-config.php diff --git a/ADDITIONS/squirrelmail-plugin/debian/control b/ADDITIONS/squirrelmail-plugin/debian/control new file mode 100644 index 00000000..7d898145 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/control @@ -0,0 +1,19 @@ +Source: squirrelmail-postfixadmin +Section: mail +Priority: optional +Maintainer: David Goodwin +Standards-Version: 3.6.1 + +Package: squirrelmail-postfixadmin +Architecture: all +Depends: squirrelmail, php-pear +Suggests: postfixadmin +Description: Plugin for Squirrelmail to integrate with Postfixadmin + Postfixadmin is a web based interface for managing mail domains + and users. This package integrates Squirrelmail with it. + Users can change their password, forwarding and vacation settings + from within Squirrelmail when this package is installed, and + enabled through the ./squirrelmail-configure command. + . + For further information see + http://squirrelmail-postfixadmin.palepurple.co.uk diff --git a/ADDITIONS/squirrelmail-plugin/debian/copyright b/ADDITIONS/squirrelmail-plugin/debian/copyright new file mode 100644 index 00000000..ba411877 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by David Goodwin +2007/11/08 + +It was downloaded from: http://squirremail-postfixadmin.palepurple.co.uk + +Upstream Author(s): n/a + +Copyright: + Copyright (C) 2007+ by David Goodwin + +License: GPL v2+ diff --git a/ADDITIONS/squirrelmail-plugin/debian/docs b/ADDITIONS/squirrelmail-plugin/debian/docs new file mode 100755 index 00000000..7e0c93b4 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/docs @@ -0,0 +1,4 @@ +LICENSE.txt +README +INSTALL +debian/README.Debian diff --git a/ADDITIONS/squirrelmail-plugin/debian/files b/ADDITIONS/squirrelmail-plugin/debian/files new file mode 100644 index 00000000..72c6f88c --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/files @@ -0,0 +1 @@ +squirrelmail-postfixadmin_2.2.0_all.deb mail optional diff --git a/ADDITIONS/squirrelmail-plugin/debian/postfixadmin-squirrelmail.dirs b/ADDITIONS/squirrelmail-plugin/debian/postfixadmin-squirrelmail.dirs new file mode 100644 index 00000000..d6fadc4b --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/postfixadmin-squirrelmail.dirs @@ -0,0 +1,3 @@ +usr/share/squirrelmail/plugins/postfixadmin +usr/share/doc/squirrelmail-postfixadmin +etc/squirrelmail/plugins diff --git a/ADDITIONS/squirrelmail-plugin/debian/postinst b/ADDITIONS/squirrelmail-plugin/debian/postinst new file mode 100644 index 00000000..3b9ab4d1 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/postinst @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +echo "WARNING: You need to read /usr/share/doc/squirrelmail-postfixadmin/README.Debian!" +echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" diff --git a/ADDITIONS/squirrelmail-plugin/debian/rules b/ADDITIONS/squirrelmail-plugin/debian/rules new file mode 100755 index 00000000..a64eb150 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/debian/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f +# debian/rules makefile for squirrelmail + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + +clean: + dh_testdir + dh_testroot + dh_clean + +install: build + $(checkdir) + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_install + mkdir -p debian/tmp/usr/share/squirrelmail/plugins/postfixadmin + cp -a *.php version debian/tmp/usr/share/squirrelmail/plugins/postfixadmin + cp -a locale debian/tmp/usr/share/squirrelmail/plugins/postfixadmin + cp -a po debian/tmp/usr/share/squirrelmail/plugins/postfixadmin + mkdir -p debian/tmp/etc/squirrelmail/plugins/ + cp -a *.sample debian/tmp/etc/squirrelmail/plugins/postfixadmin-config.php + mkdir -p debian/tmp/DEBIAN + cp debian/postinst debian/tmp/DEBIAN/postinst + chmod 555 debian/tmp/DEBIAN/postinst + ln -s /etc/squirrelmail/plugins/postfixadmin-config.php debian/tmp/usr/share/squirrelmail/plugins/postfixadmin/config.php + find debian/tmp -name .svn | xargs -r rm -r + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs -X.svn + dh_installexamples + dh_installman + dh_installcron + dh_link + dh_compress + dh_fixperms -X/var + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/ADDITIONS/squirrelmail-plugin/functions.inc.php b/ADDITIONS/squirrelmail-plugin/functions.inc.php new file mode 100644 index 00000000..9a78b532 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/functions.inc.php @@ -0,0 +1,102 @@ +"; +} + +function _display_password_form() { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + do_header('Postfixadmin Squirrelmail - Login'); + echo _('The PostfixAdmin plugin needs your current mailbox password'); + echo "
"; + echo _('Password for'); + echo " " . $_SESSION['username'] . " :"; + echo ""; + echo "
"; + do_footer(); +} + +/** + * This returns a Zend_XmlRpc_Client instance - unless we can't log you in... + */ +function get_xmlrpc() { + global $CONF; + require_once('Zend/XmlRpc/Client.php'); + $client = new Zend_XmlRpc_Client($CONF['xmlrpc_url']); + $http_client = $client->getHttpClient(); + $http_client->setCookieJar(); + + $login_object = $client->getProxy('login'); + + if(empty($_SESSION['password'])) { + if(empty($_POST['password'])) { + _display_password_form(); + exit(0); + } + else { + try { + $success = $login_object->login($_SESSION['username'], $_POST['password']); + } + catch(Exception $e) { + //var_dump($client->getHttpClient()->getLastResponse()->getBody()); + error_log("Failed to login to xmlrpc instance - " . $e->getMessage); + die('Failed to login to xmlrpc instance'); + } + if($success) { + $_SESSION['password'] = $_POST['password']; + // reload the current page as a GET request. + header("Location: {$_SERVER['REQUEST_URI']}"); + exit(0); + } + else { + _display_password_form(); + exit(0); + } + } + } + else { + $success = $login_object->login($_SESSION['username'], $_SESSION['password']); + } + + if(!$success) { + unset($_SESSION['password']); + die("Invalid details cached... refresh this page and re-enter your mailbox password"); + } + return $client; +} + +function include_if_exists($filename) { + if(file_exists($filename)) { + include_once($filename); + } + return; +} +global $optmode; +$optmode = 'display'; + +// +// check_email +// Action: Checks if email is valid and returns TRUE if this is the case. +// Call: check_email (string email) +// +function check_email ($email) { + $return = filter_var('validate_email', $emai); + if($return === false) { + return false; + } + return true; +} + + diff --git a/ADDITIONS/squirrelmail-plugin/index.php b/ADDITIONS/squirrelmail-plugin/index.php new file mode 100644 index 00000000..01d4d112 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/index.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/ADDITIONS/squirrelmail-plugin/locale/build.sh b/ADDITIONS/squirrelmail-plugin/locale/build.sh new file mode 100644 index 00000000..951e06bd --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for f in $(find . -name postfixadmin.po) +do + msgfmt -o $(dirname $f)/postfixadmin.mo $f +done diff --git a/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..22452e7b Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..899055a1 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/cs_CZ/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,132 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: 2007-07-20 20:46+0100\n" +"Last-Translator: Michael Heca \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Pesmrovn" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Zde mete vytvoit a nastavit pesmrovn" + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Zde mete nastavit automatickou odpovd, pokud nebudete k zastien." + +msgid "Change your mailbox password." +msgstr "Zmnt heslo k Vaemu e-mailovmu tu" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "et" + +msgid "Change Password" +msgstr "Zmnit heslo" + +msgid "Change your login password" +msgstr "Zmnt heslo k Vaemu e-mailovmu tu" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "Editace adresy pro pesmrovn" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Editace pesmrovn pro V et.
Kad adresa na novm dku." + +msgid "The email address that you have entered is not valid:" +msgstr "Zadan e-mailov adresa je chybn:" + +msgid "Unable to locate alias!" +msgstr "Neni mon nalzt et!" + +msgid "Unable to modify the alias!" +msgstr "Nen mon zmnit et!" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "Dal aliasy dostanou e-mail jako BBC!" + +msgid "Alias successfully changend!" +msgstr "Pesmrovn bylo zmnno!" + +msgid "To remove an alias, simply delete it's line from the text box." +msgstr "Pro odstranen pesmrovn smate vechny dky v textovm boxu." + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Automatick odpov" + +msgid "Going Away" +msgstr "Jsem mimo" + +msgid "Coming Back" +msgstr "Jsem zpt" + +msgid "Options" +msgstr "Nastaven" + +msgid "Out of Office" +msgstr "Mimo kancel" + +msgid "Subject" +msgstr "Pedmt" + +msgid "Body" +msgstr "Tlo mailu" + +msgid "Your auto response has been removed!" +msgstr "Vae automatick odpov byla odstranna!" + +msgid "Your auto response has been set!" +msgstr "Vae automatick odpov byla nastavena!" + +msgid "You already have an auto response configured!" +msgstr "U mte nastavenu automatickou odpov!" + +#: postfixadmin_changepass.php:81 +#: postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "Zadan hesla nejsou stejn a nebo jsou przdn!" + +#: postfixadmin_forward.php:70 +#: postfixadmin_forward.php:152 +msgid "To" +msgstr "Komu" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Nen mon zmnit heslo!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Stvajc heslo neodpovd!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Vae heslo bylo zmnno!" + +msgid "Password current" +msgstr "Stvajc heslo" + +msgid "Password new" +msgstr "Nov heslo" + +msgid "Password new again" +msgstr "Nov heslo znovu" + +msgid "Please sign out and log back again with your new password!" +msgstr "Prosm odhlate se a pihlate se s novm heslem!" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Nebudy k zastien od do . Pro nalhan poadavky prosm kontaktujte ." + diff --git a/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..af6b0800 Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..44fdaa8e --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/da_DK/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,127 @@ +# Danish translation for Squirrelmail Plugin Postfixadmin. +# Copyright (C) 2004 Florian Kimmerl, 2007 David Goodwin +# This file is distributed under the same license as the Squirrelmail Plugin Postfixadmin package. +# Jesper R. Meyer , 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 0.4.3\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: 2007-11-09 16:07+0100\n" +"Last-Translator: JESPER MEYER \n" +"Language-Team: DANISH \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Videresending" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Her kan du oprette og ændre email-videresendinger." + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Tilføj en 'ikke tilstede' besked eller et autosvar til din emailadresse." + +msgid "Change your mailbox password." +msgstr "Ændre adgangskoden til din postboks" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "Alias" + +msgid "Change Password" +msgstr "Ændre adgangskode" + +msgid "Change your login password" +msgstr "Ændre din login-adgangskode" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "Rediger alias" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Rediger et alias* for dit domæne.
En modtager pr. linje." + +msgid "The email address that you have entered is not valid:" +msgstr "Emailadressen du angav er ugyldig" + +msgid "Unable to locate alias!" +msgstr "Aliaset eksistere ikke!" + +msgid "Unable to modify the alias!" +msgstr "Kunne ikke ændre aliaset!" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "*Eksta vidersendingsalias modtager altid meddelelser BCC!" + +msgid "Alias successfully changend!" +msgstr "Alias ændret!" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Autosvar" + +msgid "Going Away" +msgstr "Tager afsted" + +msgid "Coming Back" +msgstr "Kommer tilbage" + +msgid "Options" +msgstr "Indstillinger" + +msgid "Out of Office" +msgstr "Ikke tilstede" + +msgid "Subject" +msgstr "Emne" + +msgid "Body" +msgstr "Meddelelse" + +msgid "Your auto response has been removed!" +msgstr "Autosvar er fjernet!" + +msgid "Your auto response has been set!" +msgstr "Autosvar er aktiveret!" + +msgid "You already have an auto response configured!" +msgstr "Du har allerede et autosvar indstillet!" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "Adgangskoderne er ikke ens!
Eller er tomme!" + +#: postfixadmin_forward.php:70 postfixadmin_forward.php:152 +msgid "To" +msgstr "Til" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Kan ikke ændre adgangskoden!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Du glemte at skrive din nuværende adgangskode!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Din adgangskode er ændret!" + +msgid "Password current" +msgstr "Nuværende adgangskode" + +msgid "Password new" +msgstr "Ny adgangskode" + +msgid "Password new again" +msgstr "Ny adgangskode (igen)" + +msgid "Please sign out and log back again with your new password!" +msgstr "Log af og log ind igen med din nye adgangskode!" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Jeg er ikke tilstede i perioden til . I nødstilfælde kan kontaktes." diff --git a/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..815ac0a4 Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..0ea70978 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/de_DE/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,127 @@ +# postfixadmin - Plugin for Squirrelmail. +# Copyright (C) 2004 FLORIAN KIMMERL +# This file is distributed under the same license as the PACKAGE package. +# Florian Kimmerl , 2004. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 0.3-1.4\n" +"POT-Creation-Date: 2004-01-28 16:32+0100\n" +"PO-Revision-Date: 2004-01-28 16:32+0100\n" +"Last-Translator: FLORIAN KIMMERL \n" +"Language-Team: GERMAN \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Weiterleitungen" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Hier knnen Sie E-Mail-Weiterleitungen erstellen und bearbeiten." + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Hier knnen Sie den Abwesenheits-Assistenten konfigurieren." + +msgid "Change your mailbox password." +msgstr "Hier knnen Sie Passwort ndern. Nach der nderung mssen Sie sich neu anmelden!" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "E-Mail" + +msgid "Change Password" +msgstr "Passwort ndern" + +msgid "Change your login password" +msgstr "ndern Sie Ihr Zugangspasswort fr POP3/IMAP" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "E-Mail Weiterleitungen bearbeiten" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Bearbeiten Sie hier Ihre E-Mail Weiterleitungen*.
Ein Eintrag pro Zeile." + +msgid "The email address that you have entered is not valid:" +msgstr "Die angegebene E-Mail-Adresse ist ungltig:" + +msgid "Unable to locate alias!" +msgstr "Ihre Weiterleitungen knnen nicht angefordert werden! Versuchen Sie es spter erneut." + +msgid "Unable to modify the alias!" +msgstr "Ihre Weiterleitungen knnen nicht modifiziert werden! Versuchen Sie es spter erneut." + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "*Zustzliche Weiterleitungen erhalten alle Nachrichten als Kopie (BCC)!" + +msgid "Alias successfully changend!" +msgstr "Weiterleitungen wurden erfolgreich gendert!" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Abwesenheits-Assistent" + +msgid "Going Away" +msgstr "Ich bin weg" + +msgid "Coming Back" +msgstr "Ich bin zurck" + +msgid "Options" +msgstr "Optionen" + +msgid "Out of Office" +msgstr "" + +msgid "Subject" +msgstr "Betreff" + +msgid "Body" +msgstr "Nachrichtentext" + +msgid "Your auto response has been removed!" +msgstr "Iher Abwesenheits-Nachricht wurde deaktiviert!" + +msgid "Your auto response has been set!" +msgstr "Ihre Abwesenheits-Nachricht wurde aktiviert!" + +msgid "You already have an auto response configured!" +msgstr "Ihre Abwesenheits-Nachricht ist bereits aktiviert!" + +msgid "back" +msgstr "zurck" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "Die beiden neuen Passwrter stimmen nicht berein!
Oder die Felder wurden nicht ausgefllt!" + +#: postfixadmin_forward.php:70 postfixadmin_forward.php:152 +msgid "To" +msgstr "An" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Ihr Passwort kann nicht gendert werden!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Ihr aktuelles Passwort wurde nicht angegeben oder ist falsch!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Ihr Passwort wurde ergolgreich gendert!" + +msgid "Password current" +msgstr "Passwort aktuell" + +msgid "Password new" +msgstr "Passwort neu" + +msgid "Password new again" +msgstr "Passwort neu nochmal" + +msgid "Please sign out and log back again with your new password!" +msgstr "Bitte melden Sie sich hier ab und loggen sich mit Ihrem neuen Passwort erneut ein! " \ No newline at end of file diff --git a/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..600e2bd5 Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..8b6deeee --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/hu_HU/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,135 @@ +# postfixadmin - Plugin for Squirrelmail. +# Copyright (C) 2004 FLORIAN KIMMERL +# This file is distributed under the same license as the PACKAGE package. +# Florian Kimmerl , 2004. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 0.3-1.4\n" +"POT-Creation-Date: 2004-01-28 16:32+0100\n" +"PO-Revision-Date: 2004-01-28 16:32+0100\n" +"Last-Translator: FLORIAN KIMMERL \n" +"Language-Team: HUNGARIAN \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Levltovbbts" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Itt tudod ltrehozni s szerkeszteni az E-mail tovbbtsokat." + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Itt lehet belltani az automatikus vlasz levl szvegt, ha az ember tvol van." + +msgid "Change your mailbox password." +msgstr "Itt tudod megvltoztatni a belpshez szksges jelszt." + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "E-mail" + +msgid "Change Password" +msgstr "Jelsz megvltoztatsa" + +msgid "Change your login password" +msgstr "Bejelentkezsi jelsz megvltoztatsa" + +#: postfixadmin_forward.php +msgid "Edit Forward" +msgstr "Levltovbbts szerkesztse" + +msgid "Edit Alias" +msgstr "Levltovbbts szerkesztse" + +msgid "The email address that you have entered is not valid:" +msgstr "Az E-mail cm amit bertl hibs:" + +msgid "Unable to locate alias!" +msgstr "Hiba az e-mail cmmel." + +msgid "Unable to modify the alias!" +msgstr "A mdosts sikertelen!" + +msgid "Alias successfully changed!" +msgstr "A mdosts sikeres!" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Automatikus vlasz" + +msgid "Going Away" +msgstr "Hzonkvl vagyok" + +msgid "Coming Back" +msgstr "Visszajttem" + +msgid "Options" +msgstr "Opcik" + +msgid "Out of Office" +msgstr "Hzonkvl" + +msgid "Subject" +msgstr "Trgy" + +msgid "Body" +msgstr "Levltrzs" + +msgid "Your auto response has been removed!" +msgstr "Az automatikus vlasz trlve lett!" + +msgid "Your auto response has been set!" +msgstr "Az automatikus vlasz be lett lltva!" + +msgid "You already have an auto response configured!" +msgstr "Mr ltezik egy automatikus vlasz!" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "A jelszavak nem egyeznek!
Vagy resen hagytad a mezket!" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "A jelsz megvltoztatsa sikertelen!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Az aktulis jelsz nem megfelel!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "A jelsz vltoztatsa sikeres volt!" + +msgid "Password current" +msgstr "Aktulis jelsz" + +msgid "Password new" +msgstr "j jelsz" + +msgid "Password new again" +msgstr "j jelsz mgegyszer" + +msgid "Please sign out and log back again with your new password!" +msgstr "Krjk, jelentkezzen ki, majd jra be az j jelszavval!" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Hzonkvl leszek s kztt. Srgs esetben rtestend: ." + +msgid "One copy always goes to" +msgstr "Egy msolat mindig ide" + +msgid "Another copy also goes to" +msgstr "Tovbbi msolatok ide" + +msgid "Enter an email address (or addresses) where you would like an additional copy of messages addressed to you sent.
Enter only one address per line." +msgstr "Sorolja fel azokat az e-mail cmeket, amelyekre az nhz rkez leveleket tovbbtani szeretn.
Soronknt csak egy cmet adjon meg!" + +msgid "A copy of each message will go to both your mailbox and the forwarded address(es)." +msgstr "Minden nnek cmzett levl meg fog rkezni a sajt postafikjba s a tovbbtott e-mail cmekre is." + +msgid "To remove a Forward, simply delete its line from the text box." +msgstr "Ahhoz, hogy trljn egy tovbbtst, ki kell trlnie az adott sort a felsorolsbl." \ No newline at end of file diff --git a/ADDITIONS/squirrelmail-plugin/locale/it_IT/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/it_IT/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..5cab9ebe --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/it_IT/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,129 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: 2010-02-19 11:30+0100\n" +"Last-Translator: valentina \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Inoltro E-MAIL" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Qui puoi creare e modificare l'inoltro dell' E-MAIL." + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Imposta un messaggio OUT OF OFFICE / ASSENTE o un risponditore automatico per la tua mail." + +msgid "Change your mailbox password." +msgstr "Modifica la tua password di accesso alla mail" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "Alias" + +msgid "Change Password" +msgstr "Modifica password" + +msgid "Change your login password" +msgstr "Modifica la tua password di accesso" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "Modifica Alias" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Modifica un Alias per il tuo dominio.
Un record per linea." + +msgid "The email address that you have entered is not valid:" +msgstr "L'indirizzo email che hai inserito non è corretto:" + +msgid "Unable to locate alias!" +msgstr "Impossibile trovare l'alias!" + +msgid "Unable to modify the alias!" +msgstr "Impossibile modificare l'alias!" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "* L'inoltro ad un alias aggiuntivo comporta l'invio del messaggio in BCC!" + +msgid "Alias successfully changend!" +msgstr "Alias modificato correttamente!" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Risponditore automatico" + +msgid "Going Away" +msgstr "Going Away" + +msgid "Coming Back" +msgstr "Coming Back" + +msgid "Options" +msgstr "Opzioni" + +msgid "Out of Office" +msgstr "Out of Office/Assente" + +msgid "Subject" +msgstr "Oggetto" + +msgid "Body" +msgstr "Messaggio" + +msgid "Your auto response has been removed!" +msgstr "Il risponditore automatico è stato disattivato!" + +msgid "Your auto response has been set!" +msgstr "Il risponditore automatico è stato configurato!" + +msgid "You already have an auto response configured!" +msgstr "Hai gia configurato il risponditore automatico !" + +#: postfixadmin_changepass.php:81 +#: postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "Le password inserite non coincidono!
O i campi sono vuoti!" + +#: postfixadmin_forward.php:70 +#: postfixadmin_forward.php:152 +msgid "To" +msgstr "A" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Impossibile modificare la password" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Non hai indicato la password attuale!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "La tua password è stata modificata!" + +msgid "Password current" +msgstr "Password attuale" + +msgid "Password new" +msgstr "Nuova password" + +msgid "Password new again" +msgstr "Insierisci nuovamente la nuova password" + +msgid "Please sign out and log back again with your new password!" +msgstr "Per favore fai log out e riaccedi alla tua mail con la nuova password!" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Mi dispiace sarò assente dal al . Per richieste urgenti vi prego di contattare . I will be away from until . For urgent matters you can contact ." + diff --git a/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..de501f2e Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..083a1d92 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/nl_NL/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,131 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: postfixadmin-squirrelmail 2.1.0\n" +"POT-Creation-Date: 2007-11-16 17:35+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Johan \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Doorsturen" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Hier kunt u uw doorstuur adres bewerken" + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Configureer hier uw automatisch beantwoorden" + +msgid "Change your mailbox password." +msgstr "Verander uw wachtwoord" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "Alias" + +msgid "Change Password" +msgstr "Verander wachtwoord" + +msgid "Change your login password" +msgstr "Verander uw login wachtwoord" + +#: postfixadmin_forward.php +msgid "Edit Forwards" +msgstr "Bewerk aliassen" + +msgid "Edit an alias* for your email address.
One entry per line." +msgstr "Bewerk uw alias(sen) voor uw emailadres.
1 alias per regel." + +msgid "The email address that you have entered is not valid:" +msgstr "Het ingevoerde adres is geen geldig adres" + +msgid "Unable to locate alias!" +msgstr "Niet in staat opgeven alias te vinden!" + +msgid "Unable to modify the alias!" +msgstr "Niet in staat de alias aan te passen" + +msgid "*Additional forward-aliases always receive messages BBC!" +msgstr "Aliassen ontvangen altijd per BCC! " + +msgid "To remove an alias, simply delete its line from the text box." +msgstr "Verwijder de regel om de alias(sen) te verwijderen." + +msgid "Alias successfully changed!" +msgstr "Alias succesvol aangepast" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Automatisch beantwoorden" + +msgid "Going Away" +msgstr "Ik ben weg, schakel Out of Office IN" + +msgid "Coming Back" +msgstr "Ik ben terug, schakel Out of Office UIT" + +msgid "Options" +msgstr "Opties" + +msgid "Out of Office" +msgstr "Out of office" + +msgid "Subject" +msgstr "Onderwerp" + +msgid "Body" +msgstr "Tekst" + +msgid "Your auto response has been removed!" +msgstr "Uw automatisch beantwoorden is verwijderd!" + +msgid "Your auto response has been set!" +msgstr "Uw automatisch beantwoorden is geactiveerd!" + +msgid "You already have an auto response configured!" +msgstr "Automatisch beantwoorden is al geconfigureerd!" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "De wachtwoorden komen niet overeen!
Of er is geen wachtwoord opgegeven!" + +#: postfixadmin_forward.php:70 postfixadmin_forward.php:152 +msgid "To" +msgstr "Aan" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Niet in staat uw wachtwoord te wijzigen!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "U moet uw huidige wachtwoord opgeven!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Uw wachtwoord is gewijzigd!" + +msgid "Password current" +msgstr "Huidig wachtwoord" + +msgid "Password new" +msgstr "Nieuw wachtwoord" + +msgid "Password new again" +msgstr "Nieuw wachtwoord nogmaals" + +msgid "Please sign out and log back again with your new password!" +msgstr "Log uit en opnieuw in met het nieuwe wachtwoord" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Ik ben niet aanwezig van tot . Voor dringende zaken kunt u contact opnemen met ." + diff --git a/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..f2cb1225 Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..8b6cb108 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/pl_PL/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,132 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: 2007-07-20 20:46+0100\n" +"Last-Translator: Krzysztof Laska \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Przekazywanie" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Tutaj moesz ustawi i edytowa opcje przekazywania wiadomoci" + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Ustaw wiadomo wysyan nadawcom podczas Twojej nieobecnoci (Vacation)" + +msgid "Change your mailbox password." +msgstr "Zmie haso do swojego konta pocztowego" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "Konto" + +msgid "Change Password" +msgstr "Zmie haso" + +msgid "Change your login password" +msgstr "Zmie haso do swojego konta pocztowego" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "Edytuj adresy do przekazywania" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Edytuj forward* dla swojego konta.
Kady adres w nowym wierszu." + +msgid "The email address that you have entered is not valid:" +msgstr "Adres e-mail jaki podae jest niepoprawny:" + +msgid "Unable to locate alias!" +msgstr "Nie mona zlokalizowa aliasu!" + +msgid "Unable to modify the alias!" +msgstr "Nie mona zmodyfikowa aliasu!" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "*Wszystkie dodatkowe adresy zawsze odbieraj wiadomoci przesyane jako BCC! Caa poczta jest przekazywana i nie jest przechowywana na koncie podstawowym!" + +msgid "Alias successfully changend!" +msgstr "Zmiana zachowana!" + +msgid "To remove an alias, simply delete it's line from the text box." +msgstr "eby wyczy forward na dane konto po prostu usu lini z adresem na ktry nie chcesz ju przekazywa poczty." + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Autoodpowied" + +msgid "Going Away" +msgstr "Wcz autoodpowied" + +msgid "Coming Back" +msgstr "Wycz autoodpowied" + +msgid "Options" +msgstr "Opcje" + +msgid "Out of Office" +msgstr "Autoodpowied" + +msgid "Subject" +msgstr "Temat" + +msgid "Body" +msgstr "Tre" + +msgid "Your auto response has been removed!" +msgstr "Twoja autoodpowied zostaa wyczona!" + +msgid "Your auto response has been set!" +msgstr "Twoja autoodpowied zostaa wczona!" + +msgid "You already have an auto response configured!" +msgstr "Masz ju skonfigurowan autoodpowied!" + +#: postfixadmin_changepass.php:81 +#: postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "Hasa ktre podae nie pasuj lub s puste!" + +#: postfixadmin_forward.php:70 +#: postfixadmin_forward.php:152 +msgid "To" +msgstr "Do" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Nie mona zmieni hasa!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Nie podae aktualnego hasa!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Twoje haso zostao zmienione!" + +msgid "Password current" +msgstr "Biece haso" + +msgid "Password new" +msgstr "Nowe haso" + +msgid "Password new again" +msgstr "Powtrz nowe haso" + +msgid "Please sign out and log back again with your new password!" +msgstr "Wyloguj si i zaloguj z nowym hasem!" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Nie bd odbiera poczty pomidzy a . W sprawach pilnych prosz kontaktowa si z " + diff --git a/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.mo b/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.mo new file mode 100644 index 00000000..01782644 Binary files /dev/null and b/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.mo differ diff --git a/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.po new file mode 100644 index 00000000..abb7a86b --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/locale/pt_BR/LC_MESSAGES/postfixadmin.po @@ -0,0 +1,127 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: 2008-10-16 20:30+3\n" +"Last-Translator: Julio Covolato \n" +"Language-Team: BRAZILIAN PORTUGUESE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "Encaminhar" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "Aqui Você pode criar e editar alias." + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "Configurar mensagem de férias para seu email." + +msgid "Change your mailbox password." +msgstr "Troque a senha de seu email." + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "" + +msgid "Change Password" +msgstr "Mudar Senha" + +msgid "Change your login password" +msgstr "Mude sua senha de login" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "Editar Alias" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "Editar um alias* para seu domínio.
Uma entrada por linha." + +msgid "The email address that you have entered is not valid:" +msgstr "Este endereço de email informado não é válido:" + +msgid "Unable to locate alias!" +msgstr "Alias não encontrado!" + +msgid "Unable to modify the alias!" +msgstr "Impossível modificar o alias!" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "*Alias adicionais sempre recebem mensagens em BCC" + +msgid "Alias successfully changend!" +msgstr "Alias alterado com sucesso!" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "Auto resposta" + +msgid "Going Away" +msgstr "Ativar" + +msgid "Coming Back" +msgstr "Desativar" + +msgid "Options" +msgstr "Opções" + +msgid "Out of Office" +msgstr "Fora do escritório" + +msgid "Subject" +msgstr "Assunto" + +msgid "Body" +msgstr "Mensagem" + +msgid "Your auto response has been removed!" +msgstr "Sua auto resporta foi removida!" + +msgid "Your auto response has been set!" +msgstr "Sua auto resposta foi ativada!" + +msgid "You already have an auto response configured!" +msgstr "Você ainda tem uma auto resposta ativa" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "A senha digitada não confere!
Ou está vazia" + +#: postfixadmin_forward.php:70 postfixadmin_forward.php:152 +msgid "To" +msgstr "Para" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "Impossível alterar a sua senha!" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "Você não forneceu a sua senha atual!" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "Sua senha foi alterada com sucesso!" + +msgid "Password current" +msgstr "senha atual" + +msgid "Password new" +msgstr "Nova senha" + +msgid "Password new again" +msgstr "Confirme a nova senha" + +msgid "Please sign out and log back again with your new password!" +msgstr "Por favor, saia e entre novamente no webmail com a nova senha" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "Estarei fora do escritório entre os dias e do mês de .
Qualquer mensagem urgente, favor enviar para o email ." \ No newline at end of file diff --git a/ADDITIONS/squirrelmail-plugin/po/postfixadmin.po b/ADDITIONS/squirrelmail-plugin/po/postfixadmin.po new file mode 100644 index 00000000..f352e2a7 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/po/postfixadmin.po @@ -0,0 +1,127 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2004-01-29 17:35+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: setup.php +msgid "Forwarding" +msgstr "" + +msgid "Here you can create and edit E-Mail forwards." +msgstr "" + +msgid "Set an OUT OF OFFICE message or auto responder for your mail." +msgstr "" + +msgid "Change your mailbox password." +msgstr "" + +#: postfixadmin_changepass.php +msgid "Alias" +msgstr "" + +msgid "Change Password" +msgstr "" + +msgid "Change your login password" +msgstr "" + +#: postfixadmin_forward.php +msgid "Edit Alias" +msgstr "" + +msgid "Edit an alias* for your domain.
One entry per line." +msgstr "" + +msgid "The email address that you have entered is not valid:" +msgstr "" + +msgid "Unable to locate alias!" +msgstr "" + +msgid "Unable to modify the alias!" +msgstr "" + +msgid "*Additional forward-aliase always recieve messages BBC!" +msgstr "" + +msgid "Alias successfully changend!" +msgstr "" + +#: postfixadmin_vacation.php +msgid "Auto Response" +msgstr "" + +msgid "Going Away" +msgstr "" + +msgid "Coming Back" +msgstr "" + +msgid "Options" +msgstr "" + +msgid "Out of Office" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "Body" +msgstr "" + +msgid "Your auto response has been removed!" +msgstr "" + +msgid "Your auto response has been set!" +msgstr "" + +msgid "You already have an auto response configured!" +msgstr "" + +#: postfixadmin_changepass.php:81 postfixadmin_changepass.php:87 +msgid "The passwords that you supplied don't match!
Or are empty!" +msgstr "" + +#: postfixadmin_forward.php:70 postfixadmin_forward.php:152 +msgid "To" +msgstr "" + +#: postfixadmin_changepass.php:101 +msgid "Unable to change your password!" +msgstr "" + +#: postfixadmin_changepass.php:75 +msgid "You didn't supply your current password!" +msgstr "" + +#: postfixadmin_changepass.php:96 +msgid "Your password has been changed!" +msgstr "" + +msgid "Password current" +msgstr "" + +msgid "Password new" +msgstr "" + +msgid "Password new again" +msgstr "" + +msgid "Please sign out and log back again with your new password!" +msgstr "" + +msgid "I will be away from until . For urgent matters you can contact ." +msgstr "" \ No newline at end of file diff --git a/ADDITIONS/squirrelmail-plugin/postfixadmin_changepass.php b/ADDITIONS/squirrelmail-plugin/postfixadmin_changepass.php new file mode 100644 index 00000000..4d262f04 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/postfixadmin_changepass.php @@ -0,0 +1,128 @@ +getProxy('user'); + +global $username; + +do_header(); + +$USERID_USERNAME = $username; +$tmp = preg_split ('/@/', $USERID_USERNAME); +$USERID_DOMAIN = $tmp[1]; + + +$stMessage = ''; +$tMessage = ''; +$pPassword_admin_text = ''; +$pPassword_password_current_text = ''; +$pPassword_password_text = ''; +$error = 0; + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + //$pPassword_password_text = _("pPassword_password_text"); + $fPassword_current = $_POST['fPassword_current']; + $fPassword = $_POST['fPassword']; + $fPassword2 = $_POST['fPassword2']; + $username = $USERID_USERNAME; + + if(!$user->login($_SESSION['username'], $_POST['fPassword_current'])) { + $error = 1; + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $pPassword_password_current_text = _("You didn't supply your current password!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + $min_length = 0; + if(isset($CONF['min_password_length'])) { + $min_length = $CONF['min_password_length']; + } + if (empty ($fPassword) or ($fPassword != $fPassword2) or ($min_length > 0 && strlen($fPassword) < $min_length)) { + $error = 1; + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + if(empty($fPassword)) { + $pPassword_password_text .= _("The passwords that you supplied are empty!"); + } + if($fPassword != $fPassword2) { + $pPassword_password_text .= _("The passwords that you supplied don't match!"); + } + if($min_length > 0 && strlen($fPassword) < $min_length) { + $pPassword_password_text .= _("The password you supplied is too short!"); + } + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + + if ($error != 1) { + $success = $user->changePassword($fPassword_current, $fPassword); + + if ($success) { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Your password has been changed!"); + $stMessage = _("Please sign out and log back again with your new password!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + else { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Unable to change your password!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + } +} +bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); +textdomain('postfixadmin'); +echo " + +
". _("Options") ." - ". _("Change Password")." + + +

+ + + + + + +
" ._("Change your login password") ."\n +
+ $tMessage
+ $stMessage + ".$pPassword_admin_text."\n + ".$pPassword_password_current_text."\n + ".$pPassword_password_text."\n +
+ + + + + + + + + + + + + + + + + + + + + +
". _("Alias") . ":\n{$_SESSION['username']}
". _("Password current"). ":\n
". _("Password new"). ":\n
". _("Password new again"). ":\n
  
+
 

+
"; +bindtextdomain('squirrelmail', SM_PATH . 'locale'); +textdomain('squirrelmail'); +?> diff --git a/ADDITIONS/squirrelmail-plugin/postfixadmin_forward.php b/ADDITIONS/squirrelmail-plugin/postfixadmin_forward.php new file mode 100644 index 00000000..bc9d2145 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/postfixadmin_forward.php @@ -0,0 +1,161 @@ +getProxy('alias'); +do_header(); +// Normal page request (GET) +if ($_SERVER['REQUEST_METHOD'] == "GET") +{ + $row = $alias->get(); + if($row === false) { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Unable to locate alias!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + exit(0); + } +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + $pEdit_alias_goto = _("To"); + + $fGoto = $_POST['fGoto']; + + // reform string into a list... + $goto = preg_replace ('/\r\n/', ',', $fGoto); + $goto = preg_replace ('/[\s]+/i', '', $goto); + $goto = preg_replace ('/\,*$/', '', $goto); + $array = preg_split ('/,/', $goto); + + $error = 0; + // check that we have valid addresses in the list + foreach($array as $email_address) + { + if (empty($email_address)) + { + continue; + } + if (!check_email($email_address)) + { + $error = 1; + $tGoto = $goto; + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("The email address that you have entered is not valid:") . " $email_address"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + } + if ($error != 1) { + $flag = 'forward_and_store'; // goto = $USERID_USERNAME; + + $success = $alias->update($array, $flag); + if(!$success) { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Unable to modify the alias!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + else { + + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + echo "

". _("Alias successfully changed!"). "\n

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + echo "

". _("Click here to go back") ."

"; + exit; + } + } +} +bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); +textdomain('postfixadmin'); +echo " + + +
+". _("Options") ." - ". _("Edit Alias"). " + + + + +
+ + + + + + + + + +
". _("Edit an alias* for your email address.
One entry per line."). "
". _("*Additional forward-aliases always receive messages BCC!"). "\n +
" . _("To remove an alias, simply delete its line from the text box.") . "
+ + + + + + + + +
". _("Edit Forwards"). " +
$tMessage + + + + + + + + + + + + + + + + + + + + + +
". _("Alias"). ":\n +" . $_SESSION['username'] . "
  
". _("To"). ":\n + +
  
  + +
+
+ +
+
+"; +bindtextdomain('squirrelmail', SM_PATH . 'locale'); +textdomain('squirrelmail'); +?> diff --git a/ADDITIONS/squirrelmail-plugin/postfixadmin_vacation.php b/ADDITIONS/squirrelmail-plugin/postfixadmin_vacation.php new file mode 100644 index 00000000..69aa5cd6 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/postfixadmin_vacation.php @@ -0,0 +1,157 @@ +getProxy('vacation'); + +$VACCONFTXT = _("I will be away from until . For urgent matters you can contact ."); +bindtextdomain('squirrelmail', SM_PATH . 'locale'); +textdomain('squirrelmail'); +$VACCONF = <<getDetails(); + if($vacation->checkVacation()) { + + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("You already have an auto response configured!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + echo " +
". _("Options") ." - ". _("Auto Response") ." + +

+ + + + +
". _("Auto Response") ."\n +
+ + + + + + + +
$tMessage

+ +
+
+
 

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + else + { + $tSubject = "Out of Office"; + $tSubject = $details['subject']; + $VACCONF = $details['body']; + + $tMessage = ''; + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + echo " + +
". _("Options") ." - ". _("Auto Response") ." + +

+ + + + +
" . _("Auto Response") ."\n +
$tMessage + + + + + + + + + + + + +
". _("Subject") .":\n   
". _("Body") .":\n   
    
 

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } +} + +if ($_SERVER['REQUEST_METHOD'] == "POST") +{ + $fBack = null; + $fAway = null; + foreach(array('fBack', 'fAway', 'fSubject', 'fBody') as $key) { + $$key = null; + if(isset($_POST[$key])) { + $$key = $_POST[$key]; + } + } + + if (!empty($fBack)) + { + $success = $vacation->remove(); + + if(!$success) + { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Unable to update your auto response settings!"); + echo "

This may signify an error; please contact support (1)

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + else + { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + echo "

". _("Your auto response has been removed!") ."

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + + } + } + + if (!empty ($fAway)) + { + // add record into vacation + $success = $vacation->setAway($fSubject, $fBody); + + if(!$success) { + $error = 1; + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + $tMessage = _("Unable to update your auto response settings!"); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + else + { + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + echo "

". _("Your auto response has been set!") ."

"; + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + + } + } +} + +?> diff --git a/ADDITIONS/squirrelmail-plugin/setup.php b/ADDITIONS/squirrelmail-plugin/setup.php new file mode 100644 index 00000000..78c6d670 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/setup.php @@ -0,0 +1,62 @@ + _("Forwarding"), + 'url' => '../plugins/postfixadmin/postfixadmin_forward.php', + 'desc' => _("Here you can create and edit E-Mail forwards."), + 'js' => FALSE + ); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + if($AllowVacation) { + $optpage_blocks[] = array( + 'name' => _("Auto Response"), + 'url' => '../plugins/postfixadmin/postfixadmin_vacation.php', + 'desc' => _("Set an OUT OF OFFICE message or auto responder for your mail."), + 'js' => false + ); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } + bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale'); + textdomain('postfixadmin'); + if($AllowChangePass) { + $optpage_blocks[] = array( + 'name' => _("Change Password"), + 'url' => '../plugins/postfixadmin/postfixadmin_changepass.php', + 'desc' => _("Change your mailbox password."), + 'js' => false + ); + bindtextdomain('squirrelmail', SM_PATH . 'locale'); + textdomain('squirrelmail'); + } +} +?> diff --git a/ADDITIONS/squirrelmail-plugin/version b/ADDITIONS/squirrelmail-plugin/version new file mode 100644 index 00000000..2da11433 --- /dev/null +++ b/ADDITIONS/squirrelmail-plugin/version @@ -0,0 +1,2 @@ +postfixadmin +2.3.0 diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 9a94c298..1ed53c6c 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -10,12 +10,52 @@ # Last update: # $Id$ -Version ***svn 2.3 branch*** - 2009/12/26 - SVN r*** ------------------------------------ - - - NOTE: this release is based on the 2.3 branch - - NOTE: this is a bugfix-only release for Postfix Admin 2.3 +Version 2.3.3 - 2010/**/** - SVN r*** (postfixadmin-2.3 branch) +--------------------------------------------------------------- + + - list-virtual: fix displaying of 'modified' column for aliases when using + postgres + - replaced deprecated split() with preg_split() or explode() + - functions.inc.php: better error messages when database functions are missing + - create domain: fixed typo in variable name that broke the default value for + default aliases + - create domain: backup MX checkbox is now XHTML compliant + - vacation.pl logged literal $variable instead of the variable content at two + places + - POSTFIX_CONF.txt: fixed filename for quota map + - config.inc.php: removed double $CONF['database_prefix'] + - config.inc.php: fixed comments about domain_post* script parameters + +Version 2.3.2 - 2010/08/24 - SVN r860 (postfixadmin-2.3 branch) +--------------------------------------------------------------- + + - SUMMARY: PostfixAdmin 2.3.2 is a bugfix-only release for Postfix Admin 2.3.1 + - SECURITY: attackers could find out if a admin exists (login pre-filled the + username after "only" a wrong password was entered) + - SECURITY: fix sql injection in list-domain (only exploitable by superadmins) + - alias targets in users/edit-alias are now validated + - invalid alias targets in users/edit-alias are shown to the user again + instead of dropping them + - fix dovecot:* password encryption (was broken in 2.3.1) + - fix displaying used quota for dovecot <= 1.1 (was broken in 2.3.1) + - when deleting a domain that is an alias domain (on the "from" side), the + alias domain is deleted + +Version 2.3.1 - 2010/07/09 - SVN r847 (postfixadmin-2.3 branch) +--------------------------------------------------------------- + + - SUMMARY: PostfixAdmin 2.3.1 is a bugfix-only release for Postfix Admin 2.3. + The only visible change is displaying the alias target for mailboxes which + was a longstanding issue/"missing feature". + The ADDITIONS directory contains some new scripts. + - SECURITY: users could bypass checking the old password when changing the + password by entering a too short new password. Fortunately only + "exploitable" by authentificated users. + - merge in changes to /debain (thanks normes) from trunk + - display alias targets for mailboxes (if $CONF['special_alias_control'] = YES) + - add hook for custom maildir path generation - add import_users_from_csv.py script (by Simone Piccardi) + - add mailbox_post* scripts for cyrus - handle dovecot passwords without any tempfile (prevents safe_mode issues) - fix MySQL 6.0 compatibility - fix quota display (for dovecot >= 1.2) @@ -28,6 +68,23 @@ Version ***svn 2.3 branch*** - 2009/12/26 - SVN r*** superadmins) - add in_array() check to avoid that superadmins can enter invalid domains - fix delete link for alias domains (when on target domain) + - delete values from quota and quota2 table when deleting a mailbox + - fix hardcoded table names in list-domain.php + - fixed edit-alias.php not to drop alias to the mailbox if + special_alias_control = NO + - fix alias handling for mailboxes (special_alias_control vs. + alias_control_admin confusion) + - fix typo in upgrade.php that broke index creation and deletion when using + non-default table names + - fix creating 'ALL' domain (dummy for superadmins) when using non-default + table names + - fix: db_query did not return number of SELECTed rows if query starts with + with whitespace + - check for $CONF['encrypt'] = 'dovecot:md5-crypt' (postfixadmin login not + working because dovecotpw uses a new salt each time), recommend + internal md5crypt instead + - replaced terribly outdated, broken squirrelmail plugin with a fresh version. + Note: The new plugin version requires the Zend framework. Version 2.3 - 2009/10/24 - SVN r739 ----------------------------------- @@ -104,8 +161,8 @@ Version 2.3 Beta - 2009/01/15 - SVN r527 - added support for domain aliases (from lenix) (can be disabled with $CONF['alias_domain']) Important: If you update from a previous version, you'll have to adapt your postfix - configuration (see DOCUMENTS/POSTFIX_CONF.txt) - or just disable alias domain support, - your postfix configuration will continue to work + configuration (see DOCUMENTS/POSTFIX_CONF.txt) - or just disable alias domain support, + your postfix configuration will continue to work - updated postfix example configuration for domain aliases and to use the new mysql map format - vacation.pl: - add option for re-notification after definable timeout (patch from Luxten) diff --git a/DOCUMENTS/DOVECOT.txt b/DOCUMENTS/DOVECOT.txt index 73caa311..de530c81 100644 --- a/DOCUMENTS/DOVECOT.txt +++ b/DOCUMENTS/DOVECOT.txt @@ -23,6 +23,8 @@ be viewed real-time in Postfixadmin. default_mail_env = maildir:/var/mail/vmail/%u/ +(dovecot 1.0.7 calls this mail_location ... ie.. mail_location = maildir:/...../%u ) + auth default { mechanisms plain userdb sql { @@ -65,6 +67,11 @@ password_query = SELECT username AS user,password FROM mailbox WHERE username = user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active='1' +for dovecot 1.2: (for PostgreSQL, replace 'CONCAT(a, b)' with 'a || b') +user_query = SELECT CONCAT('/home/vmail/', maildir) AS home, 1001 AS uid, 1001 AS gid, + CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active='1' + + NB! The GID and UID are for postfix user and group ID, NOT MySQL user and group ID. diff --git a/DOCUMENTS/POSTFIX_CONF.txt b/DOCUMENTS/POSTFIX_CONF.txt index a03102f8..f6bab366 100644 --- a/DOCUMENTS/POSTFIX_CONF.txt +++ b/DOCUMENTS/POSTFIX_CONF.txt @@ -102,7 +102,7 @@ query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain # For quota support -mysql-virtual-mailbox-limit-maps.cf: +mysql_virtual_mailbox_limit_maps.cf: user = postfix password = password hosts = localhost diff --git a/INSTALL.TXT b/INSTALL.TXT index 2f65e223..a0ce2a4d 100644 --- a/INSTALL.TXT +++ b/INSTALL.TXT @@ -117,7 +117,17 @@ create the admin user using the form displayed. This is all that is needed. Fire up your browser and go to the site that you specified to host Postfix Admin. -6. More information +6. Integration with Postfix, Dovecot etc. +----------------------------------------- + +Now that PostfixAdmin is working, you need to do some configuration in Postfix, +Dovecot etc. so that they use the domains, mailboxes and aliases you setup in +PostfixAdmin. + +The files in the DOCUMENTS/ directory explain which settings you need to +do/change. + +7. More information ------------------- As of March 2007, PostfixAdmin moved to SourceForge. For the forum posts and source updates, see: diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index 9f0f34f0..64b69141 100644 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -324,12 +324,12 @@ sub find_real_address { # Recipient has vacation if ($rv == 1) { $realemail = $email; - $logger->debug("Found '\$email'\ has vacation active"); + $logger->debug("Found '$email' has vacation active"); } else { my $vemail = $email; $vemail =~ s/\@/#/g; $vemail = $vemail . "\@" . $vacation_domain; - $logger->debug("Looking for alias records that \'$email\' resolves to with vacation turned on"); + $logger->debug("Looking for alias records that '$email' resolves to with vacation turned on"); $query = qq{SELECT goto FROM alias WHERE address=? AND (goto LIKE ? OR goto LIKE ? OR goto LIKE ? OR goto = ?)}; $stm = $dbh->prepare($query) or panic_prepare($query); $stm->execute($email,"$vemail,%","%,$vemail","%,$vemail,%", "$vemail") or panic_execute($query,"address='$email'"); diff --git a/config.inc.php b/config.inc.php index 49db471f..1225fba2 100644 --- a/config.inc.php +++ b/config.inc.php @@ -51,7 +51,6 @@ $CONF['database_host'] = 'localhost'; $CONF['database_user'] = 'postfix'; $CONF['database_password'] = 'postfixadmin'; $CONF['database_name'] = 'postfix'; -$CONF['database_prefix'] = ''; // If you need to specify a different port for a MYSQL database connection, use e.g. // $CONF['database_host'] = '172.30.33.66:3308'; // If you need to specify a different port for POSTGRESQL database connection @@ -149,6 +148,36 @@ $CONF['domain_path'] = 'NO'; // NO: /usr/local/virtual/domain.tld/username // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES. $CONF['domain_in_mailbox'] = 'YES'; +// If you want to define your own function to generate a maildir path set this to the name of the function. +// Notes: +// - this configuration directive will override both domain_path and domain_in_mailbox +// - the maildir_name_hook() function example is present below, commented out +// - if the function does not exist the program will default to the above domain_path and domain_in_mailbox settings +$CONF['maildir_name_hook'] = 'NO'; + +/* + maildir_name_hook example function + + Called by create-mailbox.php if $CONF['maildir_name_hook'] == '' + - allows for customized maildir paths determined by a custom function + - the example below will prepend a single-character directory to the + beginning of the maildir, splitting domains more or less evenly over + 36 directories for improved filesystem performance with large numbers + of domains. + + Returns: maildir path + ie. I/example.com/user/ +*/ +/* +function maildir_name_hook($domain, $user) { + $chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + $dir_index = hexdec(substr(md5($domain), 28)) % strlen($chars); + $dir = substr($chars, $dir_index, 1); + return sprintf("%s/%s/%s/", $dir, $domain, $user); +} +*/ + // Default Domain Values // Specify your default values below. Quota in MB. @@ -338,7 +367,7 @@ $CONF['recipient_delimiter'] = ""; // Note that this may fail if PHP is run in "safe mode", or if // operating system features (such as SELinux) or limitations // prevent the web-server from executing external scripts. -// Parameters: (1) username +// Parameters: (1) domain //$CONF['domain_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postcreation.sh'; // Optional: @@ -346,7 +375,7 @@ $CONF['recipient_delimiter'] = ""; // Note that this may fail if PHP is run in "safe mode", or if // operating system features (such as SELinux) or limitations // prevent the web-server from executing external scripts. -// Parameters: (1) username +// Parameters: (1) domain // $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh'; // Optional: diff --git a/create-domain.php b/create-domain.php index b144e423..9633de44 100644 --- a/create-domain.php +++ b/create-domain.php @@ -78,7 +78,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") $tAliases = $fAliases; $tMaxquota = $fMaxquota; $tMailboxes = $fMailboxes; - $tDefaultAliases = $fDefaultaliases; + $tDefaultaliases = $fDefaultaliases; $tBackupmx = $fBackupmx; } diff --git a/create-mailbox.php b/create-mailbox.php index e60c646d..6292d52b 100644 --- a/create-mailbox.php +++ b/create-mailbox.php @@ -159,7 +159,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $password = pacrypt ($fPassword); - if ($CONF['domain_path'] == "YES") + if($CONF['maildir_name_hook'] != 'NO' && function_exists($CONF['maildir_name_hook'])) { + $hook_func = $CONF['maildir_name_hook']; + $maildir = $hook_func ($fDomain, $fUsername); + } + else if ($CONF['domain_path'] == "YES") { if ($CONF['domain_in_mailbox'] == "YES") { diff --git a/css/default.css b/css/default.css index 33c9c013..fa4e59c5 100644 --- a/css/default.css +++ b/css/default.css @@ -35,7 +35,7 @@ table { font-size: 11px; } -.button:hover { +.button:hover, .button:focus { background: #BCFF36; color: #888888; } diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000..2b5aee86 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,27 @@ +This package is using the quilt framework. +All patches are located in debian/patches. + +Adding a new patch: quilt new +This will create a new file debian/patches/patch/date-patch_name. +Please use the current date (e.g. 20100221 - YYYYMMDD) as prefix! + +Editing a file to include it into the patch: quilt edit +This will open your $EDITOR. + +To write your changes into the new patchfile: quilt refresh. + +quilt push: +Apply patch(es) from the series file. Without options, the next +patch in the series file is applied. When a number is specified, +apply the specified number of patches. When a patch name is +specified, apply all patches up to and including the specified patch. +Patch names may include the patches/ prefix, which means that +filename completion can be used. + +quilt pop: +Remove patch(es) from the stack of applied patches. Without options, +the topmost patch is removed. When a number is specified, remove the +specified number of patches. When a patch name is specified, remove +patches until the specified patch end up on top of the stack. +Patch names may include the patches/ prefix, which means that +filename completion can be used. diff --git a/debian/changelog b/debian/changelog index 00598104..a48420d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,25 +1,19 @@ -postfixadmin (2.3) unstable; urgency=low - - * New 'upstream' release. - - -- David Goodwin Mon, 27 Jul 2009 22:08:26 +0100 +postfixadmin (2.3.2) unstable; urgency=low -postfixadmin (2.3rc7) unstable; urgency=low + * New upstream release - * Fix issue with pre.rm script - * New 'upstream' release. + -- David Goodwin Mon, 23 Aug 2010 11:24:00 +0100 - -- David Goodwin Mon, 27 Jul 2009 22:08:26 +0100 +postfixadmin (2.3.1) unstable; urgency=low -postfixadmin (2.3rc6) unstable; urgency=low + * New upstream release + * Updated .deb standards (thanks normes) - * Bump version number; etc. + -- David Goodwin Thu, 08 Jul 2010 22:20:14 +0100 - -- David Goodwin Mon, 20 Jul 2009 19:56:26 +0100 - -postfixadmin (2.3rc5) unstable; urgency=low +postfixadmin (2.3) unstable; urgency=low * Initial release (Closes: #247225) - -- Norman Messtorff Sat, 09 May 2009 22:36:26 +0200 + -- Norman Messtorff Sun, 21 Feb 2010 22:36:26 +0200 diff --git a/debian/control b/debian/control index e966c121..82d04bcb 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,13 @@ Section: admin Priority: optional Maintainer: Norman Messtorff Build-Depends: debhelper (>= 7), po-debconf, quilt (>= 0.46) -Standards-Version: 3.8.2 +Standards-Version: 3.8.4 Homepage: http://postfixadmin.sourceforge.net XS-Vcs-Svn: https://postfixadmin.svn.sourceforge.net/svnroot/postfixadmin/trunk -XS-Vcs-Browse: http://postfixadmin.svn.sourceforge.net/viewvc/postfixadmin/trunk/ Package: postfixadmin Architecture: all -Depends: debconf (>= 0.5), dbconfig-common, wwwconfig-common, apache2 | lighttpd, libapache2-mod-php5 | php5-cgi | php5, php5-imap, php5-mysql | php5-pgsql, mysql-client | postgresql-client, ${misc:Depends} +Depends: debconf (>= 0.5), dbconfig-common, wwwconfig-common, apache2 | lighttpd | httpd, libapache2-mod-php5 | php5-cgi | php5, php5-imap, php5-mysql | php5-pgsql, mysql-client | postgresql-client, ${misc:Depends} Recommends: postfix-mysql | postfix-pgsql, mysql-server | postgresql-server Suggests: squirrelmail-postfixadmin, dovecot-common | courier-authlib-mysql | courier-authlib-postgresql Description: Virtual mail hosting interface for Postfix diff --git a/debian/patches/01-20090509_database-credentials b/debian/patches/20100221_db-credentials similarity index 73% rename from debian/patches/01-20090509_database-credentials rename to debian/patches/20100221_db-credentials index 8d9a1b3c..9977372e 100644 --- a/debian/patches/01-20090509_database-credentials +++ b/debian/patches/20100221_db-credentials @@ -1,7 +1,7 @@ -Index: config.inc.php +Index: postfixadmin-trunk/config.inc.php =================================================================== ---- config.inc.php (revision 690) -+++ config.inc.php (working copy) +--- postfixadmin-trunk.orig/config.inc.php 2010-02-21 19:04:32.000000000 +0100 ++++ postfixadmin-trunk/config.inc.php 2010-02-21 19:05:26.000000000 +0100 @@ -23,7 +23,7 @@ * Doing this implies you have changed this file as required. * i.e. configuring database etc; specifying setup.php password etc. @@ -11,7 +11,7 @@ Index: config.inc.php // In order to setup Postfixadmin, you MUST specify a hashed password here. // To create the hash, visit setup.php in a browser and type a password into the field, -@@ -46,11 +46,11 @@ +@@ -45,11 +45,12 @@ // mysql = MySQL 3.23 and 4.0, 4.1 or 5 // mysqli = MySQL 4.1+ // pgsql = PostgreSQL @@ -20,11 +20,12 @@ Index: config.inc.php -$CONF['database_user'] = 'postfix'; -$CONF['database_password'] = 'postfixadmin'; -$CONF['database_name'] = 'postfix'; ++ +$CONF['database_type'] = '_DBC_DBTYPE_'; +$CONF['database_host'] = '_DBC_DBSERVER_'; +$CONF['database_user'] = '_DBC_DBUSER_'; +$CONF['database_password'] = '_DBC_DBPASS_'; +$CONF['database_name'] = '_DBC_DBNAME_'; $CONF['database_prefix'] = ''; - - // Here, if you need, you can customize table names. + // If you need to specify a different port for a MYSQL database connection, use e.g. + // $CONF['database_host'] = '172.30.33.66:3308'; diff --git a/debian/patches/series b/debian/patches/series index ff4877ec..91d070ca 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1 @@ -01-20090509_database-credentials -p0 +20100221_db-credentials diff --git a/debian/postfixadmin.docs b/debian/postfixadmin.docs index b9ec0126..f328795f 100755 --- a/debian/postfixadmin.docs +++ b/debian/postfixadmin.docs @@ -1,5 +1,2 @@ DOCUMENTS CHANGELOG.TXT -GPL-LICENSE.TXT -INSTALL.TXT -LICENSE.TXT diff --git a/debian/postfixadmin.examples b/debian/postfixadmin.examples index 013f56bc..3d44bcc7 100644 --- a/debian/postfixadmin.examples +++ b/debian/postfixadmin.examples @@ -1,2 +1,16 @@ -ADDITIONS VIRTUAL_VACATION +ADDITIONS/change_password.tgz +ADDITIONS/import_users_from_csv.py +ADDITIONS/postfixadmin-domain-postdeletion.sh +ADDITIONS/cleanupdirs.pl +ADDITIONS/mailbox_remover.pl +ADDITIONS/postfixadmin-mailbox-postcreation.sh +ADDITIONS/virtualmaildel.php +ADDITIONS/convert-passwd-to-postfixadmin.pl +ADDITIONS/mkeveryone.pl +ADDITIONS/postfixadmin-mailbox-postdeletion.sh +ADDITIONS/delete-mailq-by-domain.pl +ADDITIONS/pfa_maildir_cleanup.pl +ADDITIONS/quota_usage.pl +ADDITIONS/fetchmail.pl +ADDITIONS/README.TXT diff --git a/debian/postfixadmin.install b/debian/postfixadmin.install index 0c38ba6e..78eb278f 100644 --- a/debian/postfixadmin.install +++ b/debian/postfixadmin.install @@ -4,8 +4,6 @@ css usr/share/postfixadmin images usr/share/postfixadmin languages usr/share/postfixadmin model usr/share/postfixadmin -motd.txt usr/share/postfixadmin -motd-users.txt usr/share/postfixadmin templates usr/share/postfixadmin users usr/share/postfixadmin debian/apache.conf etc/postfixadmin diff --git a/debian/watch b/debian/watch deleted file mode 100644 index cd951ef1..00000000 --- a/debian/watch +++ /dev/null @@ -1,2 +0,0 @@ -version=3 -http://sf.net/postfixadmin/postfixadmin-(.*)\.tar\.gz diff --git a/delete.php b/delete.php index 4cce53a6..2fb2e6d2 100644 --- a/delete.php +++ b/delete.php @@ -68,6 +68,7 @@ elseif ($fTable == "domain") $result_domain_admins = db_delete ($table_domain_admins,$fWhere,$fDelete); $result_alias = db_delete ($table_alias,$fWhere,$fDelete); $result_mailbox = db_delete ($table_mailbox,$fWhere,$fDelete); + $result_alias_domain = db_delete($table_alias_domain,'alias_domain',$fDelete); $result_log = db_delete ($table_log,$fWhere,$fDelete); if ($CONF['vacation'] == "YES") { @@ -143,6 +144,14 @@ elseif ($fTable == "alias" or $fTable == "mailbox") $tMessage.=')'; } db_log ($SESSID_USERNAME, $fDomain, 'delete_mailbox', $fDelete); + $result = db_query("SELECT * FROM $table_quota WHERE username='$fDelete'"); + if($result['rows'] >= 1) { + db_query ("DELETE FROM $table_quota WHERE username='$fDelete'"); + } + $result = db_query("SELECT * FROM $table_quota2 WHERE username='$fDelete'"); + if($result['rows'] == 1) { + db_query ("DELETE FROM $table_quota2 WHERE username='$fDelete'"); + } } $result = db_query("SELECT * FROM $table_vacation WHERE email = '$fDelete' AND domain = '$fDomain'"); if($result['rows'] == 1) { diff --git a/edit-alias.php b/edit-alias.php index 1a96b33c..02ca18df 100644 --- a/edit-alias.php +++ b/edit-alias.php @@ -63,8 +63,8 @@ if ($result['rows'] == 1) $orig_alias_list = explode(',', $tGoto); $alias_list = $orig_alias_list; - //. if we are not a global admin, and special_alias_control is NO, hide the alias that's the mailbox name. - if($CONF['special_alias_control'] == 'NO' && !authentication_has_role('global-admin')) { + //. if we are not a global admin, and alias_control_admin is NO, hide the alias that's the mailbox name. + if($CONF['alias_control_admin'] == 'NO' && !authentication_has_role('global-admin')) { /* Has a mailbox as well? Remove the address from $tGoto in order to edit just the real aliases */ $result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fAddress' AND domain='$fDomain'"); if ($result['rows'] == 1) @@ -135,7 +135,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { if($CONF['alias_control_admin'] == 'NO' && !authentication_has_role('global-admin')) { // if original record had a mailbox alias, so ensure the updated one does too. - if(in_array($orig_alias_list, $fAddress)) { + if(in_array($fAddress, $orig_alias_list)) { $new_aliases[] = $fAddress; } } diff --git a/functions.inc.php b/functions.inc.php index 3b9c33fc..db67c3fa 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -16,7 +16,7 @@ * Contains re-usable code. */ -$version = '2.3'; +$version = '2.3.2'; /** * check_session @@ -81,7 +81,12 @@ function authentication_require_role($role) { if(authentication_has_role($role)) { return True; } - header("Location: " . $CONF['postfix_admin_url'] . "/login.php"); + if($role === 'user') { + header("Location: " . $CONF['postfix_admin_url'] . '/users/login.php'); + } + else { + header("Location: " . $CONF['postfix_admin_url'] . "/login.php"); + } exit(0); } /** @@ -444,7 +449,8 @@ function get_domain_properties ($domain) //while loop to figure index names. use page_size and loop of queries $i=0; $current=0; - $page_size = $CONF['page_size']; + $page_size = (int) $CONF['page_size']; + if ($page_size < 1) die ("\$CONF['page_size'] = '$page_size' is invalid (it may only contain digits and must be >= 1)"); $tmpstr=""; $idxlabel=""; $list['alias_pgindex_count'] = 0; @@ -1177,7 +1183,7 @@ function pacrypt ($pw, $pw_db="") $salt = substr(create_salt(), 0, 2); # courier-authlib supports only two-character salts if(preg_match('/^{.*}/', $pw_db)) { // we have a flavor in the db -> use it instead of default flavor - $result = split('{|}', $pw_db, 3); + $result = preg_split('/[{}]/', $pw_db, 3); # split at { and/or } $flavor = $result[1]; $salt = substr($result[2], 0, 2); } @@ -1199,6 +1205,7 @@ function pacrypt ($pw, $pw_db="") $split_method = preg_split ('/:/', $CONF['encrypt']); $method = strtoupper($split_method[1]); if (! preg_match("/^[A-Z0-9-]+$/", $method)) { die("invalid dovecot encryption method"); } # TODO: check against a fixed list? + if (strtolower($method) == 'md5-crypt') die("\$CONF['encrypt'] = 'dovecot:md5-crypt' will not work because dovecotpw generates a random salt each time. Please use \$CONF['encrypt'] = 'md5crypt' instead."); $dovecotpw = "dovecotpw"; if (!empty($CONF['dovecotpw'])) $dovecotpw = $CONF['dovecotpw']; @@ -1450,7 +1457,7 @@ function db_connect ($ignore_errors = 0) } else { - $error_text .= "

DEBUG INFORMATION:
MySQL 3.x / 4.0 functions not available!
database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; + $error_text .= "

DEBUG INFORMATION:
MySQL 3.x / 4.0 functions not available! (php5-mysql installed?)
database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } elseif ($CONF['database_type'] == "mysqli") @@ -1466,7 +1473,7 @@ function db_connect ($ignore_errors = 0) } else { - $error_text .= "

DEBUG INFORMATION:
MySQL 4.1 functions not available!
database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT"; + $error_text .= "

DEBUG INFORMATION:
MySQL 4.1 functions not available! (php5-mysqli installed?)
database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } elseif ($CONF['database_type'] == "pgsql") @@ -1482,7 +1489,7 @@ function db_connect ($ignore_errors = 0) } else { - $error_text .= "

DEBUG INFORMATION:
PostgreSQL functions not available!
database_type = 'pgsql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; + $error_text .= "

DEBUG INFORMATION:
PostgreSQL functions not available! (php5-pgsql installed?)
database_type = 'pgsql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; } } else @@ -1571,7 +1578,7 @@ function db_query ($query, $ignore_errors = 0) if ($error_text != "" && $ignore_errors == 0) die($error_text); if ($error_text == "") { - if (preg_match("/^SELECT/i", $query)) + if (preg_match("/^SELECT/i", trim($query))) { // if $query was a SELECT statement check the number of rows with [database_type]_num_rows (). if ($CONF['database_type'] == "mysql") $number_rows = mysql_num_rows ($result); @@ -1768,7 +1775,16 @@ function db_log ($username,$domain,$action,$data) } } - +/** + * db_in_clause + * Action: builds and returns the "field in(x, y)" clause for database queries + * Call: db_in_clause (string field, array values) + */ +function db_in_clause($field, $values) { + return " $field IN ('" + . implode("','",escape_string(array_values($values))) + . "') "; +} // // table_by_key @@ -2093,6 +2109,7 @@ function create_mailbox_subfolders($login,$cleartext_password) $f='{'.$s_host.'}'.$s_prefix.$f; $res=imap_createmailbox($i,$f); if (!$res) { + error_log('Could not create IMAP folder $f: '.imap_last_error()); @imap_close($i); return FALSE; } @@ -2352,8 +2369,6 @@ function boolconf($setting) { } } - - $table_admin = table_by_key ('admin'); $table_alias = table_by_key ('alias'); $table_alias_domain = table_by_key ('alias_domain'); diff --git a/languages/nl.lang b/languages/nl.lang index f5092f16..9762133b 100644 --- a/languages/nl.lang +++ b/languages/nl.lang @@ -85,7 +85,7 @@ $PALANG['pOverview_get_quota'] = 'Mailbox Quota (MB)'; $PALANG['pOverview_get_modified'] = 'Laatst bewerkt'; $PALANG['pDelete_delete_error'] = 'Mislukt te verwijderen '; -$PALANG['pDelete_delete_success'] = '%s verwijdert.'; +$PALANG['pDelete_delete_success'] = '%s verwijderd.'; $PALANG['pDelete_postdelete_error'] = 'Niet in staat mailbox te verwijderen '; $PALANG['pDelete_domain_error'] = 'Dit is niet uw domein '; $PALANG['pDelete_domain_alias_error'] = 'Dit is niet uw domein '; @@ -191,12 +191,12 @@ $PALANG['pViewlog_domain'] = 'Domein'; $PALANG['pViewlog_action'] = 'Actie'; $PALANG['pViewlog_data'] = 'Aanpassing'; $PALANG['pViewlog_action_create_mailbox'] = 'Mailbox toegevoegd'; -$PALANG['pViewlog_action_delete_mailbox'] = 'Mailbox verwijdert'; +$PALANG['pViewlog_action_delete_mailbox'] = 'Mailbox verwijderd'; $PALANG['pViewlog_action_edit_mailbox'] = 'Mailbox bewerkt'; $PALANG['pViewlog_action_edit_mailbox_state'] = 'status actieve mailbox bewerkt'; $PALANG['pViewlog_action_create_alias'] = 'alias toegevoegd'; $PALANG['pViewlog_action_create_alias_domain'] = 'maak domein alias'; -$PALANG['pViewlog_action_delete_alias'] = 'alias verwijdert'; +$PALANG['pViewlog_action_delete_alias'] = 'alias verwijderd'; $PALANG['pViewlog_action_delete_alias_domain'] = 'verwijder alias domein'; $PALANG['pViewlog_action_edit_alias'] = 'alias bewerkt'; $PALANG['pViewlog_action_edit_alias_state'] = 'status actieve alias bewerkt'; @@ -331,7 +331,7 @@ $PALANG['pUsersMenu_edit_alias'] = 'Wijzig uw forward'; $PALANG['pUsersMenu_password'] = 'Wijzig wachtwoord'; $PALANG['pUsersMain_vacation'] = 'Stel een "out of office" bericht of automatisch beantwoorden voor uw e-mail in.'; -$PALANG['pUsersMain_vacationSet'] = $PALANG['pUsersMenu_vacation'] . ' is actief, click \'' . $PALANG['pUsersMenu_vacation'] . '\' to ' . $PALANG['edit'] . '/verweideren'; +$PALANG['pUsersMain_vacationSet'] = $PALANG['pUsersMenu_vacation'] . ' is actief, click \'' . $PALANG['pUsersMenu_vacation'] . '\' to ' . $PALANG['edit'] . '/verwijderen'; $PALANG['pUsersMain_edit_alias'] = 'Wijzig uw e-mail forwarding.'; $PALANG['pUsersMain_password'] = 'Wijzig uw huidige wachtwoord.'; @@ -353,8 +353,8 @@ $PALANG['pUsersVacation_activeuntil'] = 'Active until'; # XXX $PALANG['pCreate_dbLog_createmailbox'] = 'mailbox aangemaakt'; $PALANG['pCreate_dbLog_createalias'] = 'alias aangemaakt'; -$PALANG['pDelete_dbLog_deletealias'] = 'alias verwijdert'; -$PALANG['pDelete_dbLog_deletemailbox'] = 'mailbox verwijdert'; +$PALANG['pDelete_dbLog_deletealias'] = 'alias verwijderd'; +$PALANG['pDelete_dbLog_deletemailbox'] = 'mailbox verwijderd'; $PALANG['pEdit_dbLog_editactive'] = 'status verandert'; $PALANG['pEdit_dbLog_editalias'] = 'bewerk alias'; diff --git a/languages/pl.lang b/languages/pl.lang index c584921a..60c166ae 100644 --- a/languages/pl.lang +++ b/languages/pl.lang @@ -5,6 +5,7 @@ // by Jarek // updated by Piotr Meyer // updated by Lukasz Wasikowski +// updated by Michal Wojcik // $PALANG['YES'] = 'Tak'; @@ -24,13 +25,13 @@ $PALANG['pLogin_welcome'] = 'Sekcja przeznaczona dla administratorów domen.'; $PALANG['pLogin_username'] = 'Login (email)'; $PALANG['pLogin_password'] = 'Hasło'; $PALANG['pLogin_button'] = 'Zaloguj'; -$PALANG['pLogin_failed'] = 'Your email address or password are not correct.'; # XXX +$PALANG['pLogin_failed'] = 'Twój adres Email lub hasło jest niepoprawne.'; $PALANG['pLogin_login_users'] = 'Sekcja przeznaczona dla użytkowników.'; $PALANG['pMenu_main'] = 'Strona główna'; $PALANG['pMenu_overview'] = 'Dane zbiorcze'; $PALANG['pMenu_create_alias'] = 'Dodaj alias'; -$PALANG['pMenu_create_alias_domain'] = 'Add Alias Domain'; # XXX +$PALANG['pMenu_create_alias_domain'] = 'Dodaj alias domeny'; $PALANG['pMenu_create_mailbox'] = 'Dodaj konto'; $PALANG['pMenu_fetchmail'] = 'Pobierz Email'; $PALANG['pMenu_sendmail'] = 'Wyślij Email'; @@ -53,21 +54,21 @@ $PALANG['pOverview_title'] = ':: Zdefiniowane domeny'; $PALANG['pOverview_up_arrow'] = 'Do góry'; $PALANG['pOverview_right_arrow'] = 'Następna strona'; $PALANG['pOverview_left_arrow'] = 'Poprzednia strona'; -$PALANG['pOverview_alias_domain_title'] = ':: Domain Aliases'; # XXX +$PALANG['pOverview_alias_domain_title'] = ':: Aliasy domen'; $PALANG['pOverview_alias_title'] = ':: Aliasy'; -$PALANG['pOverview_mailbox_title'] = ':: Konta pocztowe'; # XXX +$PALANG['pOverview_mailbox_title'] = ':: Konta pocztowe'; $PALANG['pOverview_button'] = 'Idź'; $PALANG['pOverview_welcome'] = 'Dane zbiorcze dla domeny '; -$PALANG['pOverview_alias_domain_aliases'] = 'Alias Domains'; # XXX -$PALANG['pOverview_alias_domain_target'] = '%s is an Alias Domain for:'; # XXX +$PALANG['pOverview_alias_domain_aliases'] = 'Domeny aliasowe'; +$PALANG['pOverview_alias_domain_target'] = '%s jest domeną aliasową dla:'; $PALANG['pOverview_alias_alias_count'] = 'Alias'; $PALANG['pOverview_alias_mailbox_count'] = 'Konta'; $PALANG['pOverview_alias_address'] = 'Od'; $PALANG['pOverview_alias_goto'] = 'Do'; $PALANG['pOverview_alias_modified'] = 'Ostatnio zmodyfikowany'; -$PALANG['pOverview_alias_domain_modified'] = 'Last Modified'; # XXX +$PALANG['pOverview_alias_domain_modified'] = 'Ostatnio zmodyfikowane'; $PALANG['pOverview_alias_active'] = 'Aktywny'; -$PALANG['pOverview_alias_domain_active'] = 'Active'; # XXX +$PALANG['pOverview_alias_domain_active'] = 'Aktywny'; $PALANG['pOverview_alias_edit'] = 'Alias'; $PALANG['and_x_more'] = '[i %s wiecej...]'; $PALANG['pOverview_mailbox_username'] = 'Email'; @@ -76,11 +77,11 @@ $PALANG['pOverview_mailbox_quota'] = 'Udział (MB)'; $PALANG['pOverview_mailbox_modified'] = 'Ostatnio zmodyfikowany'; $PALANG['pOverview_mailbox_active'] = 'Aktywny'; $PALANG['pOverview_vacation_edit'] = 'Auto odpowiedź'; -$PALANG['pOverview_vacation_option'] = 'Ustaw auto odpowiedź'; +$PALANG['pOverview_vacation_option'] = 'Ustaw automatyczną odpowiedź'; $PALANG['pOverview_get_domain'] = 'Domena'; $PALANG['pOverview_get_aliases'] = 'Aliasy'; -$PALANG['pOverview_get_alias_domains'] = 'Domain Aliases'; # XXX +$PALANG['pOverview_get_alias_domains'] = 'Aliasy domenowe'; $PALANG['pOverview_get_mailboxes'] = 'Konta'; $PALANG['pOverview_get_quota'] = 'Udział (MB)'; $PALANG['pOverview_get_modified'] = 'Ostatnio zmodyfikowany'; @@ -89,20 +90,20 @@ $PALANG['pDelete_delete_error'] = 'Nie można usunąć t $PALANG['pDelete_delete_success'] = '%s usunięty.'; $PALANG['pDelete_postdelete_error'] = 'Nie można usunąć konta '; $PALANG['pDelete_domain_error'] = 'Ta domena nie należy do Ciebie '; -$PALANG['pDelete_domain_alias_error'] = 'This domain is not yours '; # XXX +$PALANG['pDelete_domain_alias_error'] = 'Ten alias domeny nie należy do Ciebie '; $PALANG['pDelete_alias_error'] = 'Nie można usunąć aliasu '; -$PALANG['pCreate_alias_domain_welcome'] = 'Mirror addresses of one of your domains to another.'; # XXX -$PALANG['pCreate_alias_domain_alias'] = 'Alias Domain'; # XXX -$PALANG['pCreate_alias_domain_alias_text'] = 'The domain that mails come in for.'; # XXX -$PALANG['pCreate_alias_domain_target'] = 'Target Domain'; # XXX -$PALANG['pCreate_alias_domain_target_text'] = 'The domain where mails should go to.'; # XXX -$PALANG['pCreate_alias_domain_active'] = 'Active'; # XXX -$PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX -$PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX -$PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX -$PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX -$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX -$PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX +$PALANG['pCreate_alias_domain_welcome'] = 'Duplikuj adresy z jednej Twojej domeny do innej.'; +$PALANG['pCreate_alias_domain_alias'] = 'Domena aliasowana/źródłowa'; +$PALANG['pCreate_alias_domain_alias_text'] = 'Domena do której przychodzą maile.'; +$PALANG['pCreate_alias_domain_target'] = 'Domena docelowa'; +$PALANG['pCreate_alias_domain_target_text'] = 'Domena do której powinny przychodzić maile.'; +$PALANG['pCreate_alias_domain_active'] = 'Aktywny'; +$PALANG['pCreate_alias_domain_button'] = 'Dodaj alias domeny'; +$PALANG['pCreate_alias_domain_error1'] = 'Nie masz uprawnień do tworzenia takiej konfiguracji.'; +$PALANG['pCreate_alias_domain_error2'] = 'Wybrana konfiguracja jest nieprawidłowa, proszę wybrać inną!'; +$PALANG['pCreate_alias_domain_error3'] = 'Dodanie do bazy nie powiodło się.'; +$PALANG['pCreate_alias_domain_error4'] = 'Wszystkie domeny są już aliasowane.'; +$PALANG['pCreate_alias_domain_success'] = 'Alias domeny został dodany do tabeli aliasów domen!'; $PALANG['pCreate_alias_welcome'] = 'Utwórz nowy alias dla Twojej domeny.'; $PALANG['pCreate_alias_address'] = 'Alias'; @@ -125,7 +126,7 @@ $PALANG['pEdit_alias_active'] = 'Aktywny'; $PALANG['pEdit_alias_goto_text_error1'] = 'Nie podałeś adresu odbiorcy (pole "To")'; $PALANG['pEdit_alias_goto_text_error2'] = 'Wpisany adres email jest niepoprawny: '; $PALANG['pEdit_alias_domain_error'] = 'Ta domena nie należy do Ciebie: '; -$PALANG['pEdit_alias_domain_result_error'] = 'Unable to modify the alias domain!'; # XXX +$PALANG['pEdit_alias_domain_result_error'] = 'Nie można zmodyfikować aliasu domeny!'; $PALANG['pEdit_alias_forward_and_store'] = 'Dostarczaj do mojej skrzynki.'; $PALANG['pEdit_alias_forward_only'] = 'Prześlij jedynie na podane adresy.'; $PALANG['pEdit_alias_button'] = 'Edytuj alias'; @@ -179,9 +180,9 @@ $PALANG['pPassword_button'] = 'Zmień hasło'; $PALANG['pPassword_result_error'] = 'Nie można zmienić Twojego hasła!'; $PALANG['pPassword_result_success'] = 'Twoje hasło zostało zmienione!'; -$PALANG['pEdit_vacation_set'] = 'Zmień / Ustaw wiadomość auto odpowiedzi'; -$PALANG['pEdit_vacation_remove'] = 'Usuń wiadomość auto odpowiedzi'; -$PALANG['pVacation_result_error'] = 'Nie można ustawić wiadomości auto odpowiedzi!'; +$PALANG['pEdit_vacation_set'] = 'Zmień / Ustaw wiadomość automatycznej odpowiedzi'; +$PALANG['pEdit_vacation_remove'] = 'Usuń wiadomość automatycznej odpowiedzi'; +$PALANG['pVacation_result_error'] = 'Nie można ustawić wiadomości automatycznej odpowiedzi!'; $PALANG['pVacation_result_removed'] = 'Auto odpowiedź została usunięta!'; $PALANG['pVacation_result_added'] = 'Auto odpowiedź została dodana!'; @@ -191,17 +192,17 @@ $PALANG['pViewlog_username'] = 'Administrator'; $PALANG['pViewlog_domain'] = 'Domena'; $PALANG['pViewlog_action'] = 'Działanie'; $PALANG['pViewlog_data'] = 'Dane'; -$PALANG['pViewlog_action_create_mailbox'] = 'utwórz konto'; -$PALANG['pViewlog_action_delete_mailbox'] = 'usuń konto'; -$PALANG['pViewlog_action_edit_mailbox'] = 'edytuj konto'; -$PALANG['pViewlog_action_edit_mailbox_state'] = 'edytuj aktywne konto'; -$PALANG['pViewlog_action_create_alias'] = 'utwórz alias'; -$PALANG['pViewlog_action_create_alias_domain'] = 'create alias domain'; # XXX -$PALANG['pViewlog_action_delete_alias'] = 'usuń alias'; -$PALANG['pViewlog_action_delete_alias_domain'] = 'delete alias domain'; # XXX -$PALANG['pViewlog_action_edit_alias'] = 'edytuj alias'; -$PALANG['pViewlog_action_edit_alias_state'] = 'edytuj aktywny alias'; -$PALANG['pViewlog_action_edit_alias_domain_state'] = 'edit alias domain active'; # XXX +$PALANG['pViewlog_action_create_mailbox'] = 'utworzenie konta'; +$PALANG['pViewlog_action_delete_mailbox'] = 'usunięcie konta'; +$PALANG['pViewlog_action_edit_mailbox'] = 'edycja konta'; +$PALANG['pViewlog_action_edit_mailbox_state'] = 'edycja statusu konta'; +$PALANG['pViewlog_action_create_alias'] = 'utworzenie aliasu'; +$PALANG['pViewlog_action_create_alias_domain'] = 'utworzenie aliasu domeny'; +$PALANG['pViewlog_action_delete_alias'] = 'usunięcie aliasu'; +$PALANG['pViewlog_action_delete_alias_domain'] = 'usunięcie aliasu domeny'; +$PALANG['pViewlog_action_edit_alias'] = 'edycja aliasu'; +$PALANG['pViewlog_action_edit_alias_state'] = 'edycja statusu aliasu'; +$PALANG['pViewlog_action_edit_alias_domain_state'] = 'edycja statusu aliasu domeny'; $PALANG['pViewlog_action_edit_password'] = 'zmień hasło'; $PALANG['pViewlog_button'] = 'Idź'; @@ -220,7 +221,7 @@ $PALANG['pSendmail_result_success'] = 'Email wysłany!'; $PALANG['pAdminMenu_list_admin'] = 'Lista administratorów'; $PALANG['pAdminMenu_list_domain'] = 'Lista domen'; -$PALANG['pAdminMenu_list_virtual'] = 'Virtual list'; # XXX +$PALANG['pAdminMenu_list_virtual'] = 'Lista zbiorcza'; $PALANG['pAdminMenu_viewlog'] = 'Logi'; $PALANG['pAdminMenu_backup'] = 'Kopia bezpieczeństwa'; $PALANG['pAdminMenu_create_domain_admins'] = 'Administratorzy domeny'; @@ -278,7 +279,7 @@ $PALANG['pAdminCreate_domain_button'] = 'Dodaj domenę'; $PALANG['pAdminCreate_domain_result_error'] = 'Nie można dodać domeny!'; $PALANG['pAdminCreate_domain_result_success'] = 'Domena została dodana!'; $PALANG['pAdminDelete_domain_error'] = 'Nie można usunąć domeny!'; -$PALANG['pAdminDelete_alias_domain_error'] = 'Unable to remove domain alias!'; # XXX +$PALANG['pAdminDelete_alias_domain_error'] = 'Nie można usunąć aliasu domeny!'; $PALANG['pAdminEdit_domain_welcome'] = 'Edytuj domenę'; $PALANG['pAdminEdit_domain_domain'] = 'Domena'; @@ -331,18 +332,18 @@ $PALANG['pUsersMenu_vacation'] = 'Auto odpowiedź'; $PALANG['pUsersMenu_edit_alias'] = 'Zmień przekierowania'; $PALANG['pUsersMenu_password'] = 'Zmień hasło'; -$PALANG['pUsersMain_vacation'] = 'Ustaw "out of office" wiadomość lub auto odpowiedź.'; +$PALANG['pUsersMain_vacation'] = 'Ustaw automatyczną odpowiedź.'; $PALANG['pUsersMain_vacationSet'] = $PALANG['pUsersMenu_vacation'] . ' jest WŁACZONA, kliknij \'' . $PALANG['pUsersMenu_vacation'] . '\' aby ' . 'edytować/usunąć'; $PALANG['pUsersMain_edit_alias'] = 'Zmień przekierowania wiadomości.'; $PALANG['pUsersMain_password'] = 'Zmień aktualne hasło.'; -$PALANG['pUsersVacation_welcome'] = 'Auto odpowiedź.'; -$PALANG['pUsersVacation_welcome_text'] = 'Masz już skonfigurowaną auto odpowiedź!'; +$PALANG['pUsersVacation_welcome'] = 'Automatyczną odpowiedź.'; +$PALANG['pUsersVacation_welcome_text'] = 'Masz już skonfigurowaną automatyczną odpowiedź!'; $PALANG['pUsersVacation_subject'] = 'Temat'; $PALANG['pUsersVacation_subject_text'] = 'Poza biurem'; -$PALANG['pUsersVacation_body'] = 'Tekst'; # XXX text changed to 'Message' +$PALANG['pUsersVacation_body'] = 'Wiadomość'; $PALANG['pUsersVacation_body_text'] = << do . @@ -350,8 +351,8 @@ W pilnych sprawach proszę się kontaktować z . EOM; $PALANG['pUsersVacation_button_away'] = 'Nieobecny/a'; $PALANG['pUsersVacation_button_back'] = 'Zaraz wracam'; -$PALANG['pUsersVacation_result_error'] = 'Nie mogę zaktualizować ustawień Twojej auto odpowiedzi!'; -$PALANG['pUsersVacation_result_success'] = 'Twoja auto odpowiedź została usunięta!'; +$PALANG['pUsersVacation_result_error'] = 'Nie mogę zaktualizować ustawień Twojej automatycznej odpowiedzi!'; +$PALANG['pUsersVacation_result_success'] = 'Twoja automatyczna odpowiedź została usunięta!'; $PALANG['pUsersVacation_activefrom'] = 'Active from'; # XXX $PALANG['pUsersVacation_activeuntil'] = 'Active until'; # XXX @@ -379,10 +380,10 @@ $PALANG['pBroadcast_error_empty'] = 'Pola Nazwa, Temat i Wiadomość nie powinny $PALANG['pStatus_undeliverable'] = 'może być NIEDOSTARCZALNA '; $PALANG['pStatus_custom'] = 'Dostarczyć do '; $PALANG['pStatus_popimap'] = 'POP/IMAP '; -$PALANG['pPasswordTooShort'] = "Hasło jest za krótkie - musi mieć minimum %s znaków"; -$PALANG['pInvalidDomainRegex'] = "Invalid domain name %s, fails regexp check"; # XXX -$PALANG['pInvalidDomainDNS'] = "Invalid domain %s, and/or not discoverable in DNS"; # XXX -$PALANG['pInvalidMailRegex'] = "Invalid email address, fails regexp check"; # XXX +$PALANG['pPasswordTooShort'] = 'Hasło jest za krótkie - musi mieć minimum %s znaków'; +$PALANG['pInvalidDomainRegex'] = 'Nieprawidłowa nazwa domeny %s'; +$PALANG['pInvalidDomainDNS'] = 'Nieprawidłowa domena %s, nie wykrywana w DNS'; +$PALANG['pInvalidMailRegex'] = 'Nieprawidłowy adres email'; $PALANG['pFetchmail_welcome'] = 'Pobierz pocztę dla:'; $PALANG['pFetchmail_new_entry'] = 'Nowy wpis'; $PALANG['pFetchmail_database_save_error'] = 'Wpis nie może być zapisany w bazie danych!'; @@ -403,7 +404,7 @@ $PALANG['pFetchmail_field_poll_time'] = 'Sprawdzaj'; $PALANG['pFetchmail_field_fetchall'] = 'Pobierz wszystkie'; $PALANG['pFetchmail_field_keep'] = 'Pozostaw'; $PALANG['pFetchmail_field_protocol'] = 'Protokół'; -$PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_usessl'] = 'Aktywne SSL'; $PALANG['pFetchmail_field_extra_options'] = 'Dodatkowe opcje'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Data'; @@ -419,7 +420,7 @@ $PALANG['pFetchmail_desc_poll_time'] = 'Pobierz co ... minut'; $PALANG['pFetchmail_desc_fetchall'] = 'Pobierz zarówno stare (przeczytane) jak i nowe wiadomości'; $PALANG['pFetchmail_desc_keep'] = 'Pozostaw wiadomości na serwerze'; $PALANG['pFetchmail_desc_protocol'] = 'Protokół'; -$PALANG['pFetchmail_desc_usessl'] = 'SSL encryption'; # XXX +$PALANG['pFetchmail_desc_usessl'] = 'szyfrowanie SSL'; $PALANG['pFetchmail_desc_extra_options'] = 'Dodatkowe opcje dla fetchmail'; $PALANG['pFetchmail_desc_mda'] = 'Mail Delivery Agent'; $PALANG['pFetchmail_desc_date'] = 'Data ostatniego sprawdzenia/zmiany konfiguracji'; diff --git a/list-domain.php b/list-domain.php index a34fb7a4..0592548b 100644 --- a/list-domain.php +++ b/list-domain.php @@ -32,7 +32,7 @@ authentication_require_role('admin'); if (authentication_has_role('global-admin')) { $list_admins = list_admins (); $is_superadmin = 1; - $fUsername = safepost('fUsername', safeget('username')); # prefer POST over GET variable + $fUsername = escape_string(safepost('fUsername', safeget('username'))); # prefer POST over GET variable if ($fUsername != "") $admin_properties = get_admin_properties($fUsername); } else { $list_admins = array(authentication_get_username()); @@ -51,24 +51,28 @@ if (isset($admin_properties) && $admin_properties['domain_count'] == 'ALL') { # $list_domains = list_domains_for_admin(authentication_get_username()); } +$table_domain = table_by_key('domain'); +$table_mailbox = table_by_key('mailbox'); +$table_alias = table_by_key('alias'); + if ($list_all_domains == 1) { - $where = " WHERE domain.domain != 'ALL' "; # TODO: the ALL dummy domain is annoying... + $where = " WHERE $table_domain.domain != 'ALL' "; # TODO: the ALL dummy domain is annoying... } else { $list_domains = escape_string($list_domains); - $where = " WHERE domain.domain IN ('" . join("','", $list_domains) . "') "; + $where = " WHERE $table_domain.domain IN ('" . join("','", $list_domains) . "') "; } # fetch domain data and number of mailboxes # (PgSQL requires the extensive GROUP BY statement, https://sourceforge.net/forum/message.php?msg_id=7386240) $query = " - SELECT domain.* , COUNT( DISTINCT mailbox.username ) AS mailbox_count - FROM domain - LEFT JOIN mailbox ON domain.domain = mailbox.domain + SELECT $table_domain.* , COUNT( DISTINCT $table_mailbox.username ) AS mailbox_count + FROM $table_domain + LEFT JOIN $table_mailbox ON $table_domain.domain = $table_mailbox.domain $where - GROUP BY domain.domain, domain.description, domain.aliases, domain.mailboxes, - domain.maxquota, domain.quota, domain.transport, domain.backupmx, domain.created, - domain.modified, domain.active - ORDER BY domain.domain + GROUP BY $table_domain.domain, $table_domain.description, $table_domain.aliases, $table_domain.mailboxes, + $table_domain.maxquota, $table_domain.quota, $table_domain.transport, $table_domain.backupmx, $table_domain.created, + $table_domain.modified, $table_domain.active + ORDER BY $table_domain.domain "; $result = db_query($query); @@ -80,12 +84,12 @@ while ($row = db_array ($result['result'])) { # fetch number of aliases # doing this separate is much faster than doing it in one "big" query $query = " - SELECT domain.domain, COUNT( DISTINCT alias.address ) AS alias_count - FROM domain - LEFT JOIN alias ON domain.domain = alias.domain + SELECT $table_domain.domain, COUNT( DISTINCT $table_alias.address ) AS alias_count + FROM $table_domain + LEFT JOIN $table_alias ON $table_domain.domain = $table_alias.domain $where - GROUP BY domain.domain - ORDER BY domain.domain + GROUP BY $table_domain.domain + ORDER BY $table_domain.domain "; $result = db_query($query); diff --git a/list-virtual.php b/list-virtual.php index 5577c49d..ff609a26 100644 --- a/list-virtual.php +++ b/list-virtual.php @@ -53,11 +53,13 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']); if (isset ($_GET['limit'])) $fDisplay = intval ($_GET['limit']); + $search = escape_string(safeget('search')); } else { if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']); if (isset ($_POST['limit'])) $fDisplay = intval ($_POST['limit']); + $search = escape_string(safepost('search')); } if (count($list_domains) == 0) { @@ -91,6 +93,11 @@ if($fDomain) { $_SESSION['list_virtual_sticky_domain'] = $fDomain; } +# +# alias domain +# + +# TODO: add search support for alias domains if (boolconf('alias_domain')) { # Alias-Domains # first try to get a list of other domains pointing @@ -136,23 +143,36 @@ if (boolconf('alias_domain')) { } } +# +# aliases +# + +if ($search == "") { + $sql_domain = " $table_alias.domain='$fDomain' "; + $sql_where = ""; +} else { + $sql_domain = db_in_clause("$table_alias.domain", $list_domains); + $sql_where = " AND ( address LIKE '%$search%' OR goto LIKE '%$search%' ) "; +} $query = "SELECT $table_alias.address, $table_alias.goto, $table_alias.modified, $table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username - WHERE ($table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL) + WHERE ($sql_domain AND $table_mailbox.maildir IS NULL $sql_where) ORDER BY $table_alias.address LIMIT $fDisplay, $page_size"; if ('pgsql'==$CONF['database_type']) { + # TODO: is the different query for pgsql really needed? The mailbox query below also works with both... $query = "SELECT address, goto, - extract(epoch from modified) as modified, + modified, active FROM $table_alias - WHERE domain='$fDomain' AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address) + WHERE $sql_domain AND NOT EXISTS(SELECT 1 FROM $table_mailbox WHERE username=$table_alias.address $sql_where) ORDER BY address LIMIT $page_size OFFSET $fDisplay"; } + $result = db_query ($query); if ($result['rows'] > 0) { @@ -170,66 +190,76 @@ if ($result['rows'] > 0) } } -# TODO: reduce number of different queries by not depending on too much config options -# (it probably won't hurt to include a field in the resultset that is not displayed later) -if ($CONF['vacation_control_admin'] == 'YES') -{ - if (boolconf('used_quotas')) - { - if (boolconf('new_quota_table')) - { - $query = "SELECT $table_mailbox.*, $table_vacation.active AS v_active, $table_quota2.bytes as current FROM $table_mailbox - LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email - LEFT JOIN $table_quota2 ON $table_mailbox.username=$table_quota2.username - WHERE $table_mailbox.domain='$fDomain' - ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay"; - } - else - { - $query = "SELECT $table_mailbox.*, $table_vacation.active AS v_active, $table_quota.current FROM $table_mailbox - LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email - LEFT JOIN $table_quota ON $table_mailbox.username=$table_quota.username - WHERE $table_mailbox.domain='$fDomain' AND - ( $table_quota.path='quota/storage' OR $table_quota.path IS NULL ) - ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay"; - } - } - else # $CONF[used_quotas] = NO - { - $query = "SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox - LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email - WHERE $table_mailbox.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay"; - } + +# +# mailboxes +# + +$display_mailbox_aliases = boolconf('alias_control_admin'); + +# build the sql query +$sql_select = " SELECT $table_mailbox.* "; +$sql_from = " FROM $table_mailbox "; +$sql_join = ""; +$sql_where = " WHERE "; +$sql_order = " ORDER BY $table_mailbox.username "; +$sql_limit = " LIMIT $page_size OFFSET $fDisplay"; + +if ($search == "") { + $sql_where .= " $table_mailbox.domain='$fDomain' "; +} else { + $sql_where .= db_in_clause("$table_mailbox.domain", $list_domains) . " "; + $sql_where .= " AND ( $table_mailbox.username LIKE '%$search%' OR $table_mailbox.name LIKE '%$search%' "; + if ($display_mailbox_aliases) { + $sql_where .= " OR $table_alias.goto LIKE '%$search%' "; + } + $sql_where .= " ) "; # $search is already escaped } -else # $CONF['vacation_control_admin'] == 'NO' -{ - if (boolconf('used_quotas')) - { - if (boolconf('new_quota_table')) - { - $query = "SELECT $table_mailbox.*, $table_quota2.bytes as current FROM $table_mailbox - LEFT JOIN $table_quota2 ON $table_mailbox.username=$table_quota2.username - WHERE $table_mailbox.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay"; - } - else - { - $query = "SELECT $table_mailbox.*, $table_quota.current FROM $table_mailbox - LEFT JOIN $table_quota ON $table_mailbox.username=$table_quota.username - WHERE $table_mailbox.domain='$fDomain' AND - ( $table_quota.path='quota/storage' OR $table_quota.path IS NULL ) - ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay"; - } - } - else # $CONF[used_quotas] = NO - { - $query = "SELECT * FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $page_size OFFSET $fDisplay"; - } + +if ($display_mailbox_aliases) { + $sql_select .= ", $table_alias.goto "; + $sql_join .= " LEFT JOIN $table_alias ON $table_mailbox.username=$table_alias.address "; +} + +if (boolconf('vacation_control_admin')) { + $sql_select .= ", $table_vacation.active AS v_active "; + $sql_join .= " LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email "; +} + +if (boolconf('used_quotas') && boolconf('new_quota_table')) { + $sql_select .= ", $table_quota2.bytes as current "; + $sql_join .= " LEFT JOIN $table_quota2 ON $table_mailbox.username=$table_quota2.username "; +} + +if (boolconf('used_quotas') && ( ! boolconf('new_quota_table') ) ) { + $sql_select .= ", $table_quota.current "; + $sql_join .= " LEFT JOIN $table_quota ON $table_mailbox.username=$table_quota.username "; + $sql_where .= " AND ( $table_quota.path='quota/storage' OR $table_quota.path IS NULL ) "; } + +$query = "$sql_select\n$sql_from\n$sql_join\n$sql_where\n$sql_order\n$sql_limit"; + $result = db_query ($query); + if ($result['rows'] > 0) { while ($row = db_array ($result['result'])) { + if ($display_mailbox_aliases) { + $goto_split = explode(",", $row['goto']); + $row['goto_mailbox'] = 0; + $row['goto_other'] = array(); + + foreach ($goto_split as $goto_single) { + if ($goto_single == $row['username']) { # delivers to mailbox + $row['goto_mailbox'] = 1; + } elseif (boolconf('vacation') && strstr($goto_single, '@' . $CONF['vacation_domain']) ) { # vacation alias - TODO: check for full vacation alias + # skip the vacation alias, vacation status is detected otherwise + } else { # forwarding to other alias + $row['goto_other'][] = $goto_single; + } + } + } if ('pgsql'==$CONF['database_type']) { // XXX @@ -248,6 +278,7 @@ if ($result['rows'] > 0) $tCanAddAlias = false; $tCanAddMailbox = false; +# TODO: needs reworking for $search... $limit = get_domain_properties($fDomain); if (isset ($limit)) { if ($fDisplay >= $page_size) { diff --git a/login.php b/login.php index bcc238e4..3870f70c 100644 --- a/login.php +++ b/login.php @@ -19,7 +19,6 @@ * Template Variables: * * tMessage - * tUsername * * Form POST \ GET Variables: * @@ -65,7 +64,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { $error = 1; $tMessage = '' . $PALANG['pLogin_failed'] . ''; - $tUsername = htmlentities($fUsername, ENT_QUOTES, 'UTF-8'); } } else diff --git a/setup.php b/setup.php index 3c54217f..bea43a71 100644 --- a/setup.php +++ b/setup.php @@ -336,7 +336,7 @@ else $table_domain = table_by_key('domain'); $r = db_query("SELECT * FROM $table_domain WHERE domain = 'ALL'"); if($r['rows'] == 0) { - db_insert($table_domain, array('domain' => 'ALL')); // all other fields should default through the schema. + db_insert('domain', array('domain' => 'ALL')); // all other fields should default through the schema. } list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, array('ALL'), TRUE); diff --git a/templates/admin_create-domain.php b/templates/admin_create-domain.php index 780a4147..b68161db 100644 --- a/templates/admin_create-domain.php +++ b/templates/admin_create-domain.php @@ -62,7 +62,7 @@ - + />   diff --git a/templates/list-virtual.php b/templates/list-virtual.php index 0c6d5f77..76c3510a 100644 --- a/templates/list-virtual.php +++ b/templates/list-virtual.php @@ -6,6 +6,17 @@ $file = 'list-virtual.php'; +# search highlighting +function searchhl($text) { + global $search; + if ($search == "") { + return $text; + } else { + return str_ireplace($search, "" . $search . "", $text); + # TODO: find out why .searchresult class in css file doesn't work + } +} + if ($limit['aliases'] < 0) $limit['aliases'] = $PALANG['pOverview_disabled']; if ($limit['mailboxes'] < 0) $limit['mailboxes'] = $PALANG['pOverview_disabled']; if ($limit['maxquota'] < 0) $limit['maxquota'] = $PALANG['pOverview_disabled']; @@ -94,6 +105,9 @@ if ((sizeof ($tAliasDomains) > 0) || (is_array ($tTargetDomain) )) print " " . $tAliasDomains[$i]['alias_domain'] . "\n"; print " " . $tAliasDomains[$i]['modified'] . "\n"; $active = ($tAliasDomains[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; + +# TODO: change all edit-*.php scripts not to require the domain parameter (and extract it from the address). This avoids superflous problems when using search. + print " " . $active . "\n"; print " " . gen_show_status($tAlias[$i]['address']) . "\n"; } - - print " " . $tAlias[$i]['address'] . "\n"; + print " " . searchhl($tAlias[$i]['address']) . "\n"; if ($CONF['alias_goto_limit'] > 0) { - print " " . preg_replace ( + print " " . searchhl(preg_replace ( "/,/", "
", preg_replace( @@ -167,9 +180,9 @@ if (sizeof ($tAlias) > 0) ), $tAlias[$i]['goto'] ) - ) . "\n"; + )) . "\n"; } else { - print " " . preg_replace ("/,/", "
", $tAlias[$i]['goto']) . "\n"; + print " " . searchhl(preg_replace ("/,/", "
", $tAlias[$i]['goto'])) . "\n"; } print " " . $tAlias[$i]['modified'] . "\n"; @@ -179,7 +192,7 @@ if (sizeof ($tAlias) > 0) # superadmin code $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print "
" . $active . "\n"; - print " " . $PALANG['edit'] . "\n"; + print " " . $PALANG['edit'] . "\n"; print " " . $PALANG['del'] . "\n"; } else { @@ -188,7 +201,7 @@ if (sizeof ($tAlias) > 0) { $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " " . $active . "\n"; - print " " . $PALANG['edit'] . "\n"; + print " " . $PALANG['edit'] . "\n"; print " " . $PALANG['del'] . "\n"; } else @@ -197,7 +210,7 @@ if (sizeof ($tAlias) > 0) { $active = ($tAlias[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO']; print " " . $active . "\n"; - print " " . $PALANG['edit'] . "\n"; + print " " . $PALANG['edit'] . "\n"; print " " . $PALANG['del'] . "\n"; } else @@ -256,6 +269,8 @@ if (sizeof ($tMailbox) > 0) { $colspan=8; if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1; + if ($display_mailbox_aliases) $colspan=$colspan+1; + print "\n"; print " \n"; print " "; @@ -263,6 +278,7 @@ if (sizeof ($tMailbox) > 0) { print " \n"; if ($CONF['show_status'] == 'YES') { print "\n"; } print " \n"; + if ($display_mailbox_aliases) print " \n"; print " \n"; if ($CONF['quota'] == 'YES') print " \n"; print " \n"; @@ -282,7 +298,22 @@ if (sizeof ($tMailbox) > 0) { print " \n"; } - print " \n"; + print " \n"; + + if ($display_mailbox_aliases) { + # print " \n"; + print " \n"; + } + + print " \n"; if ($CONF['quota'] == 'YES') { @@ -331,7 +362,7 @@ if (sizeof ($tMailbox) > 0) { if ($edit_aliases == 1) { - print " \n"; + print " \n"; } print " \n"; diff --git a/templates/login.php b/templates/login.php index d471b174..51971d21 100644 --- a/templates/login.php +++ b/templates/login.php @@ -7,7 +7,7 @@ - + diff --git a/upgrade.php b/upgrade.php index 757cf40d..391f2104 100644 --- a/upgrade.php +++ b/upgrade.php @@ -217,7 +217,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") { function _drop_index ($table, $index) { global $CONF; - $tabe = table_by_key ($table); + $table = table_by_key ($table); if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) { return "ALTER TABLE $table DROP INDEX $index"; @@ -231,7 +231,7 @@ function _drop_index ($table, $index) { function _add_index($table, $indexname, $fieldlist) { global $CONF; - $tabe = table_by_key ($table); + $table = table_by_key ($table); if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) { return "ALTER TABLE $table ADD INDEX `$indexname` ( `$fieldlist` )"; diff --git a/users/edit-alias.php b/users/edit-alias.php index 241455fc..6af8017e 100644 --- a/users/edit-alias.php +++ b/users/edit-alias.php @@ -75,14 +75,17 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") $goto = explode(",",$goto); + $error = 0; $goto = array_merge(array_unique($goto)); $good_goto = array(); + if($fForward_and_store == 'NO' && sizeof($goto) == 1 && $goto[0] == '') { $tMessage = $PALANG['pEdit_alias_goto_text_error1']; $error += 1; } if($error === 0) { foreach($goto as $address) { + if ($address != "") { # $goto[] may contain a "" element if(!check_email($address)) { $error += 1; $tMessage = $PALANG['pEdit_alias_goto_text_error2'] . " $address"; @@ -90,8 +93,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") else { $good_goto[] = $address; } + } } - $goto = $good_goto; } if ($error == 0) { @@ -99,7 +102,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") if($fForward_and_store == "YES" ) { $flags = 'forward_and_store'; } - $updated = $ah->update($goto, $flags); + $updated = $ah->update($good_goto, $flags); if($updated) { header ("Location: main.php"); exit; diff --git a/users/password.php b/users/password.php index 9dd72b89..6cbc4478 100644 --- a/users/password.php +++ b/users/password.php @@ -43,8 +43,9 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") $fPassword = $_POST['fPassword']; $fPassword2 = $_POST['fPassword2']; + $error = 0; if(strlen($fPassword) < $CONF['min_password_length']) { - $error = 1; + $error += 1; flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length'])); } if(!UserHandler::login($username, $fPassword_current)) { @@ -53,11 +54,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") } if (empty ($fPassword) or ($fPassword != $fPassword2)) { - $error = 1; + $error += 1; $pPassword_password_text = $PALANG['pPassword_password_text_error']; } - if ($error != 1) + if ($error == 0) { $uh = new UserHandler($username); if($uh->change_pass($fPassword_current, $fPassword)) { diff --git a/viewlog.php b/viewlog.php index f85494bd..f30673b5 100644 --- a/viewlog.php +++ b/viewlog.php @@ -53,6 +53,9 @@ if (! (check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('glob $tMessage = $PALANG['pViewlog_result_error']; } +// we need to initialize $tLog as an array! +$tLog = array(); + if ($error != 1) { $query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10";

" . $PALANG['pOverview_mailbox_title'] . "

" . $PALANG['pOverview_mailbox_username'] . "" . $PALANG['pOverview_alias_goto'] . "" . $PALANG['pOverview_mailbox_name'] . "" . $PALANG['pOverview_mailbox_quota'] . "" . $PALANG['pOverview_mailbox_modified'] . "" . gen_show_status($tMailbox[$i]['username']) . "" . $tMailbox[$i]['username'] . "" . searchhl($tMailbox[$i]['username']) . "" . searchhl($tMailbox[$i]['goto']) . ""; + if ($tMailbox[$i]['goto_mailbox'] == 1) { + print "Mailbox"; # TODO: make translatable + } else { + print "Forward only"; # TODO: make translatable + } + if (count($tMailbox[$i]['goto_other']) > 0) print "
"; + print searchhl(join("
", $tMailbox[$i]['goto_other'])); # TODO: honor $CONF['alias_goto_limit'] + print "
" . $tMailbox[$i]['name'] . "" . $PALANG['pOverview_alias_edit'] . "" . $PALANG['pOverview_alias_edit'] . "" . $PALANG['edit'] . "