don't show vacation_domain as undeliverable + various code cleanup
- don't show the vacation domain as undeliverable
In theory this should already have worked already, but $stat_vacdomain
missed the first letter of the domain ("xample.com" instead of
"example.com") which broke it.
Fixed by using $stat_domain, which has the same content anyway.
This fixes part (2) of
https://sourceforge.net/tracker/?func=detail&aid=1951926&group_id=191583&atid=937967
- generate the regex for $CONF[recipient_delimiter] at the start of the
function. Besides saving some CPU cycles, this makes the code more
readable.
- generate $stat_domain earlier and in a regex-free way
- drop $stat_catchall - it's nothing else than @ + $stat_domain
- use in_array() to check $CONF[show_undeliverable_exceptions] instead
of a while loop
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1068 a1433add-5e2c-0410-b055-b7f2511e0802
- explicitely check for unlimited maxquota when checking if
$quota > $limit[maxquota]. Without this, $quota was always
considered as being too big (not surprising, everything is >0 ;-)
This fixes https://sourceforge.net/tracker/?func=detail&aid=3306926&group_id=191583&atid=937964
(caused by domain quota patch, therefore not affecting 2.3.x)
- replaced setting $rval with return in some cases if the decision is
final without needing to check domain quota
- added lots of comments to make understanding the function easier
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1065 a1433add-5e2c-0410-b055-b7f2511e0802
$CONF['user_footer_link']. This doesn't really make sense - it should
always be a link to users/main.php.
configs/menu.conf:
- added url_user_main = main.php
templates/users_menu.tpl:
- replaced $CONF.user_footer_link with #url_user_main#
config.inc.php:
- removed (now unused) $CONF['user_footer_link']
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1059 a1433add-5e2c-0410-b055-b7f2511e0802
- new texts 'show' and 'all' for list-virtual (see r1054)
- marked 'pOverview_alias_domain_target' as obsolete (no longer needed since r1052)
de.lang:
- added some translations
language-update.sh:
- made --obsolete working
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1055 a1433add-5e2c-0410-b055-b7f2511e0802
new option 'all' to display domain aliases, mailboxes and aliases on
one page (like in 2.3.x)
The question is: what do we want as default?
-> feedback please!
(personally, I'd prefer "all")
templates/list-virtual.tpl:
- new submenu option "all"
- changed subnav to a more lightweight design
css/default.css:
- new style ".subnav p" for submenu
- new style "span.active"
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1054 a1433add-5e2c-0410-b055-b7f2511e0802
- lots of whitespace fixes to use 4 spaces everywhere
(which list-virtual.php has in its vim: comment since a long time)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1053 a1433add-5e2c-0410-b055-b7f2511e0802
This fixes
https://sourceforge.net/tracker/?func=detail&aid=2890375&group_id=191583&atid=937967
list-virtual.php:
- merge queries for from and to side of alias domains
- use a mostly common query for MySQL and PgSQL
- move "can create alias domain" logic to PHP
list-virtual_alias_domain.tpl:
- merge "from" and "to" view to one table
- add "To" column to the merged table
- do not link to $fDomain (which would lead to the currently displayed page)
- drop the second table / "is an alias domain for ..."
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1052 a1433add-5e2c-0410-b055-b7f2511e0802
- add index on (domain,timestamp) in log table to make viewlog faster
_add_index():
- fix handling of multi-column aliases in MySQL
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1050 a1433add-5e2c-0410-b055-b7f2511e0802
- add a warning that backup.php is poorly maintained and might contain bugs
- disable HTML escaping for the message - we feed it with HTML tags...
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1049 a1433add-5e2c-0410-b055-b7f2511e0802
Based on a patch from W. Rossmann (W. Rossmann@SF),
https://sourceforge.net/tracker/index.php?func=detail&aid=2974928&group_id=191583&atid=937966
with some modifications, cleanup and adoptions to trunk (especially templates)
config.inc.php:
- new config option $CONF['domain_quota'] to enable/disable domain-level
quota (default: enabled)
- new config option $CONF['domain_quota_default'] (default: 2 GB)
functions.inc.php - check_quota():
- add code to check the quota sum on a domain
- add optional parameter $username (to exclude that username from quota
calculation, used by edit-mailbox)
edit-domain.php, create-domain.php,
admin_edit-domain.tpl, admin_create-domain.tpl:
- add input field and handling for domain-level quota
list-domain.php, overview-get.tpl, adminlistdomain.tpl:
- display allocated and allowed domain quota
- beautify quota and max_quota fields - display "unlimited" instead of "-1"
edit-mailbox.php:
- hand over username to check_quota()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1042 a1433add-5e2c-0410-b055-b7f2511e0802
delete.php:
- replace various $tMessage=... with flash_error()
- always redirect to the relevant page, even if an error happened
- fix error check in delete admin
- removed HTML formatting (<b>, <span>) from some error messages
- replaced check for pgsql + BEGIN/COMMIT/ROLLBACK with db_begin(),
db_commit() and db_rollback()
- the smarty message.tpl is most probably superfluous
languages/*.lang:
- removed HTML (<span>) from messages used by delete.php
fetchmail.php, scripts/snippets/baseclass.php
- remove superfluous </span>
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1036 a1433add-5e2c-0410-b055-b7f2511e0802
- db_delete(): if no row was deleted, return 0 (not true)
This should not affect any existing code, but makes more sense
for future usage.
- whitespace changes in db_delete()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1035 a1433add-5e2c-0410-b055-b7f2511e0802
several text changes to be more clear (see the en.lang diff for details)
This commit implements most changes from Chris H. (dharmachris@SF) posted at
https://sourceforge.net/tracker/?func=detail&aid=3186094&group_id=191583&atid=937964
Related template changes:
templates/admin_edit-admin.tpl:
- use PALANG.save instead of PALANG.pAdminEdit_admin_button
templates/users_edit-alias.tpl, templates/edit-alias.tpl:
- split PALANG.pEdit_alias_welcome - second half is now PALANG.pEdit_alias_help
(this avoids the <br /> in the text)
- use PALANG.save instead of PALANG.pEdit_alias_button
templates/edit-mailbox.tpl:
- use PALANG.save instead of $PALANG.pEdit_mailbox_button
templates/admin_edit-domain.tpl:
- use PALANG.save instead of $PALANG.pAdminEdit_domain_button
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1031 a1433add-5e2c-0410-b055-b7f2511e0802
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
- 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
(as discussed with GingerDog on IRC yesterday).
Also renamed user to mailbox in the CLI.
- renamed model/UserHandler.php to MailboxHandler.php
- renamed scripts/shells/user.php to mailbox.php
- replaced UserHandler / user with MailboxHandler / mailbox in various files
- unrelated cleanup: deleted obsolete scripts/models-ext directory
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1019 a1433add-5e2c-0410-b055-b7f2511e0802
- cleanup: move some vars to password.php and users/password.php
- drop $pPassword_admin_text - was always empty
password.php, users/password.php:
- init $pPassword_password_text and $pPassword_password_current_text
(previously in variables.inc.php)
templates/password.tpl, templates/users_password.tpl:
- drop $pPassword_admin_text - was always empty
These changes should also fix some undefined variable warnings reported
by makomi on IRC.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1004 a1433add-5e2c-0410-b055-b7f2511e0802