* Add toggle to check if a user is premium without the partner subscription
* fix test
* Parter created users do not have a newsletter alias id
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Reset all password tokens on password reset
* Added csrf validation on email change request and validation
* Return the same wether is a valid email or not
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* update some dependencies: newrelic, gevent
that isn't compatible with python 3.11 on mac
* update package-lock using npm 9.6.4 and node 20.0
* Add GET /api/stats
* update pytest
---------
Co-authored-by: Son Nguyen Kim <son@Sons-MacBook-Air-2.local>
* Use the alias domain for contacts
* Check there are not duplicate emails
* Check also in trash
* Use helper
* Set VERP for the forward phase to the contact domain
* Add pgp_fingerprint as index for contacts
* Removed check trash
* Only use reply domains for sl domains
* Configure via db wether the domain can be used as a reverse_domain
* Fix: typo
* reverse logic
* fix migration
* fix test
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son <nguyenkims@users.noreply.github.com>
* Add Partner only domains
* Add hidden domain to the test and revert to default domains after the tests
* Send what to show in each call
* Fix: Pass none instead of false
* Removed flag from partnerusr
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Feat: Use only sfw words with a number suffix
* Updated also custom aliases to have a number suffix
* do not use _ as separator
* use _ as separator for words-based suffix
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son <nguyenkims@users.noreply.github.com>
* Do not allow to use email alias as account email when linking
* Add missing status
* Remove TODO
* Also break contact as email loop
* Better test names
* Allow a reverse alias to send an email to an alias
* Ident fix
* Removed invalid test
---------
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* after deleting an alias, user should stay on the same page
* Fix delete alias mlec (#1547)
* Specify how to create the certificates if they don't exist in readme (#1533)
* Remove id= from get 🩹
* Add flash message level 🩹
* Rename transfer_mailbox back to new_mailbox in the create-mailbox part 🩹
Co-authored-by: rubencm <rubencm@gmail.com>
* Fix delete alias mlec (#1552)
* Specify how to create the certificates if they don't exist in readme (#1533)
* Remove id= from get 🩹
* Add flash message level 🩹
* Rename transfer_mailbox back to new_mailbox in the create-mailbox part 🩹
* Linting files to pass test 🎨
Co-authored-by: rubencm <rubencm@gmail.com>
Co-authored-by: mlec <42201667+mlec1@users.noreply.github.com>
Co-authored-by: rubencm <rubencm@gmail.com>
* Set up npm clean install instead of npm install in order to keep the version of npm packages 🎨
* Add option to transfer the alias to a new mailbox when a mailbox is deleted
* Moved alias transfer to job
* Lint
* Update forms
* Revert dockerfile change
Co-authored-by: ewen <ewen.coppens@a1.digital>
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Feat: Allow TOTP for up to one minute in the future and in the past
* Feat: Allow TOTP for up to one minute in the future and in the past
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Feat: Add unsub oneclick to the base transactional email template
* Format
* Removed unused
* Format
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Use canonical email for registration, check both when checking if user exists
* Fix test
* Set pagesize to 100
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Export alias in csv
* reformating
* template
* Improved contributing script and doc
* Updated test
* removed csv export from GDPR export archive
* added test for new route
* fix trailing space
* moved test to new utils file
* Fix: When re-sending emails if they trigger exceptions move out of failed dir
* Use proper timeout
* Lint
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Fix: Only override postfix port when enabling TLS if the port is set to be 25
* Add connection timeout
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Notify another mailbox about an email sent by a mailbox to a reverse alias
* keep reverse alias in CC and To header
* use alias as From to hint that the email is sent from the alias
* keep original subject, improve wording
* only add DKIM if custom domain has DKIM enabled
* Feat: Added parallel limiter to prevent sqlalchemy transaction issues
* Remove logs
* Moved initialization to its own file
* Throw exception
* Added test
* Add redis to gh actions
* Added v6 to the name
* Removed debug prints
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Have custom domains set up multiple dkim records to be able to rotate keys
* Apply suggestions from code review
* Some PR comments
* Keep dkim enabled if it is already
* Format
* PR updates
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* replace any reverse alias by real address for all contacts
* improve logging
* fix comment
* Request contacts in batches of 100 to avoid loading the db
* Fix typo
* Added tests for the contact replacement
* Increase batch size to 1k
* Revert and use only reply_email and website_email
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Recovery codes can only be shown after adding a 2FA code and cannot be seen afterwards
* Added recovery codes fix
* Updated models and script
* Formatting
* Format
* Added base code
* Updated wording
* Set the config by default
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Store sesions in redis to prevent saving old cookies
* Format
* Rename sid to session_id
* Logout session completely
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Fix: Use email directly for DomainDeletedAlias
* Add handling for reply phase
* Use the first mailbox of the domain for deleted domain aliase
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* remove unused email statuses
* add more logging
* use text_header if html_header not set
* improve email
* add a header about PGP failure when forward emails can't be encrypted
* remove unused email status
* Create a token to exchange for a cookie
* Added Route to exchange token for cookie
* add missing migration
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Extract suffix generation and validation to a module
* Updated tests
* Make custom alias use signed suffixes
* Added the signature check to the module
* Fix invalid route
* Move more suffix related stuff
* Fix tests
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* admin can manage newsletter and test sending it
* add comments
* comment
* doc
* not userID not specified, send the newsletter to current user
* automatically match textarea height to content when editing newsletter
* increase text height and limit img size to 100% in email template
* admin can send newsletter to a specific address
* Change default unsub behaviour to disable alias by default
* Alter default valut for unsub_behaviouur
* Added comments to the migration
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Allow to login with proton to enter sudo mode
* Updated wording
* lint
* Only enabled if the user has the account linked
* Add exit-sudo route for tests
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Fix: When logging with parter create accounts with lowercase emails
* Sanitize emails instead of just lowercase them
* linting
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Feature: Use new job status to retry killed jobs
* Set attermpts and time via config
* Update timing condition
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Allow to set sudo mode for api requests
* Rebase migration on top of master
* PR comments
* Added missing migration
* Removed unused import
* Apply suggestions from code review
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
* Propose upgrade proton account for proton partner users without paid mail plan
* Reformat js
* Initial display via jinja
* tweak ui: add a ---OR--- separator
* use collapse to show SL upgrade option
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son <nguyenkims@users.noreply.github.com>
* Send email to users with a subscription and a partner plan upgrade
* Update double-subscription-partner.html
* Update double-subscription-partner.txt.jinja2
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son Nguyen Kim <nguyenkims@users.noreply.github.com>