Commit Graph

1542 Commits (4b37a249c79b74e8f28ae90669c77a3bb3ddd44c)
 

Author SHA1 Message Date
David Goodwin 4b37a249c7 remove incorrect advice; see bug report:359
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1823 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz ba46282f92 use smarty html_options instead of select_options()
list-virtual and viewlog were the last users of select_options()

smarty.inc.php:
- drop (now unused) select_options()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1822 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin 96a89889a2 apparently a typo - thanks marcin-github - see d93c56e34a
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1821 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin d1dad8a31c merge patch from 54a77ecb9c - thanks lisergey - encode message body with wide-chars UTF8
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1820 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 085e7e4bfb list.tpl:
- base edit, editactive and delete links on $RAW_item to avoid double
  escaping ($items is already html-escaped, and we url-escape it for
  links). This fixes the remaining part of
  http://sourceforge.net/p/postfixadmin/bugs/356/
- simplify displaying "html" fields by using $RAW_item. This also fixes
  problems with funny[tm] item names that differ when html-encoded (like
  the ' char)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1812 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 680e96b590 list-virtual_alias_domain:
- also assign RAW_items (from $RAW_tAliasDomains)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1811 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 129a65b8c5 functions.inc.php:
- gen_show_status(): escape mail addresses in query.
  Fixes https://sourceforge.net/p/postfixadmin/bugs/356/
  (mostly - the edit/delete/... links in list-virtual are double-escaped)
  In theory this could allow SQL injection, in practise the mail address
  regex limits this issue to a DOS (creating a mail address with ' caused
  an invalid query that broke list-virtual)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1809 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz dd652974e0 refresh debian/patches/db_credentials
Also update the changelog once more - let's hope this is really the
beta3 release now ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1801 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 9636fe9de3 3.0 beta3 (= 2.93) release - update $version and changelog
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1799 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin dbc8204ab1 try and support older versions of PHP (e.g 5.3) which do not support closures etc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1798 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin 2a0720d93c fix https://sourceforge.net/p/postfixadmin/bugs/320/ - allow mariadb to be used instead of mysql
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1797 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz c9b43879de config.inc.php:
- mention MariaDB as another option for 'mysqli' database type
  https://sourceforge.net/p/postfixadmin/feature-requests/103/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1796 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 73ffaad7e8 upgrade.php:
- change fetchmail.date from DATECURRENT to date
  https://sourceforge.net/p/postfixadmin/bugs/351/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1795 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz faed3a47d3 Changelog update (up to r1793)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1794 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz d401139d24 sv.lang translation update
by Thomas Karlsson, https://sourceforge.net/p/postfixadmin/patches/128/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1793 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin 9c022f7e01 merge patch from https://sourceforge.net/p/postfixadmin/bugs/347/ (thank you Eugene Grosbein) - explictly set session_cache_limiter to nocache
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1792 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin 15648b7d1c merge in from github - thanks to marcin-github
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1791 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 5307cfe48a functions.inc.php check_domain():
Measure time needed for the nameserver queries, and error_log a warning
if the queries need more than 2 seconds in total.

Inspired by a question from t-ask on IRC, who suffered from a slow
nameserver and had some "fun" to debug it ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1790 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
David Goodwin 1cca7bf54a a2b8705ad4 (git pull request from smeinecke - typo fix
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1789 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 7a873cc22a setup.php:
- after creating a superadmin, display a note that the setup is done and
  it's possible to login now (idea by t-ask on IRC)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1788 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz a89bd5f573 config.inc.php:
- remove unused $CONF['users_domain_controle'] 



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1787 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 7f87d130d7 upgrade.php:
- split upgrade_1763() into mysql and pgsql versions because pgsql
  doesn't support SUBSTRING_INDEX
  (reported by darix on IRC)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1786 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz b3750272e4 postfixadmin2.xcf:
- add white background for the mailbox (as separate layer)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1785 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 3640a1b804 postfixadmin-cli.php:
- add fetchmail to module list


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1784 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz c837eac20a DomainHandler:
- initStruct(): in 'aliases_quot' and '_aliases_quot_percent', use
  coalesce(__mailbox_count,0) - without, we always get _0_ aliases if
  a domain doesn't have mailboxes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1783 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz e14bb9038e editactive.php:
- drop unused $values
- some whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1782 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 23bdd02dcb broadcast-message.php, sendmail.php, MailboxHandler, *.lang:
- include mailbox name in pSendmail_result_error and
  pSendmail_result_success



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1781 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 7cf10f81a7 list*.tpl
- display the "Go" button only if javascript is disabled (the dropdowns
  have an onchange event defined, which makes the "Go" button superfluous)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1780 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 993c0ec2b6 list.tpl:
- improve headline:
  - in search mode, display the search term instead of the last selected
    domain (which isn't useful at all when displaying search results)
  - display number of aliases and mailboxes only in domain mode (they
    are useless/wrong in search mode)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1779 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz d2a80adedc list-virtual.tpl:
- update/fix search part of subnav links (all/mailboxes/aliases/alias domains)
  for $search[_]


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1778 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 37bba15625 Use list.tpl to display the alias list
list-virtual.php:
- use list.tpl for aliases
- move show_gen_status handling for aliases to AliasHandler

AliasHandler:
- initStruct():
  - add 'status' column (hidden by default)
  - hide 'created'
  - move 'active' after 'modified' to match old list-virtual.php layout
- initMsg: add list_header
- webformConfig(): if $CONF[show_status], set display_in_list for
  'status' column. Also set a (whitespace) label to make sure it's
  displayed
- db_read_from_db_postprocess(): if 'status' column is requested, call
  gen_show_status() for each row

list-virtual.tpl
- remove alias table header and create alias button (which should have
  been in list-virtual_alias.tpl)

list-virtual_alias.tpl:
- replace code to generate the alias table with {include 'list.tpl'}
  (and some variable assignments)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1777 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz adc038e218 list.tpl:
- add support for list_header (like ":: Alias" in list-virtual)

PFAHandler:
- add empty default for $msg['list_header']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1776 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 35fad174f7 smarty.inc.php:
- assign(): additionally provide the unsanitized values as RAW_$key

PFAHandler.php:
- document 'html' field type (used for raw html), including a big warning

list.tpl:
- add handling to display raw html fields

This is a preparation to use the status markers with list.tpl without
introducing too big changes.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1775 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 3a72203de4 AliasHandler:
- initStruct(): replace (wrong) 'editable' with '_can_edit' and '_can_delete'
- read_from_db_postprocess(): disable _can_edit and _can_delete for
  default aliases if special_alias_control is off and not superadmin

list.tpl:
- use $item._can_edit instead of $check_alias_owner

list-virtual.php:
- drop $check_alias_owner variable and check_alias_owner() call
  (replaced by the code added in AliasHandler)
- drop unused $sql_domain

functions.inc.php:
- delete no longer used check_alias_owner() function



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1774 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 8043515fdf migrate search input field to use search[_], and use list.tpl for alias domains
User-visible changes:
- alias domain list can be downloaded as CSV
- no more search highlighting for alias domains

list-virtual.php:
- expect $search to be an array
- change alias domain handling to use list.php instead of
  list-virtual_alias_domain.tpl, and move some logic from the template
  to list-virtual.php. (The template file is kept as list.tpl wrapper.)
- adopt mailbox and alias search to $search[_]
- adopt pagebrowser to $search[_]

list-virtual_alias_domain.tpl:
- replace custom output generation with {include 'list.php'} and some
  variable assignments

PFAHandler.php:
- add $this->id_field to $this->msg (avoids another smarty template
  variable)

configs/menu.conf:
- change input name to search[_]

list-virtual_alias.tpl, list-virtual_mailbox.tpl:
- adopt to $search[_] by setting $search in a backwards-compatible way

list.tpl:
- add special handling for aliasdomain.target_domain linking



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1773 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz cc598d0f3f PFAHandler:
- build_select_query(): add support for $search['_'] (searching if one
  of the $this->searchfields contains the search text)
- getList(): make sure '_' is kept in the search parameters

functions.inc.php:
- db_where_clause(): slightly relax checks - if $condition is empty,
  only error out if $additional_raw_where is also empty


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1772 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 31006928b4 AliasdomainHandler:
- initStruct(): Adjust columns to match list-virtual.php layout:
  - make 'alias_domain' a link
  - move 'active' after 'modified'
  - don't display 'created'



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1771 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 4ce0a57e83 PFAHandler:
- add protected $searchfields = array(); - list of fields to search by
  default, if just a search term is given. This will be done with
  $search['_'], but that code is not implemented yet.
- add $this->msg['show_simple_search'] (true if $searchfields is non-empty)

list.tpl:
- display search input box and search overview only if $searchfields is
  not empty

AliasdomainHandler:
- add 'alias_domain' and 'target_domain' to $searchfields

MailboxHandler:
- add 'username' to $searchfields

AliasHandler:
- add 'address' and 'goto' to $searchfields

This effectively means that the search input box is no longer displayed
in list.php for admin, domain and fetchmail listings.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1770 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 6e5c8f8054 add 'can_create' flag
PFAHandler:
- add $msg['can_create'] (true by default)

DomainHandler:
- set $msg['can_create'] based on is_superadmin

list.tpl:
- display 'create' button only if $msg['can_create'] is true

Note: This is only an optical improvement, not a permission check.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1769 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 3f451371e3 PFAHandler:
- set(): if errormsg is set for a field, assume it's invalid (even if
  the validator functions did not (or forgot to) return False)

In theory this should never happen, but it's a nice safety net against
programming errors in validator functions that don't have an explicit
    return False;


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1768 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 25356ede71 upgrade_1767: fetchmail.active field was just added. Make sure all
existing fetchmail jobs are active.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1767 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 8bad929a44 fetchmail.pl:
- add active=1/t to SQL query


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1766 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 4322486b21 delete fetchmail.php and templates/fetchmail.tpl
(replaced by FetchmailHandler)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1765 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz a12f7affba menu.conf:
- change fetchmail links to list.php and edit.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1764 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 9ca7ae050e Two upgrades for FetchmailHandler:
- upgrade_1762: add 'domain', 'active',  'created' and 'modified' fields
  to fetchmail table (used by FetchmailHandler)
- upgrade_1763: fill fetchmail.domain based on mailbox



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1763 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 27bdba3ba2 Add FetchmailHandler.php
- uses list.php and edit.php instead of the fetchmail-specific template
- replaces fetchmail.php and its template

config.inc.php:
- add $CONF['fetchmail_struct_hook']



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1762 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 22e2bc7c89 *.lang:
add 'must_be_numeric_bigger_than_null', 'fetchmail_already_exists' and
  'fetchmail_does_not_exist' (as preparation for FetchmailHandler)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1761 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 0bba68e1bc edit.php:
- for not-set bool values, set $values instead of the (wrong) $inp_values


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1760 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 56b3f11d35 edit.php:
Newer PHP versions (noticed with 5.6.6) don't include empty fields in
$_POST, which means changing a field to empty was broken.

Change edit.php to make sure all !isset() fields are set to ''.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1759 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 9f2ae72f08 DomainHandler:
- initStruct(): re-enable total_quota - MailboxHandler needs it


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1758 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago