Commit Graph

212 Commits (e14bb9038eda426371b984c51100e2c6a223462e)

Author SHA1 Message Date
Christian Boltz 799cd9c2f3 functions.inc.php:
- create_page_browser(): added queries for PgSQL (untested!)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1033 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz cfd1be04b2 functions.inc.php:
fully working MySQL version of create_page_browser()

- force $page_size to int and die() if it is < 2
- dropped $item_count parameter - the function now counts itsself
- include last row in the query
- return empty array (= no pagebrowser) if all rows fit in one page
- PgSQL queries are still on my TODO list


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1030 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 63146720d4 functions.inc.php:
- generate_password(): generate more secure random password

Based on a patch from Pierre Fagrell (mrfrenzy@SF),
https://sourceforge.net/tracker/?func=detail&aid=2958698&group_id=191583&atid=937964
(with some modifications)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1026 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 67069e07f8 functions.inc.php:
- new function create_page_browser()

Function to create the page browser index ("a-c, d-h, ...") with light
speed (at least when compared with the current code that can take several
minutes(!) for people with lots of mailboxes or aliases).

At the moment, it only works with MySQL, has several big TODO notes 
(including notices how to implement the PostgreSQL query) and is not
yet actively used.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1022 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz d66262f00e Remove usage of $CONF['postfix_admin_url'] in various Location: headers
to avoid problems with wrong values of $CONF['postfix_admin_url'].

https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3039042&group_id=191583
contains the technical details and reasons.

Note: $CONF['postfix_admin_url'] is still used at some places that are
a bit harder to change.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1021 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Valkum 179f195bf1 *fixed db_insert - duplicate $timestamp
*fixed VacationHandler.php
*changed edit-vacation to us VacationHandler
*added todopoint to upgrade.php
*fixed problem in AliasHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@981 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz c97e5224dc Remove $username parameter from db_log()
functions.inc.php:
- remove $username parameter from function db_log()
  (now auto-detected with authentication_get_username())

various files:
- remove hardcoded username ('CONSOLE', $username etc.) in db_log() calls


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@966 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz ba8fc89347 Preparation for removing the $username parameter from db_log()
(will be detected by authentication_get_username() instead)

scripts/postfixadmin-cli.php:
- define ("POSTFIXADMIN_CLI", 1) (we have no session running and need a
  way to tell authentication_get_username() that this is a CLI access)

functions.inc.php:
- authentication_get_username(): check for POSTFIXADMIN_CLI constant,
  return 'CLI' if set
  (hmmm, do we need a similar thing for XMLRPC?)
- db_log(): override $username parameter with authentication_get_username()
  (removing it from function parameters will be my next big commit)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@965 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 4a2b40e100 changed db_update parameters for the most common usecase "WHERE col=value" -
column and value are separate parameters now

functions.inc.php:
- changed function db_update() parameters - column name and value for the WHERE
  condition are now two separate parameters. This means we don't need to
  escape_string(), add quotes etc. for most UPDATE queries.
  Example call: db_update('alias', 'address', $this->username, $values_array)
- the previous db_update() is now called db_update_q()

model/UserHandler.php:
- changed db_update call to the new parameters
- removed now unused variables
- renamed $username to $E_username
- call pacrypt directly when setting the $set array, no need for $new_db_password

model/AliasHandler.php
- changed db_update call to the new parameters

edit-mailbox.php
- switched to db_update_q()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@931 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 93d80797ea functions.inc.php: last commit missed some changes to db_log():
- sorted $action_list to make it more readable
- cleanup


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@910 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 900615a5ec functions.inc.php: various improvements while working on UserHandler.php
- smtp_mail(): added another (currently optional) parameter.
  It can now be called with subject and body, no need to build the mail
  header in every script that needs to send a mail.
- db_delete() did not use table_by_key. Fixed, backport queued for 
  2.3 branch
- db_insert() now has array(created,modified) as default for timestamp 
  columns so that most calls can be done without that parameter
- db_update() now has array(modified) as default for timestamp column
  so that most calls can be done without that parameter
- new functions db_begin / db_commit / db_rollback - BEGIN / COMMIT / 
  ROLLBACK wrapped in a check for $CONF['database_type'] == "pgsql".
  One more step to get rid of database-specific code in all files.
- db_log(): 
  - migrated to db_insert. This should also fix some missing quoting.
  - sorted $action_list to make it more readable
  - backport queued for 2.3 branch for both changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@907 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 623d992091 functions.inc.php:
- check_domain(): don't trim() the domain - whitespace is an error.
  This catches "foo@ domain.com" that wasn't catched before.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@902 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 512c9bfb44 functions.inc.php:
- replaced deprecated split() call with preg_split()
  https://sourceforge.net/tracker/?func=detail&aid=3060495&group_id=191583&atid=937964
- added hint about probably missing php5-* packages in error messages if 
  database functions don't exist



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@892 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 4c912f1da8 list-virtual.php:
- hand over $search to smarty templates

templates/list-virtual_alias.tpl, templates/list-virtual_alias_domain.tpl:
- add search result highlighting

templates/list-virtual_mailbox.tpl:
- add search result highlighting
- move output of "Mailbox" / "Forward only" outside the foreach loop
  (was displayed once per mailbox alias target)

css/default.css:
- add style for ".searchresult"



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@868 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz c070a61ef2 functions.inc.php
- remove obsolete unlink($tmpfile) that was re-introduced by smarty merge


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@785 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 3922f6fece after an hour of debugging with Han on #postfixadmin...
functions.inc.php:
- added error message if the check_owner query returns more than one result.
  This can happen with old databases (pre-2.3) where the domain_admins table
  contains "ALL" _and_ a domain for a superadmin - which results in the
  superadmin not able to edit mailboxes etc. for this domain.
  (Error message not translatable - this is a corner case.)

list-virtual.php:
- add "invalid parameter" error message before redirecting to list-domain
  if the user doesn't have permissions for a domain


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@778 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian b1287d97e2 - big merge of Postfixadmin smarty into trunk
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@757 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 188aa2bd5c functions.inc.php:
- handle dovecot passwords without any tempfile (to prevent safe_mode issues)
  Changed based on a patch from Aleksandr @SF,
  https://sourceforge.net/tracker/?func=detail&atid=937966&aid=2890471&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@752 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 6220b6d85c after a long weekend...
list-virtual.php:
- merge search functionality into list-virtual.php (even more performant
  for domain admins now - search.php checked domain ownership after
  querying all domains...)
  (Use list-virtual.php?search=searchterm to test searching)
- allow to display mailbox alias targets in mailbox list
  Fields added to the mailbox list array:
  * goto_mailbox (mailbox (=1) or forward-only (=0))
  * goto_other (array with aliases not pointing to the mailbox)
  * (vacation alias is skipped)
  open question: is $display_mailbox_aliases = boolconf('special_alias_control')
  correct? I'm slightly confused with alias_control, alias_control_admin
  and special_alias_control...
- build mailbox query step by step instead of having several variants
  which overlap 90% (and include a high bug potential, as already
  demonstrated by me ;-)

templates/list-virtual.php
- added search result highlighting
- added displaying of mailbox aliases (goto_mailbox and goto_other)
- removed ?domain= parameter for edit-alias.php, other edit-*.php have
  to follow (otherwise we'll have to extract the domain from the address
  to avoid incorrect parameters in search mode)

functions.inc.php
- added db_in_clause() which builds a "field in(x, y)" clause for
  database queries



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@751 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 7c890a49ea postfixadmin 2.3 final(ly) :-)
- updating version number in various places


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@739 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 04b272472d support for displaying quota (dovecot 1.1 and 1.2 format)
upgrade.php
- create quota and quota2 table (upgrade_729)
- create the triggers required by dovecot (upgrade_730_pgsql)

list-virtual.php
- updated to work with both quota tables
  Patch by Varren Volz, https://sourceforge.net/tracker/?func=detail&amp;aid=2867629&amp;group_id=191583&amp;atid=937966
- changed query for 1.1 quota table to 
      WHERE [...] AND  (  $table_quota.path='quota/storage' OR $table_quota.path IS NULL  )
  This fixes https://sourceforge.net/tracker/?func=detail&aid=2794247&group_id=191583&atid=937964
  (users not shown when initial email is not sent)

config.inc.php, functions.php
- new config option $CONF['new_quota_table'] (YES means dovecot 1.2 format)
- set variables for new quota2 table

DOCUMENTS/DOVECOT.txt
- added note that quota table is automatically created
- added note about different quota tables for dovecot 1.0/1.1 and >= 1.2


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@730 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin 93b4d3e71a functions.inc.php: allow for port specification for PostgreSQL
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@717 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin c4002d5e0b functions.inc.php: fix as per Geoff Shangs report via email
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@710 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin 814539fe50 fix db_get_boolean behaviour - postgres returns "t" or "f" - and also accepts this
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@700 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin d487507e8e functions.inc.php: support base64 encoded sha1 passwords (flavour=SHA); thanks to mez@sourceguru.net
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@698 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz e46f73fed2 functions.inc.php
- replace ereg (introduced in r693) with preg_match


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@696 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 345de9214c bump up to 2.3rc7
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@694 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin f1fc057f43 fix crypt() usage - see https://sourceforge.net/tracker/?func=detail&aid=2814820&group_id=191583&atid=937964 ; thanks for the patch
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@693 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 8200ef4788 ready for 2.3rc6
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@689 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 9af0d53318 functions.inc.php: stupid syntax error; thanks David Verdier
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@686 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 36ae454ff5 remove ereg stuff
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@683 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 4f88abb0fd remove pointless ereg stuff
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@680 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin c137191ed7 lets try and get rc5 up and around
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@661 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 7480181a18 functions.inc.php:
- gen_show_status(): honor recipient_delimiter in POP/IMAP check


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@657 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz a9d9e3d96a reverting most changes from SVN r572 aka
https://sourceforge.net/tracker/index.php?func=detail&aid=2567466&group_id=191583&atid=937966
because 
- it undermines the $CONF[*alias_control*] settings more or less - 
  mailbox aliases with non-default targets are always shown in 
  the "Aliases" section - see comment from 2009-05-04 on 
  https://sourceforge.net/tracker/?func=detail&aid=1902476&group_id=191583&atid=937964
- it introduced some "funny" bugs - a nice example is
  http://sourceforge.net/tracker/?func=detail&aid=2786284&group_id=191583&atid=937964

Files / sections affected by the revert:
- list-virtual.php: all numbers (alias count etc.) correct?
  (the changes in this file are the largest ones)
- functions.inc.php: SQL queries in get_domain_properties()
- delete.php: the only change since r572 affected code that was inserted 
  in r572 (and is now deleted again) - nothing should break here
- create-alias.php: had no changes since r572 - therefore nothing should 
  break here

Exceptions (not reverted):
- edit-alias: this change looks useful (hide mailbox alias target from 
  admins if they don't have permissions to change it). The actual code 
  has changed in the meantime, but the functionality stays.
  Additionally, reverting this would be very hard or throw useful later 
  changes away.
  BUT: shouldn't the page completely forbid to edit a mailbox alias if
  the admin doesn't have permissions for it?
- functions.inc.php: comment for pacrypt() ;-)
- linebreaks in long SQL queries

Please check if everything is still working as expected (especially the domain
list and the virtual list) - I did only some quick tests.



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@652 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 9102b62a6e functions.inc.php:
- gen_show_status(): add support for recipient_delimiter when checking aliases
  This implements part (8) of 
  https://sourceforge.net/tracker/?func=detail&aid=1951926&group_id=191583&atid=937967

config.inc.php:
- add new setting $CONF['recipient_delimiter']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@650 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin bb43fdd088 functions.inc.php: reindent
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@641 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 08e54eead9 update documentation; get ready for a 2.3rc4 release
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@634 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 96985c965f debian/changelog, function.inc.php, CHANGELOG.TXT : 2.3 rc3 is almost here
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@613 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 7f4973c899 functions.inc.php: bump version number
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@591 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin c384984362 2.3rc1
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@588 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz af702c05e1 functions.inc.php, function pacrypt:
- added dovecotpw encryption support (patch from cmuelle8 (trendypack) + some fixes 
  from me, see tracker for details)
  https://sourceforge.net/tracker2/?func=detail&aid=2607332&group_id=191583&atid=937966
- replaced most "if" with "elseif" to be able to check for invalid $CONF[encrypt] settings
- added error check/message for invalid $CONF[encrypt] settings

config.inc.php:
- $CONF[encrypt]: added description for dovecot:xy
- added new $CONF['dovecotpw'] setting (path to dovecotpw binary)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@580 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 8b4e513701 see https://sourceforge.net/tracker/index.php?func=detail&aid=2567466&group_id=191583&atid=937966 - allow adding of an alias even if a mailbox already exists (e.g. allowing you to do keep+forward)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@572 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 8eafea4617 see https://sourceforge.net/tracker/index.php?func=detail&aid=2581010&group_id=191583&atid=937964 - thanks dystopian
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@567 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 68943a5477 functions.inc.php
- added comment about courier-authlib supporting only two-character salt
  (see mail from Jan Röhrich in postfixadmin-devel about r560)
- fixed vim: line - functions.inc.php uses 4 spaces
- replaced "else if" with "elseif"
- replaced tabs with spaces


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@564 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Jan Roehrich 12dc358ad0 functions.inc.php:
-  fixed some remarks in pacrypt

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@562 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 48f3be29bf CHANGELOG.TXT:
- updated with latest changes

functions.inc.php
- whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@561 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Jan Roehrich e218b81af2 config.inc.php:
- Added configuration for courier authlib authentication flavors

function.inc.php:
- changed pa_crypt to make it handle courier authlib authentication flavors

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@560 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin eb186193d4 functions.inc.php: remove dev comment (echo of sql)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@538 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin a1a81c9823 config.inc.php, functions.inc.php - add support for mysql_encrypt method for password encrpytion - useful for pam integration, apparently - see https://sourceforge.net/tracker/?func=detail&atid=937966&aid=1793352&group_id=191583
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@525 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 23afeac839 functions.inc.php / CHANGELOG.txt - bump version numbers etc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@524 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 1193e752ac functions.inc.php: reindent
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@520 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 049a9ecc96 merge patch for dovecot quota viewing - see https://sourceforge.net/tracker/index.php?func=detail&aid=2060309&group_id=191583&atid=937966 - thank you shario; sorry it took so long to merge!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@518 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 723090d6d0 add patch for domain postcreation script; see https://sourceforge.net/tracker/index.php?func=detail&aid=2508593&group_id=191583&atid=937966
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@516 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 0411a11b4c functions.inc.php
- gen_show_status(): "probably undeliverable" marker now honors catchall 
  aliases and no longer marks aliases pointing to a catchall as invalid
  https://sourceforge.net/tracker/index.php?func=detail&aid=2013772&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@480 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 0dc5163eb1 functions.inc.php:
- check_email requires global $PALANG


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@475 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 75c5c62ed0 config.inc.php, functions.inc.php, templates/list-virtual.php:
- dropped $CONF['show_custom_count'], it can easily be calculated with
  count($CONF['show_custom_domains']). This fixes part (6) of
  https://sourceforge.net/tracker2/?func=detail&aid=1951926&group_id=191583&atid=937967

config.inc.php:
- added some comments explaining $CONF['show_undeliverable_exceptions'] 
  and $CONF['show_custom_domains']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@471 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 45b2df237c functions.inc.php: fix alias creation - 0 & -1 confusion again
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@459 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 60d1b54aaa functions.inc.php: Fix mailbox check_mailbox() routine - if the domain has 0 for mailbox count it should allow unlimited mailboxes (not disable - which is -1)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@455 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin c81376bb1d patch from https://sourceforge.net/tracker/index.php?func=detail&aid=2059427&group_id=191583&atid=937964 ; thanks
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@449 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin ccc1b90236 imap-prefix patch - see https://sourceforge.net/tracker/index.php?func=detail&aid=2049852&group_id=191583&atid=937964 , apparently useful for courier
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@444 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 3e5549bfad functions.inc.php:
- move DNS checks from check_email() to check_domain()
- add clear error message on non-resolvable domains (using flash_error() -
  this is probably not the best solution, but better than nothing)
- made error messages translatable

create-domain.php:
- avoid duplicated call to check_domain (to avoid duplicated error message)
- domains are now DNS-checked on creation - see the changes in check_domain()
  in functions.inc.php

languages/*:
- added error messages for the above changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@429 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 544c7ebe82 functions.inc.php: reindent (as per inline vim settings) and add in flash_error calls when validating an email address (I suspect the strings need changing as per translation issues)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@426 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5fa76d73d9 config.inc.php + all files related to alias domains
- added $CONF['alias_domain'] switch to disable alias domains
  (includes lots of whitespace changes in list-virtual.php)

functions.php:
- added some comments to boolconf()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@419 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 711df82fc8 function.inc.php
- new function boolconf() for easier handling of boolean $CONF settings


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@418 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 532675ab3b functions.php
- removed (now) unused function table_by_pos
  I'm quite sure we won't need it again, basically it answered questions 
  like "what's the 3rd table in $CONF['database_tables']?"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@407 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz add0c86cad Applied patch from Michiel van Baak (mvanbaak)
https://sourceforge.net/tracker/index.php?func=detail&aid=1923030&group_id=191583&atid=937966
- added quota parameter in mailbox_postcreation() hook
- new hook to update the quota after editing a mailbox

Modifications to the patch:
- made $quota an required parameter in the mailbox_postedit and 
  mailbox_postcreation functions
- the scripts always get the quota as 4th parameter. In case $quota 
  is <= 0, it is set to 0.


config.inc.php:
- new option $CONF['mailbox_postedit_script']

edit-mailbox.php:
- call mailbox_postedit() after editing the mailbox

functions.inc.php:
- added $quota parameter to mailbox_postcreation()
- new function mailbox_postedit()

create-mailbox.php:
- added $quota parameter on mailbox_postcreation() call


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@373 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 919638efdf create-mailbox.php:
- create subfolders _after_ sending the welcome mail

functions.inc.php:
- sleep(1) before creating subfolders for a newly created mailbox

This fixes subfolder creation when courier is used.
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1970684&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@369 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 370e8fef6c inital merge of lenix's patch for domain aliasing; I think list-virtual.php needs some attention, but I've run out of time right now; upgrade.php has been updated to create the tables correctly (tested on pgsql and mysql); functionality or php scripts not tested yet
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@363 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 98e9da8ea5 functions.inc.php: 2.2.0....
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@355 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 0d559f2d57 functions.inc.php: checkdnsrr may not exist; try and be graceful
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@353 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 2f220c9b32 functions.inc.php: fix urls
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@311 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Greg 9f7d4f14e9 simplification and (hopefully) bug free fix for POP/IMAP box marking
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@310 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Greg 880881c2a2 fixed an error that would not identify POP/IMAP accounts when a mailbox forwards to other destinations as well.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@308 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 95057caa43 functions.inc.php:
- check_language(): use global $supported_languages so that we don't 
  have to maintain the list of supported languages at different places
  (this finally enables users to choose japanese language at login)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@307 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz e16334361c functions.inc.php
- fixed wrong comment about check_language parameter


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@283 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz f217f0c1bb Summary: Added language selector to login form
functions.inc.php:
- function check_language
  - new optional parameter $use_post (needed by login.php)
  - check for language cookie
  - check for $_POST['lang']
  - removed substr() call because it made pt-br translation unuseable
- new function language_selector
  - returns a HTML dropdown language selector
- new function safecookie
  - similar to safeget, but for cookies

templates/login.php, templates/users_login.php:
- display language selector dropdown

login.php, users/login.php:
- check for selected language
- set cookie if user selected non-default language

languages/language.php: (NEW FILE)
- list of supported languages
- language names taken from phpMyAdmin login form

common.php:
- include languages/language.php
 


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@280 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5f7dcc18d5 functions.inc.php
- allow longer TLDs (.museum, .travel)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@214 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz a00d456084 functions.inc.php
- encode_header(): made charset parameter optional, defaults to utf-8
- db_delete(): escape_string() $where and $delete

create-mailbox.php:
- always encode mail header and insert Content-Type etc. headers
  (previous code never did this, $PALANG['charset'] is not set in any
  language. so this code part was never used)

sendmail.php:
- always encode mail header and insert Content-Type etc. headers
  (had the same bug as create-mailbox.php)
- merge GET and POST

These changes fix
http://sourceforge.net/tracker/index.php?func=detail&aid=1811214&group_id=191583&atid=937964



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@199 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 61713c260b OOps. Removed forgotten debugging code again.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@186 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5acd24515f functions.php:
- new function db_update ($table, $where, $values, $timestamp = array())
  to update a database entry with the values given as array
- added optional $timestamp parameter to db_insert()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@184 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin f909eb53a2 functions.inc.php: change doc block formatting
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@179 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz e6e0e37a5c - added function db_insert()
- added optional $ignore_errors parameter to db_query()
- db_query() now returns 'error' as additional key in the result array
- renamed $setup to $ignore_errors in db_connect()
- added fallback to $table_key to table_by_key()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@171 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin c3ae9dd9db functions.inc.php: code cleanups / documentation fixes etc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@162 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 4a35f02765 - new functions safeget, safepost, safeserver
Action: get value from $_GET/$_POST/$_SERVER[$param], otherwise $default
  Call: $param = safeget('param')   # instead of $param = $_GET['param']   - or -
        $param = safeget('param', 'default')
  useful to avoid "undefined index" warnings ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@159 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz eab71c6ba5 - escape_string(): preserve array keys when escaping arrays
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@138 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 2d65b8b858 - setup.php now has a "create superadmin" form
- completely reworked HTML code in setup.php
- moved admin creation code from create_admin.php to functions.php,
  function create_admin
- several related changes in functions.inc.php:
  - use table_by_key() directly instead of the cached variables (which
    are empty if config.inc.php was not read before functions.php)
  - add an additional (optional) parameter $setup to db_connect, changed
    many die(msg) calls to $error_message .= msg.
    If $setup is given, the return value is array($link, $error_text)
    instead of $link
  - db_connect now checks for invalid $CONF['database_type']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@135 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 2ffb2ef3e6 functions.inc.php: reduce global usage
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@114 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin f854128947 functions.inc.php: mysqli is a valid database_type as well!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@112 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin dc51d62e15 update license headers
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@107 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin f2bf3cdf97 functions.inc.php: remove optional parameter for get_domains_for_admin()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@104 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin b15d558c81 functions.inc.php: fix escape_string to handle arrays, move magic_quotes stuff to common.php; add flash message stuff (See also header.php)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@101 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 1b603782d0 - fix: added edit_mailbox as allowed log action
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@99 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 8e88a41691 - added missing "global $CONF" in authentication_require_role
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@94 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 075d15b4b1 db_log patch from amsys - make db logging translatable
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@90 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin b947f120b4 functions.inc.php: typo fix
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@77 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 5c372ead52 functions.inc.php: add a db_get_boolean($bool) function to handle the 0/1/False/True stuff for MySQL&PostgreSQL
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@73 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 4eb83c4bdc final set of refactoring patches
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@70 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 69de1f06f0 functions.inc.php: fix incorrect usage of mysqli_error(...)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@65 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin fd3c471126 functions.inc.php: enable md5 password hashing (thanks to Levente Farkas (lfarkas) on the forum)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@64 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin f7628dea60 functions.inc.php: unicode fix from amsys
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@62 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin e7436140e3 functions.inc.php: unicode patch from amsys (thank you) - see http://sourceforge.net/tracker/index.php?func=detail&aid=1798757&group_id=191583&atid=937966
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@61 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Greg 411e4fae3c Search highlights matches. Click on log entries for full data field pop-up. Other bug fixes.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@49 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Greg 97aeb7a567 Added optional feature to indicate broken aliases and where mailboxes deliver to. Includes
new language variables:
$PALANG['pStatus_undeliverable'] = 'maybe UNDELIVERABLE ';
$PALANG['pStatus_custom'] = 'Delivers to ';
$PALANG['pStatus_popimap'] = 'POP/IMAP ';

Some bug fixes. Maybe some new bugs added.



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@46 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin fc4b601b39 functions.inc.php: ensure link is open for when we do escape_string stuff; update pg_escape_string usage for php > 5.2.0
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@32 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
David Goodwin fc6013cb2a functions.inc.php: reindent, ensure alias_pgindex_count is initialised in get_domain_details()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@21 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
David Goodwin b933b9186c functions.inc.php: remove dead code - active and backupmx are not selected by the query, so are not present in the results, and therefore cause php errors as they are not present in the array
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@20 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
Greg cecbdd1660 Greatly enhanced the multi-page experience for list-virtual.php and overview.php
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@15 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
Greg c7e49d0631 Allows for tld of 2-6 characters
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@6 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
Greg 9481a093a6 user Autoresponse edits function like the admin interfaces
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@5 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
Greg d7cca670cb patches by Christian Boltz applied
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@3 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago
Mischa Peters 85dc57beee Initial Import in SourceForge
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1 a1433add-5e2c-0410-b055-b7f2511e0802
18 years ago