Commit Graph

63 Commits

Author SHA1 Message Date
Son
3bdeda3e04 add get_mailbox_bounce_info() 2021-10-14 15:10:16 +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
41478a5715 replace parseaddr_unicode by parse_full_address 2021-09-10 17:26:14 +02:00
Son Nguyen Kim
defd7b159d Fix get_header_unicode: handle the case header contains several parts 2021-09-09 11:47:01 +02:00
Son Nguyen Kim
fb29503b81 do not send bounce to IgnoreBounceSender 2021-08-02 11:33:58 +02:00
Son Nguyen Kim
e26287a4c7 Revert "disable should_disable() for now"
This reverts commit fb88654d84.
2021-07-14 12:23:02 +02:00
Son Nguyen Kim
fb88654d84 disable should_disable() for now 2021-07-13 17:24:28 +02:00
Son Nguyen Kim
f97b18e60a fill up EmailLog.alias_id when creating new EmailLog 2021-07-11 12:28:42 +02:00
Son NK
79d0ef8906 Use Postfix queue-id as log message-id 2021-06-04 17:15:59 +02:00
Son NK
73555ad524 generate mail_from during reply phase using BOUNCE_PREFIX_FOR_REPLY_PHASE 2021-05-25 17:59:40 +02:00
Son NK
ade07f9449 return empty name when name can't be decoded 2021-05-22 16:47:44 +02:00
Son NK
0039b4c301 disable an alias if the user has too many bounces recently 2021-04-16 17:57:25 +02:00
Son NK
7c1af6a265 improve should_disable(): take into account repetitive bounces 2021-04-06 17:24:06 +02:00
Son NK
4a91db8e11 rename parse_email_log_id_from_bounce -> parse_id_from_bounce 2021-01-26 09:59:22 +01:00
Son NK
013a94d1e9 fix user delete profile pic 2021-01-19 10:47:48 +01:00
Son NK
da53b7fa00 Improve should_disable() to take into account last 7 days bounces 2021-01-19 10:45:39 +01:00
Son NK
c83b146f14 Add BOUNCE_PREFIX, BOUNCE_SUFFIX config 2021-01-11 14:51:29 +01:00
Son NK
b3d1085e0c fix test 2020-12-18 16:52:03 +01:00
Son NK
10f15f78c8 optimize import 2020-12-18 16:25:30 +01:00
Son NK
8111beb6ff refactoring test 2020-12-18 16:24:38 +01:00
Son NK
091ff3ad2c Add decode_text() 2020-12-18 10:43:06 +01:00
Son NK
3a8cdce650 Create should_disable 2020-12-16 18:50:09 +01:00
Son Nguyen Kim
bf139f83b3
Merge pull request #342 from herrboyer/linting
Linting
2020-12-07 17:45:50 +01:00
Son NK
ce2d68a64d take into account include_sender_in_reverse_alias when creating reverse-alias 2020-12-06 19:37:20 +01:00
Renaud Boyer
57ef3ac35c linting 2020-12-06 14:10:13 +01:00
Son NK
cefa68d392 Create replace() in email_utils 2020-11-30 15:15:13 +01:00
Son NK
0b95ca33b8 use no encoding for 8bit and binary 2020-11-30 10:49:04 +01:00
Son NK
f804332c2d refactor: create EmailEncoding enum 2020-11-30 10:48:16 +01:00
Son NK
d61f45ea86 use 7bit as default encoding 2020-11-26 17:22:17 +01:00
Son NK
e2a7061429 add get_encoding() and encode_text() 2020-11-26 17:01:05 +01:00
Son NK
609d59d23f improve logging 2020-11-25 15:20:00 +01:00
Son NK
bcdf522174 create normalize_reply_email(): handle case where reply email contains space, quote, etc 2020-11-22 13:07:09 +01:00
Son NK
f069d2f083 use getaddresses to parse multiple address from To, CC header. Remove get_addrs_from_header() 2020-11-21 19:15:02 +01:00
Son NK
c25a5b50f6 make sure reply_email only contain lowercase 2020-11-20 10:03:40 +01:00
Son NK
75c3fa1c11 make sure reply-email only uses ascii-encoded char 2020-11-18 15:36:39 +01:00
Son NK
319078fceb use contact email when generating reply-email 2020-11-18 10:24:39 +01:00
Son NK
e06c872bc0 add test for get_addrs_from_header() 2020-11-18 10:04:23 +01:00
Son NK
75ba1669e0 Create generate_reply_email() and refactor 2020-11-16 19:15:09 +01:00
Son NK
632a5bbbc8 handle UnicodeEncodeError in copy() and to_bytes() 2020-11-10 16:02:19 +01:00
Son NK
e659680875 add_header() 2020-11-07 13:00:12 +01:00
Son NK
8b356eef01 remove a test that can randomly fail 2020-11-05 10:48:32 +01:00
Son NK
72a34e28be add is_valid_email() 2020-11-03 11:09:37 +01: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
fdedc24358 black new version 2020-08-27 10:20:48 +02:00
Son NK
17c7303fb5 add get_header_from_bounce() 2020-08-24 10:17:22 +02:00
Son NK
d89e41d0e5 use user.max_spam_score if present 2020-07-23 11:11:43 +02:00
Son NK
5705842415 add email_utils.copy() 2020-06-12 00:02:07 +02:00
Son NK
2978bfb281 Fix user cannot change personal email back and better naming.
Happens when user
- changes their personal email
- wants to change back: they can't as this email is already used as mailbox
2020-05-15 23:18:30 +02:00
Son NK
53e04a8066 fix test 2020-05-10 10:42:18 +02:00