Commit Graph

95 Commits (864065cd37ef34b6dab915206eea4bd2ac4ebaed)

Author SHA1 Message Date
David Goodwin 864065cd37 fix MailboxHandler -> adding mailbox with empty quota field 4 years ago
David Goodwin d81363541a fix psalm 4 years ago
David Goodwin 338fb8c564 Fix quota storage; see https://github.com/postfixadmin/postfixadmin/issues/342 4 years ago
David Goodwin d3295a59bb format 4 years ago
David Goodwin d540d904db cast mailbox['quota'] to be integer.
see:  https://github.com/postfixadmin/postfixadmin/issues/342
4 years ago
David Goodwin 3303f25bcc add some php 7+ array type hints. 4 years ago
David Goodwin 30f97c97ee avoid: A non-numeric value encountered errors from no quota being specified 4 years ago
David Goodwin 1ad184641d php7.4 / psalm fixes 4 years ago
David Goodwin 87824ef970 psalm fixes/workarounds; require PHP 5.6+ 5 years ago
David Goodwin f7c7e35b34 fix formatting 5 years ago
David Goodwin 34cf66110e see https://github.com/postfixadmin/postfixadmin/issues/251 - avoid things breaking if imap_open is not present 5 years ago
David Goodwin 296fc2f48e silence psalm error - cast $show_password_fields to an int in model/MailboxHandler.php lines 33/34 5 years ago
Felix Ableitner 600248e955 Add option to use smtp password when sending admin emails (fixes #272) 5 years ago
David Goodwin 651688c802 if we are generating passwords, there will only be one password value; so reduce the fields we check before deciding whether to update password_expiry - see https://github.com/postfixadmin/postfixadmin/issues/266 5 years ago
David Goodwin 1d1960a476 if CONF['generate_password'] == 'YES' then do not display password fields
Given we autogenerate a password ....
5 years ago
David Goodwin 3ff2436f2f try a bit harder to avoid non-numeric argument issues with $multiplier
(see https://github.com/postfixadmin/postfixadmin/issues/266 )
5 years ago
David Goodwin 8e2e4eb189 run: composer format 5 years ago
David Goodwin 03b9483204 default to providing a password_expiry datetime value - even if password_expiry is turned off - this should fix https://github.com/postfixadmin/postfixadmin/issues/280 5 years ago
David Goodwin 3322b43bb6 see: https://github.com/postfixadmin/postfixadmin/issues/282 - try and ensure local_part contains an @ on creating a mailbox 5 years ago
David Goodwin 045a19ae33 re-format 5 years ago
David Goodwin 9024dddf46 move password_expiration code into the MailboxHandler. 5 years ago
David Goodwin df99e66b2d try and stop "A non-numeric value encountered in ..."; see #239 5 years ago
David Goodwin 803e2342f8 fix psalm issues; reformat; rename new db functions 5 years ago
David Goodwin ea33d9951a try migrating to pdo 5 years ago
David Goodwin 4fcdba9cf4 run php-cs-fixer (code reforamt) 6 years ago
David Goodwin 19cda31849 remove psalm warnings from code; fix password_expiry behaviour when enabled/disabled on MySQL 6 years ago
David Goodwin 74002bbf57 psalm fixes 6 years ago
David Goodwin 69e234f668
Merge pull request #200 from doktoil-makresh/master
Support for password expiration, managed in PostFix Admin
6 years ago
David Goodwin afd418675c pointless comment 6 years ago
David Goodwin 77d1b6c2e7 rename sql fields to just have mailbox.password_expiry and domain.password_expiry 6 years ago
Damien Martins e786609aa9 Adding support for password expiration. Please read README.password_expiration for more details 6 years ago
David Goodwin 9c0e1dd575 phpdoc fixes 6 years ago
Christian Boltz 24ad5cc3d8
Set $reset_by_sms even if password reset is disabled
... to avoid an "undefined variable" warning
6 years ago
Christian Boltz 3f1866d041
display phone number field only if $CONF[sms_send_function] is set
Without a way to send a SMS, asking users for their mobile number is
pointless.
6 years ago
Christian Boltz d2588a4de2
Fix phpcs whitespace breakage in initStruct etc. 6 years ago
Adrien Crivelli 15df6c1d7b
Reformat everything with PHP-Cs-Fixer 6 years ago
houmingtao 5f1ac12d72 use current time as default token_validity value 7 years ago
root 4670182d79 fix invalid value for token_validity 7 years ago
Sylvain Tissot ffb84283c2
Harden password reset process
The improvements are:

- Die with an explicit message when a user is trying to reset his lost password and the option is disabled in config
- Redirect user to main page after password change using relative URL
- Don't leak info whether user exists or has recovery info defined
- Throttle password reset requests to prevent brute force attacks
- Show phone/alt email fields in mailbox/admin edit form only when the password reset option is enabled
- Make database upgrade code compatible with other databases types
- Use the existing password generator to generate OTP. It is now stored in database, unique to each user, valid only for 1 hour and can only by used once.
7 years ago
Sylvain Tissot 9c9ba64a7f Allows a user or admin to reset his/her forgotten password with a code sent by email/SMS #18 7 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 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 cc2b157d59 *Handler:
- add $msg['confirm'] (confirmation message when attemping to delete an
  item, displayed by list.php)

*.lang:
- add various confirm_delete_* texts needed by *Handler
- rename confirm_domain to confirm_delete_domain


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1749 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 5706f146d6 MailboxHandler:
- storemore(): store maildir in the correct variable to fix running
  mailbox_postedit script
  Fix by bit-jockey @SF,
  https://sourceforge.net/p/postfixadmin/bugs/342/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1737 a1433add-5e2c-0410-b055-b7f2511e0802
9 years ago
Christian Boltz 087dc34b01 MailboxHandler:
- check_quota(): deny creating an unlimited mailbox if domain quota is set
  (reported by idaho7 in IRC)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1736 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz 7bf5b74a47 MailboxHandler, AliasHandler:
- initStruct: set "display in list" to 1 to allow searching for domain
  with list.php (nevertheless, the domain won't be displayed because
  it doesn't have a column label set)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1735 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz b30292c420 MailboxHandler.php:
- storemore(): 
  - fix undefined variable if creating subfolders fails (bug#328)
  - remove some outdated TODO notes
- create_mailbox_subfolders(): add $this->id to error_log


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1693 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz c5de88390e PFAHandler.php:
fix logging - log the domain instead of $this->id
- add protected $domain (used for logging)
- add function domain_from_id()
- http://sourceforge.net/p/postfixadmin/bugs/317/

AliasHandler.php:
- add function domain_from_id()

MailboxHandler.php:
- add function domain_from_id()
- init(): use $this->domain instead of splitting $this-id again



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1684 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz a8b79b4548 MailboxHandler:
- validate_new_id(): make sure mailbox creation still works if the 
  alias limit for the domain is hit


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1663 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz 5fcade96d5 MailboxHandler:
- read_from_db_postprocess(): avoid warning if quota is disabled in $struct


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