Commit Graph

47 Commits

Author SHA1 Message Date
Son
841621dbe2 handle the case mailboxes is empty in try_auto_create_via_domain 2022-01-13 09:33:32 +01:00
Son
37bb7655d5 remove unused import 2022-01-06 15:30:33 +01:00
Son
9ff323c746 make sure to set custom_domain_id when creating a new alias 2022-01-06 15:29:37 +01:00
Son
b7e8324e5a move get_custom_domain() to alias_utils 2022-01-06 15:20:09 +01:00
Son
33bd7dbcd6 refactor 2022-01-06 14:57:01 +01:00
Son
de9f994fe2 check suffix in try_auto_create 2022-01-06 11:12:26 +01:00
Son
6cb55e27f3 make sure alias that starts with bounce prefix can't be automatically created 2022-01-05 15:16:04 +01:00
Son
01a8a0343e log when an alias is deleted 2021-12-31 11:18:08 +01:00
Son
79ca39a625 use regex_match instead of re.fullmatch() 2021-12-14 15:00:32 +01:00
Son
083b56b9a6 if user.disable_automatic_alias_note, do not add alias note 2021-10-23 18:24:28 +02:00
Son
372466ab06 do not use flask-sqlalchemy
- add __tablename__ for all models
- use sa and orm instead of db
- rollback all changes in tests
- remove session in @app.teardown_appcontext
2021-10-12 14:36:47 +02:00
Son Nguyen Kim
8301015afd do not use email_validator in get_email_domain_part() 2021-09-27 12:13:41 +02:00
Son Nguyen Kim
3443499ab9 add note for alias auto created with directory too 2021-09-22 09:45:42 +02:00
Son Nguyen Kim
1a32b654d0 refactor 2021-09-22 09:45:00 +02:00
Son Nguyen Kim
7674d8480e refactor: rename 2021-09-22 09:44:35 +02:00
Son Nguyen Kim
ff1238a56f add alias note when auto creating alias via domain 2021-09-22 09:43:48 +02:00
Son Nguyen Kim
1d09d76cb2 use re2 instead of re to avoid ReDOS attack 2021-09-21 10:57:36 +02:00
Son Nguyen Kim
e5a8ce1492 use AutoCreateRule instead of custom_domain.auto_create_regex when creating new alias 2021-09-20 18:29:36 +02:00
Son Nguyen Kim
005a760710 handle case catch_all is enabled but custom_domain.auto_create_regex is already set 2021-09-20 12:32:39 +02:00
Son Nguyen Kim
344f8e67d2 take into account custom_domain.auto_create_regex in try_auto_create_catch_all_domain() 2021-09-17 17:43:12 +02:00
Son Nguyen Kim
2b84168d68 validate address in try_auto_create 2021-09-17 17:42:16 +02:00
Son Nguyen Kim
5ac78f2694 reformat 2021-09-08 11:29:55 +02:00
Son NK
2f96322977 make sure BOUNCE_PREFIX_FOR_REPLY_PHASE can't be used as directory name or for creating aliases on-the-fly 2021-05-25 17:59:40 +02:00
Son NK
ceacf8e3a7 support dot in alias prefix 2021-04-30 11:37:17 +02:00
Son NK
0e94c329d1 handle alias too long error 2021-01-11 15:45:41 +01:00
Son NK
ce3dae2a07 inform user when an alias can't be created when a directory is disabled 2020-12-07 10:55:13 +01:00
Son NK
5b9dc88c67 make sure alias prefix cannot be more than 40 chars 2020-11-18 10:38:35 +01:00
Son NK
a890557c7f Use check_alias_prefix() to check alias prefix 2020-11-03 10:39:08 +01:00
Son NK
5da7953a64 handle the case a directory alias is created concurrently 2020-10-23 11:55:01 +02:00
Son NK
e79522b638 take into account Premium domains 2020-10-15 16:21:31 +02:00
Son NK
805e78cad1 rename email_belongs_to_alias_domains -> email_belongs_to_default_domains 2020-10-14 18:46:05 +02:00
Son NK
ed2e748d1e sanitize envelope mail_from and rcpt_tos 2020-09-14 17:30:01 +02:00
Son NK
18263c2fd5 handle case alias already created in try_auto_create_catch_all_domain() 2020-09-14 12:18:15 +02:00
Son NK
77c67c5314 create aliases_for_mailbox() and nb_email_log_for_mailbox() 2020-08-30 19:56:45 +02:00
Son NK
fdedc24358 black new version 2020-08-27 10:20:48 +02:00
Son NK
eb6647d62e fix 2020-08-23 20:24:46 +02:00
Son NK
77bfa67402 fix delete_alias: do not use IntegrityError 2020-08-23 20:17:50 +02:00
Son NK
2cae0200a8 use delete_alias(alias,user) instead of Alias.delete, DomainDeletedAlias.create, DeletedAlias.create 2020-08-14 12:02:33 +02:00
Son NK
41e2283d93 domain catch-all alias belongs to domain mailboxes 2020-08-01 12:31:43 +02:00
Son NK
6437ee46e0 use LOG.exception instead of LOG.error to provide stacktrace 2020-07-17 12:59:07 +02:00
Son NK
83e540d1d4 Create directory alias with directory mailboxes 2020-06-05 22:30:32 +02:00
Son NK
a4f8dc9c9d Use AliasInTrashError instead of DeletedAlias.get_by check when trying to create alias automatically 2020-05-23 19:45:26 +02:00
Son NK
17acaec214 save deleted alias to domain trash if it belongs to a custom domain, otherwise global trash 2020-05-23 11:49:34 +02:00
Son NK
526df4ea09 fix DeletedALias 2020-05-09 23:39:57 +02:00
Son NK
0441e5e2a9 Remove DeletedAlias.user_id column 2020-05-07 22:40:30 +02:00
Son NK
2f5a03dcad make sure to add alias into global trash when deleting it 2020-05-07 22:27:27 +02:00
Son NK
c1f5c07d86 Move alias auto-creation to alias_utils 2020-04-04 15:24:27 +02:00