1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-07-07 00:56:11 +02:00
Commit Graph

169 Commits

Author SHA1 Message Date
ae9206e968 Implement a simple credential cache 2021-06-04 09:41:12 +02:00
8bc4445572 Sync update of localpart, domain_name and email 2021-03-12 17:56:17 +01:00
dd3d03f06d Merge remote-tracking branch 'upstream/master' into webmail-sso 2021-03-10 14:41:12 +01:00
dd2e218375 Merge remote-tracking branch 'upstream/master' into import-export 2021-03-09 13:31:21 +01:00
96ae54d04d CryptContext should be a singleton 2021-03-09 12:05:46 +01:00
5f05fee8b3 Don't need regexps anymore 2021-03-09 12:05:46 +01:00
1c5b58cba4 Remove scheme_dict 2021-03-09 12:05:46 +01:00
fda758e2b4 remove merge artifact 2021-03-09 12:04:42 +01:00
57a6abaf50 Remove {scheme} from the DB if mailu has set it 2021-03-09 12:04:42 +01:00
7137ba6ff1 Misc improvements to PASSWORD_SCHEME
- remove PASSWORD_SCHEME altogether
- introduce CREDENTIAL_ROUNDS
- migrate all old hashes to the current format
- auto-detect/enable all hash types that passlib supports
- upgrade passlib to 1.7.4 (see #1706: ldap_salted_sha512 support)
2021-03-09 12:04:42 +01:00
00b001f76b Improve the token storage format
shortcomings of the previous format included:
- 1000x slower than it should be (no point in adding rounds since there
 is enough entropy: they are not bruteforceable)
- vulnerable to DoS as explained in
https://passlib.readthedocs.io/en/stable/lib/passlib.hash.sha256_crypt.html#security-issues
2021-03-09 12:04:42 +01:00
0a9f732faa added docstring to Logger. use generators. 2021-02-22 20:35:23 +01:00
bde7a2b6c4 moved import logging to schema
- yaml-import is now logged via schema.Logger
- iremoved relative imports - not used in other mailu modules
- removed develepment comments
- added Mailconfig.check method to check for duplicate domain names
- converted .format() to .format_map() where possible
- switched to yaml multiline dump for dkim_key
- converted dkim_key import from regex to string functions
- automatically unhide/unexclude explicitly specified attributes on dump
- use field order when loading to stabilize import
- fail when using 'hash_password' without 'password'
- fixed logging of dkim_key
- fixed pruning and deleting of lists
- modified error messages
- added debug flag and two verbosity levels
2021-02-19 18:01:02 +01:00
10435114ec updated remarks and docs 2021-02-16 15:36:01 +01:00
68caf50154 new import/export using marshmallow 2021-02-15 00:46:59 +01:00
ef637f51b7 derive the SSO keys from a KDF 2021-02-07 17:58:19 +01:00
906a051925 Make rainloop use internal auth 2021-02-07 17:50:17 +01:00
902b398127 next step for import/export yaml & json 2021-01-24 19:07:48 +01:00
8213d044b2 added docstrings, use f-strings, cleanup
- idna.encode does not encode upper-case letters,
  so .lower() has to be called on value not on result
- split email-address on '@' only once
- converted '*'.format(*) to f-strings
- added docstrings
- removed from_dict method
- code cleanup/style (list concat, exceptions, return&else, line-length)
- added TODO comments on possible future changes
2021-01-15 13:53:47 +01:00
c24bff1c1b added config_import using marshmallow 2021-01-14 01:11:04 +01:00
7413f9b7b4 config_dump now using marshmallow 2021-01-13 00:05:43 +01:00
82cf0d843f fix sqlalchemy column definitions 2021-01-08 14:22:11 +01:00
4c258f5a6b cosmetic changes & make linter happy
renamed single letter variables (m => match)
renamed classmethod arguments to cls (model)
removed shadowing of variables (hash, context)
shortened unneeded lambda functions (id)
converted type ... is to isinstance(...)
removed unneded imports (flask)
2021-01-06 16:45:55 +01:00
3b35180b41 cosmetic changes 2020-12-20 23:50:26 +01:00
815f47667b update dkim-key on commit only 2020-12-20 23:49:42 +01:00
0a594aaa2c cosmetic changes 2020-12-20 23:45:27 +01:00
0051b93077 removed unused variable 2020-12-16 22:39:50 +01:00
adc9c70c3e added dump option to dump dns data of domains 2020-10-24 22:31:32 +02:00
500967b2f5 ignore dkim_publickey when updating config 2020-10-24 22:31:29 +02:00
c46f9328f7 also dump dkim_publickey. allow key generation. 2020-10-24 22:31:26 +02:00
acc728109b validate dkim keys and allow removal 2020-10-24 22:31:13 +02:00
69ccf791d2 fixed data import via from_dict
- stabilized CommaSeparatedList by sorting values
- CommaSeparatedList can now handle list and set input

- from_dict now handles mapped keys
- from_dict now handles null values

- class Domain: handle dkim-key None correctly
- class User: delete obsolete keys after converting
- class Alias: now uses Email._dict_input
2020-08-26 23:16:37 +02:00
5c0efe82cf implemented config_update and config_dump
enhanced data model with to_dict and from_dict methods
added config_dump function to manage command
config_update now uses new data model methods
2020-08-26 11:27:38 +02:00
c26ddd3c68 fixed user's destination property
self.forward_destination is a list (and not string)
2020-08-26 11:19:01 +02:00
5dfccdafe9 fixed some minor typos, removed unused variable 2020-08-26 11:11:23 +02:00
da2dda49d4 Prefer specific alias over wildcard, regardless of case
Since direct addresses (not aliases) are case-insensitive since a while,
it makes sense for aliases to behave the same. Up until now, a wildcard
alias could trump a alias not-matching-the-case of the incoming address.
This clarifies this behavior.

closes #1387
2020-03-06 13:56:48 +01:00
989e4d5db5 Don't remove the address extension in postfix
Currently when the mail address is looked up by Postfix (using the admin
part) the address extension is removed. This is due to the address
extension being removed to look up the user, and afterwards returning
the users mail address. But by not returning the mail address including
the address extension it also isn't part anymore in the LMTP
communication to Dovecot. So Dovecot doesn't know about the extension,
and in turn the address extension can't be used in Sieve mail filtering.

This change fixes that by returning the original address by just
concatinating the "localpart" and domain again when the user is found.

Fixes #982
2019-12-27 21:11:50 +01:00
e22324adcd Make aliases case-insensitive (too)
Even though RFC5321 2.4 explains that local-parts are to be case-sensitive,
this does not seem to be how EMail is used today. Thus, instead of reverting
user-emails back to being case sensitive, let’s make aliases case-insensitive
too. Not only more consistent, this also allows users to enjoy receiving EMails
from large airlines or car-rental agencies onto their already existing aliases.

For the rare case of case sensitive aliases existing, let’s query for the
forced-lowercase alias only in the event that the preserved-case one isn’t
found …

closes #867
2019-04-14 12:02:12 +00:00
6dea8b422a Merge pull request #839 from hoellen/fix-create-onupdate-default
fix default value for created_at and updated_at
2019-01-16 12:11:13 +01:00
9721df0bc5 fix default value for created_at and updated_at
Use date instead of datetime for created_at and updated_at.
2019-01-15 16:41:58 +01:00
cfa7ca3838 Merge branch 'master' into schema-maxUserQuota-1 2019-01-15 16:22:54 +01:00
2af540a1c9 change quota columns to bigint 2019-01-13 16:40:28 +01:00
66df7a31b0 Unify and coerce booleans from env used in admin
At some places, the string that DOMAIN_REGISTRATION is got used like a boolean
(an easy misassumption to make while in python and dealing with the config
dict), making `DOMAIN_REGISTRATION=False` act as a truthy value. To stop such
future problems from happening, coerce environment config strings to real
bools.

closes #830
2019-01-13 10:22:32 +01:00
9175b15d49 Merge pull request #826 from Nebukadneza/reverse_user_alias_pref
Reverse the resolution order of user and alias
2019-01-11 16:28:35 +00:00
278bcfb13a Merge pull request #814 from Nebukadneza/fix_delimiter_alias
Deliver mails to alias-stripped-of-delimeter, even if catchall exists
2019-01-11 14:06:35 +00:00
276dc3ffda Reverse the resolution order of user and alias
Since it’s common for wildcard~ish systems to prefer concrete objects over
wildcards, and aliases can be broad-wildcards (think catchall, %@xxx.tld), it
may be more intuitive for users that user-names rank higher than aliases. This
makes it impossible for user-names to be unreachable, since they can be
completely overridden by a catchall otherwise.

This changes default behavior, and is not configurable.

closes #815
2019-01-11 11:51:56 +01:00
99cd1d714b Merge pull request #799 from hoellen/fix-domain-negative-values-1
don't allow negative values on domain creation/edit
2019-01-11 09:57:15 +00:00
2567646f47 Merge branch 'master' into fix-domain-negative-values-1 2019-01-11 11:32:30 +02:00
50343f354e Merge remote-tracking branch 'upstream/master' into feat-psql-support 2019-01-11 11:21:22 +02:00
b8d1beed29 Simplify alias-wildcard detection to not consider actual % anymore 2019-01-10 23:06:56 +01:00