Commit Graph

5025 Commits

Author SHA1 Message Date
Carlos Quintana df78109da4 refactor(email_handler): replace_headers_when_forward 2025-04-16 11:04:20 +02:00
Carlos Quintana 0e95f3d047 feat: allow to limit max email recipients (#2436)
* feat: allow to limit max email recipients

* Set cmake min version

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2025-04-14 16:03:02 +02:00
Carlos Quintana c7cbc7a4c8 chore: update error message alias custom domain (#2432) 2025-04-04 12:36:59 +02:00
Adrià Casajús 77bd9730ab Update rate limit to take into account user ID with several fixes (#2431)
* Add more debug info

(cherry picked from commit 4bda49e7ad)

* Add rate limit

* Fix dockerfile to force CMAKE version policy

(cherry picked from commit 2e4a86f9c0)
2025-03-31 12:04:51 +02:00
Carlos Quintana 7a707bdb6d fix: trash custom domain alias deletes it (#2429)
* fix: trash custom domain alias deletes it

* chore: remove redundant commits
2025-03-27 16:33:49 +01:00
Carlos Quintana 2c1abd05fa fix: limit schemes for proton oauth (#2428) 2025-03-27 09:57:04 +01:00
Carlos Quintana 29a6350299 fix: alias trash copy (#2427) 2025-03-26 15:47:12 +00:00
Adrià Casajús a0ba3b1a71 Add config to force http unsub for a certain set of users (#2425) 2025-03-26 09:56:59 +00:00
Carlos Quintana 9e8ee6467c fix: only allow api_to_cookie if is for same user (#2423) 2025-03-20 15:45:24 +01:00
Adrià Casajús 8acc48d997 Remove nex in activation email and allow to disable change linking accounts in proton (#2421) 2025-03-20 10:38:07 +00:00
Adrià Casajús bb4d51d6e0 Preserve List-ID (#2420) 2025-03-19 15:05:25 +01:00
Adrià Casajús 3962ab5fb0 Preserve Unsubscribe header and create one that always unsubs via alias (#2419)
* Preserve original unsubs

* Preserve original behaviour in an extra header
2025-03-19 10:59:18 +01:00
Carlos Quintana 84364a1684 feat: alias restore check quota (#2418)
* feat: alias restore check quota

* Update app/dashboard/views/alias_trash.py

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>

* Update app/dashboard/views/alias_trash.py

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>

---------

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>
2025-03-18 11:05:09 +00:00
Carlos Quintana a70baad478 Implement Alias Trash (#2417)
* wip: start implementing alias trash

* Added alias trash dashboard page

* test: delete_alias changes

* Format html

* fix: mailbox deletion

* feat: add delete_alias_action setting in dashboard settings

* chore: disable alias when trashing it

* Add restore tests

* Move tras/restore to alias_actions

* rename alias_actions to alias_delete

* Remove alias_actions

* Send events and alias audit log on alias restore

* feat: adapt queries to trashed alias

* chore: add metrics on alias trash actions

* fix: missing empty arg

* Add rate limit for restore and restore all

* fix: mailbox alias count

* feat: properly handle alias deletion for custom domain deletion

* chore: add error logs

* chore: update alias trash copy + change Trash location

* feat: make can_create_new_alias not take trashed aliases into account

* chore: update mailbox deletion dialog copy

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2025-03-18 10:10:56 +01:00
Carlos Quintana 352be83839 deps: update flask-limiter and redis deps (#2406) v4.66.1 2025-03-04 09:48:38 +01:00
Carlos Quintana 78aa169c10 feat: add monitoring to job runner (#2404)
* feat: add monitoring to job runner

* feat: add proper error handling in job runner

* chore: unify newrelic metric
v4.66.0
2025-02-27 15:42:20 +00:00
Carlos Quintana 7ecae793d7 deps: pin dkimpy to 1.0.5 to avoid py3dns dependency (#2405) 2025-02-27 15:27:32 +00:00
Carlos Quintana 1f710d3d11 fix: check api key exists before returning session (#2403) 2025-02-27 15:51:48 +01:00
Carlos Quintana 9940d04758 feat: add script to send sync user jobs (#2402) 2025-02-27 09:54:45 +01:00
Carlos Quintana b06f6dde76 refactor: move job names to enum in constants (#2401) 2025-02-26 16:52:49 +01:00
Carlos Quintana 59957ec08b chore: fix regex warnings on python 3.12 (#2400)
* deps: update some dependencies to fix warnings

* chore: move from sl.local to sl.lan for local development

* fix: mark string as regex

* chore: move facebook import to handler so its not global

* test: fix tests

* style: lint fixes

* test: move all .test and .local to .lan

* ci: do not use setup-python in lint
2025-02-26 15:41:50 +01:00
Carlos Quintana f5de78f2e1 chore: add query limit to job runner (#2399) 2025-02-26 10:05:55 +01:00
Carlos Quintana ba9ed4f956 chore: upgrade to python 3.12 (#2396)
* chore: upgrade to python 3.12

* ci: do not use setup-python

* deps: add limits dependency

* deps: remove fixed dependency to six

* chore: disable profiler in flask debug toolbar as it does not work with python3.12

* deps: specify strictyaml dependency for yacron
2025-02-26 09:33:34 +01:00
Carlos Quintana 821a080e1c chore: upgrade to python 3.11 (#2395) 2025-02-25 15:47:14 +00:00
Carlos Quintana abdbbe98a2 feat: job runner priorities (#2394)
* feat: job runner priorities

* chore: remove duplicate index
2025-02-25 16:28:01 +01:00
Adrià Casajús 9c3f346280 Allow several job runners to run in parallel (#2281)
* Allow several job runners to run in parallel

* Fix test

* fix: job_runner

---------

Co-authored-by: Carlos Quintana <carlos.quintana@proton.ch>
2025-02-25 15:02:51 +01:00
Adrià Casajús 7e77afa4fc Fix: if there's an expired manual sub, extend it (#2393) v4.65.5 2025-02-21 14:44:31 +01:00
Adrià Casajús a908e1cd18 Tweak lifetime command 2025-02-11 15:00:11 +01:00
Adrià Casajús 869ea8bd7d Set mailbox verified on pre-verified email change v4.65.4 2025-02-11 10:53:21 +01:00
Adrià Casajús accab2dd52 Add button to unlink from the admin panel (#2387)
* Add button to unlink from the admin panel

* format

* typo

* typo
2025-02-10 10:09:45 +00:00
Carlos Quintana 1903fa53c1 fix: allow to retrieve none getattr for request-id (#2388) 2025-02-10 09:35:11 +01:00
Carlos Quintana 1d2777c5a4 fix: add type check on create custom alias api (#2385) 2025-02-07 11:29:52 +01:00
Adrià Casajús da93431df8 Clear new_email on verified email change (#2383) v4.65.3 2025-02-06 10:27:35 +01:00
Adrià Casajús e17ae4210b Proper check of mx domains (#2382)
* Proper check of mx domains

* Moved proton servers to config

* Added function

* Make sure we have a global dns

* Typo
v4.65.2
2025-02-05 14:28:08 +01:00
Carlos Quintana ffb070cd19 chore: offer version in newrelic events (#2380)
* chore: offer version in newrelic events

* chore: send version event on startup and on other services
2025-02-05 10:09:52 +00:00
Adrià Casajús 8d8ca3312a Send event on account unlink (#2379)
* Send event on account unlink

* Move unlink to its own module
2025-02-05 09:44:42 +00:00
Adrià Casajús b0a94acaba Handle the case for duplicate new_email (#2378) 2025-02-04 15:35:14 +00:00
Adrià Casajús 298788fafa Require user to be logged in for email change verification v4.65.1 2025-02-04 10:03:31 +01:00
Carlos Quintana ed1662a485 chore: more index work (#2377) 2025-02-03 17:09:52 +01:00
Adrià Casajús 91e614ab50 Do not allow lifetime coupons for lifetime partneri (#2376) v4.65.0 2025-02-03 11:20:12 +01:00
Adrià Casajús a609b3b312 Multi domain check (#2372)
* Accept partner and sl domains

* fix

* Fix html

* properly calculate mx_domains

* Improve custom domain admin template

* reformat
2025-01-31 16:36:35 +00:00
Carlos Quintana bb6300944d fix: remove duplicate EmailLog index (#2371) 2025-01-31 13:47:18 +00:00
Carlos Quintana ff79fa020f feat: index cleanup and add missing ones (#2369)
* feat: index cleanup and add missing ones

* chore: remove case in favour of greatest in query

* fix: do not remove mailbox->user index

* Fix test due to random ordering

* Create rollback

* Bad syntax

* fix order also

* test: fix ordering

* fix: ordering on mailboxes

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2025-01-31 10:50:33 +01:00
Carlos Quintana 6f7070cae2 feat: add request_id in log (#2367)
* feat: add request_id in log

* fix: top-level import
2025-01-29 07:21:34 +00:00
Adrià Casajús 3168cbd785 Manage parse_address error v4.64.4 2025-01-28 12:09:36 +01:00
Adrià Casajús e0f51453bb Fix unsub parsing 2025-01-28 10:24:16 +01:00
Adrià Casajús 4865f0c281 Fix: allow reply-contact to be none v4.64.3 2025-01-27 12:51:29 +01:00
Adrià Casajús 2198784462 Hide the full connect with proton section v4.64.2 2025-01-27 12:35:30 +01:00
Adrià Casajús aeee88f2c8 Prevent accounts created from partner directly to unlink 2025-01-24 14:45:27 +01:00
Adrià Casajús c14d7e2098 Handle multiple emails in reply-to header (#2365) v4.64.1 2025-01-24 10:20:50 +00:00