0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
Commit Graph

862 Commits

Author SHA1 Message Date
Christian Boltz
74fa966522 fix svn:keywords
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@974 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-27 23:06:57 +00:00
Christian Boltz
240079c16f smarty.inc.php:
- set $this->template->allow_php_tag = true instead of editing 
  smarty/libs/Smarty.class.php after every smarty upgrade

added smarty/smarty_version with:
- a note about the current smarty version
- a note about additional files not part of the smarty package


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@973 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-27 22:56:05 +00:00
Christian Boltz
82778dba1e Update smarty from 3.0.5 to 3.0.7
See http://smarty-php.googlecode.com/svn/trunk/distribution/change_log.txt
for a list of all changes.

New files:
libs/sysplugins/smarty_internal_get_include_path.php
libs/plugins/shared.mb_str_replace.php

Deleted files (no longer shipped with smarty):
libs/plugins/function.popup.php
libs/plugins/function.popup_init.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@972 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-27 22:43:46 +00:00
Christian Boltz
476035efd1 Legal stuff: add notes about the licenses of the libraries we use to LICENSE.TXT
Also added smarty/COPYING.lib (contains the smarty license - LGPL3)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@971 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-27 22:24:51 +00:00
Christian Boltz
3f9f4b5ee7 vacation.pl:
- add date range check to all queries

Patch by Colin Viebrock (cviebrock@SF) -
https://sourceforge.net/tracker/?func=detail&aid=3152571&group_id=191583&atid=937964

Additionally added a TODO note that we should use a function instead of
having 3 copies of the query in the code.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@970 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-27 21:35:21 +00:00
Christian Boltz
acfc4e57f8 upgrade.php:
- PostgreSQL: change domain.quota, domain.maxquota and mailbox.quota to bigint

reported by oliver (n0d3 @SF), 
https://sourceforge.net/tracker/?func=detail&aid=3057081&group_id=191583&atid=937964

Note: MySQL has bigint field since r169.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@968 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-18 21:59:42 +00:00
Christian Boltz
ff84852775 css/default.css:
- center main menu - based on a patch by Chris H. (dharmachris @SF)
  https://sourceforge.net/tracker/?func=detail&aid=3186087&group_id=191583&atid=937964
- some whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@967 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-18 20:32:14 +00:00
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
2011-02-15 22:20:27 +00:00
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
2011-02-15 21:59:03 +00:00
Christian Boltz
e3b25d99b4 smarty.inc.php:
- use correct variable name instead of $smarty in __construct()
- everything else in this commit: whitespace changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@964 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-14 18:32:36 +00:00
Christian Boltz
4be543e313 adminlistadmin.tpl, adminlistdomain.tpl:
- fix undefined variables (by using $PALANG.* instead)

footer.tpl:
- remove undefined variable because the correct one is already included


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@963 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-14 18:30:13 +00:00
Christian Boltz
07c21cfa07 VacationHandler.php:
- replaced deprecated split() call with explode()
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3179951&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@962 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 23:59:45 +00:00
Christian Boltz
1de551320b DomainHandler.php:
- implement delete()

Note that this is a dummy function at the moment. It doesn't work,
it just errors out with "not implemented yet" ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@961 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 23:35:49 +00:00
Christian Boltz
2668f5a6c3 shells/domain.php: delete handling, adopted parameter changes
- adopted to changed parameters in DomainHander class
- implemented delete handling


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@960 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 23:33:52 +00:00
Christian Boltz
562842f154 DomainHandler.php:
- return true/false instead of shell-style 0/1


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@959 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 23:15:40 +00:00
Christian Boltz
d21bf2e82d DomainHandler.php: proofreading results: various small changes
- use $this->username for the domain name (I know the variable name is
  confusing, but I'd like to be consistent with the other classes)
- remove $domain parameter in add() and view(), use $this->username instead
- escape domain in view() for select query
- removed unused "global $config" in view()
- remove superfluous created/modified arrays in db_insert calls
- added some TODO notes
- changed db_log to 'CONSOLE' instead of $this-username for consistency
  with other classes. Long-term fix is to remove the first parameter of
  db_log and let it detect the username automatically.
- various whitespace fixes



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@958 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 23:01:44 +00:00
Christian Boltz
a93d63a692 smarty.inc.php: interface cleanup etc.
- move initialisation of $smarty->template_dir, compile_dir and 
  config_dir into __construct() of PFASmarty class
- remove usage of /tmp/postfixadmin_templates_c/ to avoid security
  risks (symlink attacks etc.)
- remove __set, __get and __call from PFASmarty class to ensure we
  have a clearly documented interface to the template layer
- whitespace changes (mostly in select_options())
- added vim: line

See also the discussion about the r949 commit in postfixadmin-devel
for details.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@957 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 22:15:22 +00:00
Christian Boltz
cebf126eff AliasHandler.php:
- escape $address in is_mailbox_alias()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@956 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 17:10:51 +00:00
Christian Boltz
e8beac17d0 index.tpl:
- footer.tpl was accidently lost in r951, added again


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@955 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-13 15:56:43 +00:00
Christian Boltz
53ecb4cb50 ru.lang:
- translation update by Pavel Usischev (pusischev @SF)
  https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3178905&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@954 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-12 17:47:44 +00:00
David Goodwin
b0bd8cd1f5 see changeset:952 ... move php code out of template into here
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@953 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:31:12 +00:00
David Goodwin
a7942d7059 move this to common.php; i dislike inline php in templates
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@952 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:30:46 +00:00
David Goodwin
d798138d1d i prefer english... ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@951 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:30:17 +00:00
David Goodwin
43a150941b check if a variable is populated...
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@950 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:29:36 +00:00
David Goodwin
7424cb0c1a remove strict standards issue with redefinition of smarty::assign() with different parameters than parent class; ideally I should not put the __get/__set/__call methods in here as living without them would reduce our dependency on smarty, but meh (PFASmarty should stil appear and BEHAVE like a Smarty object, it just technically is not one - it is just using one
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@949 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:29:13 +00:00
David Goodwin
cf22f1dfd4 reindent; give tMessage a default value (undefined var etc)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@948 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:27:19 +00:00
David Goodwin
834f533371 fix some undefined variables
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@947 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:26:17 +00:00
Christian Boltz
515fa83809 upgrade.php: add vacation.activefrom/activeuntil even for updates from 2.3.x
- MySQL only allows one column with DEFAULT CURRENT_TIMESTAMP per table
  -> introduce {DATE} with DEFAULT 2000-01-01 as workaround
  -> GingerDog, please check if the PostgreSQL variant of {DATE} is valid
- disable upgrade_727_mysql because
  - function number is too small for upgrades from 2.3.x
  - MySQL only
  - it creates some tables PostfixAdmin doesn't use
- new function upgrade_946 to add activefrom/activeuntil fields to the
  vacation table (previously done in upgrade_727_mysql)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@946 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-06 19:07:44 +00:00
Christian Boltz
fc26618140 upgrade.php: add "modified" column to vacation table, various fixes and new helper functions
- fix _pgsql_field_exists and _mysql_field_exists to work with 
  non-default table names
- new function _db_field_exists as database-independent wrapper for 
  _*_field_exists
- new function _db_add_field to add a field to a table
- new function printdebug for debug output (grey text)
- define {DATECURRENT} for timestamp fields (avoids lots of duplication)
  -> @GingerDog: please check if the PostgreSQL statement is correct!
- upgrade_945: add a 'modified' column to the vacation table
- various small changes (whitespace, comments, TODO notes etc.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@945 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-06 17:42:47 +00:00
Sebastian
d3e68fdc8a two small bugfixes:
- syntax error
- fix commentation marks

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@944 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-05 10:54:59 +00:00
Christian Boltz
fb6ee0ea9a sk.lang:
- big translation update by Ondrej Zary (rnbw @sf) - thanks!
  https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3162501&group_id=191583

*.lang:
- added pViewlog_action_create_domain, pViewlog_action_delete_domain and
  pViewlog_action_edit_domain (was only in en.lang)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@942 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-01 22:35:54 +00:00
Christian Boltz
412fe0fa48 UPGRADE.txt:
- renumbering headlines


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@941 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-08 19:53:37 +00:00
Christian Boltz
ea6a7cef79 footer.tpl: remove escaping of $CONF[footer_link]
url-escaping $CONF[footer_link] makes the link look like
"http%3A%2F%2Fexample.com". Browsers interpret this as file name 
relative to the current domain and directory, not as full 
http://example.com URL. Removed escaping.

Thanks to jan-kruis @SF for pointing this out.
https://sourceforge.net/tracker/?func=detail&aid=3153035&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@940 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-07 20:52:34 +00:00
Christian Boltz
02391146b2 AliasHandler.php: fix false positives in is_mailbox_alias and various
small fixes and cleanups

- get(): whitespace fix
- is_mailbox_alias(): avoid false positives if $address is a mailbox,
- is_mailbox_alias(): remove disabled (commented) old code
- update(): remove unused variable $true
- delete(): removed superfluous parameter in $this->get() call
- delete(): removed outdated FIXME note


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@939 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-06 20:40:34 +00:00
Christian Boltz
ccda9cd995 VacationHandler.php proofreading results: small changes and some TODO notes
- added several TODO notes
- use db_insert/db_update/db_delete instead of raw queries
- get_details(): error check first (for better readable code),
  whitespace fix
- getVacationAlias: str_replace is enough


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@938 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-06 20:23:11 +00:00
Christian Boltz
fc4b51d938 various documentation updates:
INSTALL.TXT:
- added a note to read the official PostfixAdmin documentation first,
  and that "external" HOWTOs on the web are often outdated or incomplete.
  That might sound selfish, but would already have saved several users
  some time.
- updated some links
- added link to the wiki
- added hint about config.local.php
- added note about write access for templates_c directory for www-data

UPGRADE.txt
- added note about setup.php?debug=1
- added note about postfix config update (alias domains)
- added note about templates_c permissions


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@937 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-06 20:01:21 +00:00
Christian Boltz
80412e4d60 list-virtual_alias.tpl: fix editing of aliases with $CONF[special_alias_control] == NO
- with special_alias_control = NO, no alias was editable.
  Fixed - only default_aliases should be locked (looks like == instead 
  of === needs to be used in smarty for bool comparison)
- merged conditions, simplified code


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@936 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-05 20:57:53 +00:00
Christian Boltz
0afa2957e6 config.inc.php:
- better documentation for $CONF[alias_control], $CONF[alias_control_admin]
  and $CONF[special_alias_control] because the existing comments were 
  confusing (as pointed out by libertytrek in #postfixadmin)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@934 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-02 21:32:48 +00:00
Valkum
f73c7cbad2 added some things to model class
added user_model.php for user handling
added user_controller.php for controlling user missgin view for output.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@933 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-02 14:16:19 +00:00
Valkum
0ca6c9f239 Done is_mailbox_alias todo. Now it checks against the database.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@932 a1433add-5e2c-0410-b055-b7f2511e0802
2011-01-01 04:07:39 +00:00
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
2010-12-31 20:13:53 +00:00
Christian Boltz
9aa96dabd0 (mostly) make CLI "alias delete" working
shells/alias.php:
- execute still called help() instead of __handle()

model/AliasHandler.php - delete():
- remove useless $address parameter from delete() (we have $this->username)
- added error messages
- fixed variable names for db_log

Reason for the "mostly":
The $this->is_mailbox_alias() in delete() always returns true and therefore
forbids deletion.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@930 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-31 19:23:31 +00:00
Valkum
20e14ad664 Fixed CRYPT
added CRAM-MD5


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@929 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-31 17:39:22 +00:00
Valkum
3c7d04e92a Own Crypt Library. Independence of dovecotpw/doveadm pw
added some structure and tried to impelement CRYPT.

Dovecots Version is here (crypt_generate() ) http://hg.dovecot.org/dovecot-1.2/file/84373d238073/src/auth/password-scheme.c

Can someone help me with creating the lib?



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@928 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-31 04:38:00 +00:00
Christian Boltz
f3450acd0a shells/alias.php:
- fixed wrong variable name for user input


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@927 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-30 23:13:41 +00:00
Christian Boltz
0f4f202371 create-mailbox.php:
- let smtp_mail() construct the mail headers


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@926 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-30 22:40:10 +00:00
Christian Boltz
fe2d4ba129 moved scripts/models-ext/* to model/
- moved scripts/models-ext/DomainHandler.php to model/
- deleted redirect scripts in scripts/models-ext/ (UserHandler.php, 
  AliasHandler.php)
- changed scripts/common.php to include the files from ../model/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@925 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-30 22:34:59 +00:00
Christian Boltz
221c18bbc3 AliasHandler.php:
- rewrote delete(): 
  - error checks first (better readable than nested if blocks)
  - use db_delete
  - db_log() alias deletion
- removed outdated comments
- some whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@924 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-30 22:26:17 +00:00
Christian Boltz
b9e562f426 INSTALL.TXT:
- fix example /etc/passwd line (had too many fields)
- moved no_address_mappings to the smtpd on port 25
- removed no_unknown_recipient_checks on port 10025


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@923 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-30 20:32:26 +00:00
Valkum
3004a6cafc added some snippets for new model layout. with new database framework
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@921 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-29 12:27:12 +00:00