0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
Commit Graph

771 Commits

Author SHA1 Message Date
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
Valkum
c6771f7f04 some todos done or partially done
-added alias delete function
-remove silly password function in domain and alias

-changed some $this->err to $this->error
-error ends with stop(1) which returns 1 in *unix shells



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@920 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-28 23:49:14 +00:00
Valkum
320a9331f1 added unix return code in user add. please check it!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@919 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-27 15:44:22 +00:00
Valkum
f98dfda9ed added some comments
missed in the previous commit


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@918 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 22:00:22 +00:00
Valkum
02868eb680 Added some TODOs and MARKs
Some lines in the shells are duplicate



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@917 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 20:56:32 +00:00
Christian Boltz
9c5084af04 model/UserHandler.php: fix verifying old password in change_pw()
- if you want to verify the old password, you should compare it against 
  the OLD and not the NEW password ;-)
- fix database calls

In other words: changing the password in users/password.php works again ;-)

users/password.php:
- switch from obsolete change_pass() to change_pw()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@916 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 20:35:00 +00:00
Christian Boltz
8e62ef1630 AliasHandler.php proofreading results: various fixes and changes
- pass $username through strtolower()
- get(): error check first for better readability (avoids long if block)
- get(): fixed a forgotten return behaviour change
- get(): renamed $new_list to $filtered_list (self-explaining code)
- update(): migrated to new return behaviour of get()
- update(): use db_update etc.
- some minor changes
- added various TODO notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@915 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 19:48:10 +00:00
Christian Boltz
f6cb87eb6e users/edit-alias.php:
- another fix for fForward_and_store on validation errors


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@914 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 19:37:27 +00:00
Christian Boltz
da3ef2e1c0 shells/alias.php:
- changed AliasHandler->get call - it does not need the address as parameter
- adopted to true/false return values
- some minor changes and TODO notes

models-ext/AliasHandler.php
- deleted, replaced with a redirect to ../model/AliasHandler.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@913 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 00:34:43 +00:00
Christian Boltz
42573d3e4e model/AliasHandler.php:
changed behaviour of get()

- get() now returns only true (success) / false (failure) instead of
  the alias list
  (result of partly merging in scripts/models-ext/AliasHandler.php)
- new method result() to get the real result (alias targets)
- added TODO on if(sizeof($addresses) == 0) - this should never happen

model/VacationHandler.php:
- updated for new AliasHandler bevaviour

xmlrpc.php:
- updated for new AliasHandler bevaviour
- switched from obsolete change_pass to change_pw method


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@912 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 00:20:12 +00:00
Christian Boltz
5381f96426 users/edit-alias.php: prepared for updated AliasHandler, small fixes
- prepared for updated AliasHandler from scripts/
- user could cause an empty alias with a trick (or form manipulation).
  Checking forward_and_store for != YES instead of == NO fixes this.
- don't replace spaces in the middle of an (BTW: invalid) alias target
- preserve user input on validation error
- allowed displaying of multiple error messages
- removed unused $_POST[fVacation] variable
- some whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@911 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-26 00:00:24 +00:00
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
2010-12-25 22:59:11 +00:00
Christian Boltz
f963cc33f1 scripts/shells/user.php:
- adopted return value checks to true/false instead of shell-like 0/1
- fixed some messages in interactive mode
- various minor fixes
- added some TODO notes, but didn't do a full proofreading

scripts/models-ext/UserHandler.php:
- deleted, replaced with a redirect to /model/UserHandler.php

scripts/common.php, scripts/shells/shell.php:
- replaced obsolete "... =& new ..." with "... = new ..."


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@909 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 22:38:09 +00:00
Christian Boltz
1a0d584bf9 model/UserHandler.php: proofreading, lots of changes and added TODO comments
- change_pass() now returns the return value of change_pw()
- made most variables un-escaped (as expected by db_insert/db_update/
  db_delete). This means they HAVE TO BE ESCAPED when using them in a
  hand-written query. (Error messages also need escaping - the
  backslashes from escape_string wouldn't help there anyways.)
- escaped variables renamed to $E_whatever
- changed all return values to true (success) and false (failure)
  instead of shell-like 0 (success) and 1 (failure)
- removed unused global $config at various places
- removed timestamp columns from db_insert and db_update call where they
  match the default
- added db_log() for some (but not all) failures
- honor $CONF[maildir_name_hook] when creating a mailbox
- splitting a mail address is now done with list(...) = explode(...)
- switched to db_begin(), db_commit(), db_rollback()
- let smtp_mail create the mail header
- added missing db_commit in delete()
- various minor fixes, code cleanup, comments and TODO notes

To sum it up: all code in UserHandler.php that does not have a TODO
attached should be fine :-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@908 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 22:29:44 +00:00
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
2010-12-25 22:04:16 +00:00
Christian Boltz
36bdb2fbd0 postfixadmin-cli:
- don't clear the screen at startup


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@906 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 16:57:30 +00:00
Christian Boltz
bf17e00daf templates_c:
- updated svn:ignore - the new smarty version seems to use different filenames


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@905 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 15:06:05 +00:00
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
2010-12-25 14:57:35 +00:00
Christian Boltz
f4957b8bb2 edit-alias.php:
some small fixes that came up while integrating the multiple alias
target patch from anexius (r898 [2.3]/r900 [trunk]):

- replace spaces only at the start and end of a line, not in the
  middle of an (BTW: invalid) mail address
- prevent input data loss on validation errors
- allow multiple error messages (separated by <br />)
- removed some obsolete comments


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@901 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 14:50:26 +00:00
Christian Boltz
a0fbff5377 create-alias: support multiple alias targets
- support multiple alias targets, patch by anexius@SF,
  http://sourceforge.net/projects/postfixadmin/forums/forum/676076/topic/4004442
  The patch fixes
  https://sourceforge.net/tracker/?func=detail&aid=2706290&group_id=191583&atid=937964

additional small fixes:
- replace spaces only at the start and end of a line, not in the
  middle of an (BTW: invalid) mail address
- allow multiple error messages (separated by <br />)
- prevent input data loss on validation errors




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@900 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-25 14:26:00 +00:00
Christian Boltz
48af3c856e UserHandler.php: merge in changes from scripts/models-ext/UserHandler.php
- merged in all new functions and changes (by valkum + some bugfixes 
  and notes from me) - for details see r831, r888 and r891 of 
  scripts/models-ext/UserHandler.php
- re-added change_pass() function (was removed/renamed by valkum) for 
  backward compatibility. 
  IMPORTANT: change_pass will only exist temporarily and is deprecated.
  Besides that, the new implementation has different return values etc.
  so existing code might break already.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@896 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-17 22:53:46 +00:00
Christian Boltz
2f259742f5 upgrade.php:
- replaced deprecated split() with explode()
- added SVN $Id header


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@894 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-16 00:30:21 +00:00
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
2010-12-15 23:17:08 +00:00
Christian Boltz
c6425f695d UserHandler.php, DomainHandler.php
- db_insert and db_delete need the default table name as parameter
  ('alias', not $table_alias aka table_by_key('alias') )

DomainHandler.php
- removed now unused $table_domain and $table_alias



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@891 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-09 00:33:46 +00:00
Christian Boltz
d0a3cd62e8 overview-get.tpl:
- removed a space that caused a smarty syntax error


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@890 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-02 21:38:51 +00:00
Christian Boltz
c1d5b7da0e nb.lang:
- translation update by Odd Henriksen (oddhenriksen @SF)
  https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3121434&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@889 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-29 15:49:33 +00:00
Christian Boltz
fb6ed610fa UserHandler.php:
- add some FIXME and TODO notes

UserHandler.php, AliasHandler.php:
- whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@888 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-26 23:19:44 +00:00
Sebastian
1ad8eafdff - add missing Smarty plugin
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@887 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-23 19:11:37 +00:00
Sebastian
cc3972a3c5 - Smarty 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@886 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-23 19:07:07 +00:00
Sebastian
07714cd3c7 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@885 a1433add-5e2c-0410-b055-b7f2511e0802 2010-11-23 19:04:16 +00:00
Sebastian
6ad87e2b7a - prepare for Smarty Update 2.6 -> 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@884 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-23 19:03:30 +00:00
Sebastian
a057830b84 - make template Smarty >= 3.x compatible. Tested with Smarty 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@883 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-23 18:56:12 +00:00
Christian Boltz
e986ba2daa vacation.pl:
whitespace fixes only:
- remove spaces at the end of the line
- replace some tabs with spaces


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@882 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-01 15:48:38 +00:00
Christian Boltz
70db729373 vacation.pl:
some changes after using perlcritic.org - in detail:
- removed unused variable $spam
- use ':encoding(UTF-8)' instead of ':utf8' to validate input against 
  invalid utf8 sequences
- foreach creates its own instance of $item - marking it with "my $item"
- replaced lots of "..." with '...'

BTW: Thanks to the nice guy who recommended perlcritic.org at the 
openSUSE conference!


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@881 a1433add-5e2c-0410-b055-b7f2511e0802
2010-11-01 15:46:16 +00:00
David Goodwin
648cf52972 updating with build deps
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@880 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-17 12:17:48 +00:00
David Goodwin
cc713d8c63 debian/patches/: fix patch which was broken by a previous change to config.inc.php
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@879 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-17 12:04:35 +00:00
David Goodwin
e6224e47ad fix dpkg-buildpackage command
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@878 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-17 11:56:53 +00:00
David Goodwin
d257fc53d1 README.txt: added as per cboltzs subtle irc hint
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@877 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-16 22:01:59 +00:00
Christian Boltz
31821dd69b POSTFIX_CONF.TXT:
- fixed filename for quota


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@876 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-15 23:59:39 +00:00
Christian Boltz
3e69b1d0dc vacation.pl:
- drop unneeded backslashes. The first one caused logging of "$email" 
  instead of the variable content, the others are just cosmetical.
  Reported by Johan Meiring (jmeiring)
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3086899&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@875 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-13 23:51:12 +00:00
Christian Boltz
e99547a06c list-virtual.php:
- fix displaying of 'modified' column for aliases when using postgres
  (bugreport mailed by Dominic, neocoretech @SF)
- drop MySQL variant of the alias query, the fixed postgres variant works for
  both
- fixed wrong position of $sql_where (search string) - must be outside 
  the sub-query
- escape search string in page browser - even if it is unlikely that enough
  mail adresses contain funny chars to let the pagebrowser appear ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@874 a1433add-5e2c-0410-b055-b7f2511e0802
2010-10-12 20:45:24 +00:00
Christian Boltz
dc4667a4cb config.inc.php:
- fixed parameter description of $CONF['domain_postcreation_script']
  and $CONF['domain_postdeletion_script']
  reported by Aleksey Chudov (alekseyc)
  https://sourceforge.net/tracker/?func=detail&aid=3075955&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@873 a1433add-5e2c-0410-b055-b7f2511e0802
2010-09-30 22:11:18 +00:00