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

1359 Commits

Author SHA1 Message Date
Christian Boltz
8c139c95d6 vacation:
restrict reply type to a list of options ($CONF[vacation_choice_of_reply]),
remove input field for custom interval


config.inc.php:
- change $CONF['vacation_choice_of_reply'] to [seconds] => [$PALANG label]
  (note: reply to every mail is commented by default because it can be
  annoying. Admins will have to explicitely add/enable it in their config.)
- remove $CONF[vacation_replytype_default]
- update comment about dovecot:* for $CONF[encrypt]

*.lang:
- add texts for reply types

VacationHandler.php:
- remove reply_type at various places
- set_away(): remove reply_type from list of function parameters

templates/vacation.tpl:
- update reply type dropdown for the changed $CONF['vacation_choice_of_reply']
- remove the input fields for custom reply delay

vacation.php:
- restrict reply type to a list of options ($CONF[vacation_choice_of_reply])
- if vacation is disabled, but old values are stored in the database,
  change the activeFrom and activeUntil date to today to avoid users
  have to scroll through the calendar a lot

xmlrpc.php:
- update set_away() call to match the removed parameter

upgrade.php:
- comment out upgrade_1345_mysql() which created the reply_type and 
  interval_time fields in the vacation table in mysql
- add upgrade_1610() to add the vacation.interval_time field


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1610 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-22 16:50:55 +00:00
David Goodwin
99f871d45d spelling fixes; make $friendly_name a configuration option (From: Nice Name <someone@domain.com> control)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1609 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-15 21:36:00 +00:00
Christian Boltz
31467479b5 CHANGELOG.TXT:
- whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1608 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-09 23:42:05 +00:00
Christian Boltz
fbfd7beb1d CHANGELOG.TXT:
- big update with all changes since 2.3.x (about 300 lines!)
- starts with a TL;DR summary ;-)
- still includes some details that need to be checked or finetuned
  (search for "***")


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1607 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-09 23:24:34 +00:00
Christian Boltz
77c0fbcb22 upgrade.php:
- upgrade_729 - add comment about r1605 changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1606 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-09 22:10:55 +00:00
Christian Boltz
975956b73e upgrade.php:
- change {BIGINT} to include "NOT NULL DEFAULT 0"
- add {INT} (not used anywhere yet)
- upgrade_729:
  - quota2 table: change "{BIGINT} NOT NULL DEFAULT 0" to "{BIGINT}" to 
    match the above change
  - note: quota table created with old versions of upgrade.php will not 
    have explicit "NOT NULL DEFAULT 0" for the "current" field 
    (shouldn't hurt)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1605 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 22:12:24 +00:00
Christian Boltz
8d99a8a9fb DomainHandler:
- initStruct(): set valid bool default for backupmx


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1604 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 21:30:30 +00:00
Christian Boltz
635eed201f xmlrpc.php:
- setAway(): remove superfluous $reply_type
  (https://sourceforge.net/p/postfixadmin/patches/113/)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1603 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 21:03:38 +00:00
Christian Boltz
cf8ccc167f xmlrpc.php:
- setAway(): add (optional) new parameters for reply_type, 
  interval_time, activeFrom and activeUntil
- change $_SESSION['username'] to $_SESSION['sessid']['username']
  (that's what postfixadmin expects)

Based on a patch from Norm Brandinger,
https://sourceforge.net/p/postfixadmin/patches/113/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1602 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 20:13:36 +00:00
Christian Boltz
252ae047d5 various files:
- get rid of global $table_* variables, use table_by_key() instead



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1601 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 19:41:01 +00:00
Christian Boltz
9f062cf181 login.php, users/login.php
- error_log() failed login attemps
  https://sourceforge.net/p/postfixadmin/feature-requests/111/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1600 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 18:45:26 +00:00
Christian Boltz
a9e0638d82 postfixadmin-cli.php:
- update help()
- comment out commands() - it's outdated and now unused


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1599 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 16:32:14 +00:00
Christian Boltz
e2658394a1 vacation.pl:
- encode subject
  https://sourceforge.net/p/postfixadmin/bugs/272/
  https://sourceforge.net/p/postfixadmin/patches/119/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1597 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-01 23:30:58 +00:00
Christian Boltz
beffb3ec85 r1595 accidently included more changed files than it should.
This commit contains some dummy changes to get a proper changelog
attached to those files.

VacationHandler:
- (r1595) rewrite based on PFAHandler (not useable yet)
- (this commit) add a dummy init() function that calls die()

DOCUMENTS/DOVECOT.txt:
- (r1595) TODO note
- (this commit) remove the TODO note again

CHANGELOG.TXT:
- (r1595) include changes of 2.3.4, 2.3.5 and 2.3.6 (copied from 2.3 branch)
- (r1595) update some notes about SVN version (still far from complete)	


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1596 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-01 22:29:25 +00:00
Christian Boltz
57f4ad0b75 functions.inc.php pacrypt():
- for 'system' encryption, use full hashed password as salt 
  https://sourceforge.net/p/postfixadmin/bugs/2/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1595 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-01 21:48:14 +00:00
Christian Boltz
bafd2f1f58 edit.php:
- use prefill values from $_SESSION (if not provided in GET/POST)
- remember prefill values for next usage of the form

list-virtual.php
- set prefill values for edit.php

PFAHandler.php:
- let prefill() store the value in $struct if no prefill_$field()
  function exists

This fixes the remaining parts of
http://sourceforge.net/p/postfixadmin/bugs/298/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1594 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-01 20:45:17 +00:00
Christian Boltz
1a35cccf5e list-virtual.php:
- remember domain and page browser offset in $_SESSION
  (fixes 50% of http://sourceforge.net/p/postfixadmin/bugs/298/ )
- various cleanups

functions.inc.php:
- add safesession() (like safeget(), but for $_SESSION)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1593 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-01 19:05:14 +00:00
Christian Boltz
c349420210 functions.inc.php
- db_query(): do not print out the failed query, error_log() it instead
  to avoid information leaks.
- update SF forum URL


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1592 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-18 22:57:37 +00:00
Christian Boltz
7bffdc9907 upgrade.php:
- convert TODO to a note


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1591 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:52:01 +00:00
Christian Boltz
75c2c9cea5 config.inc.php:
- add missing $CONF[*_struct_hook] options
- add empty defails for various $CONF[*_post*_script]



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1590 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:38:15 +00:00
Christian Boltz
b947495b09 (follow-up for r1588)
languages/*.lang:
- add texts for DomainHandler
- delete empty pAdminCreate_domain_defaultaliases_text



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1589 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:35:40 +00:00
Christian Boltz
1688065fca DomainHandler.php:
- better error/info messages
- remove superfluous (and never displayed) success message in storemore()

languages/*.lang:
- add texts for DomainHandler
- delete empty pAdminCreate_domain_defaultaliases_text



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1588 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:32:37 +00:00
Christian Boltz
801acc6cf2 AliasHandler:
- only allow @domain as target if $this->id is a catchall
- delete commented out version of delete()
- better error messages

languages/*.lang
- add new texts needed for AliasHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1587 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:20:50 +00:00
Christian Boltz
4e489df526 AliasdomainHandler:
- better error messages

languages/*.lang
- rename pCreate_alias_domain_error3 to alias_domain_create_failed
- add new texts needed for AliasdomainHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1586 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:02:14 +00:00
Christian Boltz
c11932e58c MailboxHandler:
- use better/translateable messages at various places

languages/*.lang
- add texts needed by MailboxHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1585 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 19:49:40 +00:00
Christian Boltz
53c28990ad PFAHandler:
- read_from_db(): convert $limit and $offset with (int) to make sure
  they contain a sane value


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1584 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 19:10:15 +00:00
Christian Boltz
79274dcedf AdminHandler:
- clear some TODO notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1583 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 19:02:44 +00:00
Christian Boltz
20d1ffcafc functions.inc.php:
- new function db_pgsql() to replace lots of
  "if ($CONF[database_type] == 'pgsql')) checks
- delete unused function boolconf()

several files:
- use db_pgsql() instead of checking $CONF[database_type]



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1582 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 00:00:53 +00:00
Christian Boltz
b11ee57e0e de.lang:
- better translation for "edit" in various texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1581 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 23:44:01 +00:00
Christian Boltz
60297e483c *.lang:
- rename pAdminCreate_admin_username_text to email_address
- rename pAdminEdit_admin_super_admin to super_admin

AdminHandler.php - initStruct(): 
- adopt to the renamed $PALANG texts
- remove some TODOs
- whitespace changes

setup.php, adminlistadmin.tpl:
- adopt to the renamed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1580 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 22:33:56 +00:00
Christian Boltz
2bf5df92ea functions.inc.php, DomainHandler, MailboxHandler:
- move mailbox_postdeletion() to MailboxHandler
- move domain_postcreation() and domain_postdeletion() to
  DomainHandler
- adopt those functions for usage inside the *Handler (replace
  print with $this->errormsg etc.)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1579 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 22:10:05 +00:00
Christian Boltz
9decae80e9 some CLI cleanup
postfixadmin-cli.php:
- better error message for unknown modules or tasks
- remove unused variables
- __bootstrap(): require_once() common.php is enough
  (and inflector.php no longer exists)

shells/shell.php:
- remove unused variables
- no longer print the path in _welcome()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1578 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 21:48:52 +00:00
Christian Boltz
72f0818391 scripts/postfixadmin-cli.php
- replace usage of Inflector::camelize() with ucfirst() - for our usage,
  it gives the same result with easier understandable code
- remove unused PHP5 define

shells/shell.php:
- remove definition of unused variable $shellKey, which also removes
  the last usage of Inflector::underscore
- remove code that was commented out since a while

scripts/inflector.php:
- delete file, no longer needed


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1577 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 21:15:55 +00:00
Christian Boltz
84b160bd8e scripts/postfixadmin-cli.php:
- add myself to copyright header
- whitespace changes in dispatch()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1576 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-13 19:17:05 +00:00
Christian Boltz
c65e3293b6 Quite big CLI cleanup (and more)
model/CliHelp.php:
- new class, used for "postfixadmin-cli $module help"
- replaces the PostfixAdmin* classes in scripts/shells/*.php

model/PFAHandler.php
- add public $taskNames with the list of supported CLI commands

scripts/postfixadmin-cli.php - dispatch():
- directly set the classes to load instead of using shell->loadTasks()
- when "postfixadmin-cli $module" is called, display help instead of 
  error message about "invalid command ''"
- make it more readable by moving error checks to the beginning
  (replaces deeply nested if's with return statements)
- remove unused code parts

scripts/shells/*.php:
- remove PostfixAdmin* classes (obsoleted by CliHelp)
- remove $tasks (now in PFAHandler)
- delete alias.php and domain.php because nothing is left
- mailbox.php still contains PasswordTask

scripts/shells/shell.php:
- remove $taskNames (moved to PFAHandler)
- remove loadTasks() (integrated in postfixadmin-cli.php's dispatch())



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1575 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-13 19:07:12 +00:00
Christian Boltz
b3dc3f91ae AliasHandler:
- if parent::init() fails, return false early to avoid warnings about
  undefined $this->result


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1574 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-13 00:40:08 +00:00
Christian Boltz
39001c3ba4 DomainHandler.php:
- add some _formatted_*() functions to get a more informative output
  (currently only used in CLI)

MailboxHandler.php:
- add TODO for reading used quota from quota/quota2 table and adding
  a formatted_quota() function



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1573 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-12 21:37:08 +00:00
Christian Boltz
04cd5c5aa4 model/CliView.php:
- new file for CLI 'view'
- based on the ViewTask classes in scripts/shells/*.php
- introduces usage of *Handler->_formatted_$field() to get "pretty" 
  output for a field 
  (not sure if this is the final solution, but it works ;-)

scripts/shells/*.php
- remove ViewTask, obsoleted by model/CliView.php
 
scripts/shells/shell.php:
- use CliView instead of ViewTask



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1572 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-12 21:32:49 +00:00
Christian Boltz
f1831975c0 CliDelete:
- execute() and help() must be public


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1571 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-12 21:19:54 +00:00
Christian Boltz
0a71a236c2 model/CliDelete.php
- new file, handles deleting something with the CLI
  (based on DeleteTask in scripts/shells/*.php)

scripts/shells/*.php
- remove DeleteTask, obsoleted by model/CliDelete.php

scripts/shells/shell.php:
- use CliDelete instead of DeleteTask



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1570 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-12 19:32:12 +00:00
Christian Boltz
b871b47709 As a side effect of the previous commit (r1568), we can use login.php
for logout.

This means:
- change logout URL to login.php in menu.conf and users_main.tpl
- delete logout.php and users/logout.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1569 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-11 00:13:31 +00:00
Christian Boltz
fbc18ff993 login.php, common.php:
- when login.php is requested, logout the current admin/user
  https://sourceforge.net/p/postfixadmin/bugs/284/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1568 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-11 00:06:27 +00:00
Christian Boltz
288ba0e143 DomainHandler.php
- delete(): check if the domain is an alias domain target - if yes, do 
  not allow to delete it
- better error message if domain_postdeletion() fails

*.lang:
- rename pAdminDelete_domain_error to domain_postdel_failed and change 
  the text
- add delete_domain_aliasdomain_target



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1567 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 23:05:43 +00:00
Christian Boltz
e079e85461 editactive.php:
- new, small script to change the 'active' status
- also include CSRF protection token

edit.php:
- remove handling of 'active' to make it more readable

*list*.tpl:
- change links to use editactive.php, add CSRF token

configs/menu.conf
- add url_editactive


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1566 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 22:22:22 +00:00
Christian Boltz
508d05e1ed AdminHandler.php, AdminpasswordHandler.php:
- initMsg(): better texts for error_already_exists and error_does_not_exist 

*.lang:
- rename pAdminCreate_admin_username_text_error2 to admin_already_exists
  and change the text
- add admin_does_not_exist



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1565 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 22:00:16 +00:00
Christian Boltz
1a79b2798e delete.php:
- require token for CSRF protection, see
  https://sourceforge.net/p/postfixadmin/bugs/269/

login.php, users/login.php:
- create token and store it in $_SESSION

templates/*:
- add token to all delete.php links

templates/list-virtual_alias_domain.tpl:
- change delete confirmation dialog to contain "from->target"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1564 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 21:17:17 +00:00
Christian Boltz
4847173755 delete.php:
- use *Handler for deletion
  (which also means delete.php only has 17 lines of code now - 130 lines 
  less than before :-)

templates/list-virtual_*.tpl:
- remove now superfluous "domain" parameter in delete.php link


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1563 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 19:52:49 +00:00
Christian Boltz
3b09562fb8 MailboxHandler.php:
- rewrite and simplify delete()
- also cleanup fetchmail, quota	and quota2 tables

AliasHandler.php:
- update delete() to match the workflow in other classes



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1562 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 19:38:43 +00:00
Christian Boltz
bcb38c9664 AliasdomainHandler:
- implement delete()
- rename _field_target_domain() to _validate_target_domain()
  (follow-up for r1555)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1561 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 18:55:23 +00:00
Christian Boltz
2f26624ceb DomainHandler.php, AdminHandler.php:
- implement delete()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1560 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 17:26:47 +00:00