Commit Graph

332 Commits

Author SHA1 Message Date
Adrià Casajús 5e48d86efa
Canonicalize emails from google and proton before registering users (#1493)
* Revert "Revert "Use canonical email when registering users (#1458)" (#1474)"

This reverts commit c8ab1c747e.

* Only canonicalize gmail and proton

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-12-14 11:50:36 +01:00
Adrià Casajús 73c0429cad
Fix: Set oneclick link for unsubscribe of the newsletter for tx emails (#1465)
* Feat: Add unsub oneclick to the base transactional email template

* Format

* Removed unused

* Format

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-12-13 16:59:14 +01:00
Adrià Casajús c8ab1c747e
Revert "Use canonical email when registering users (#1458)" (#1474)
* Revert "Use canonical email when registering users (#1458)"

This reverts commit f728b0175a.

* missing chang

* typo
2022-12-08 10:57:46 +01:00
Adrià Casajús f728b0175a
Use canonical email when registering users (#1458)
* 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>
2022-11-30 17:19:55 +01:00
Son Nguyen Kim 25743da161
Dmarc transactional (#1402)
* make sure transactional email use the same domain for header from and envelope from

* fix import
2022-11-04 14:22:28 +01:00
Son Nguyen Kim 36d1626972
Notify another mailbox about an email sent by a mailbox to a reverse alias (#1381)
* 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
2022-10-30 19:59:42 +01:00
Son Nguyen Kim 72a130e225
do not add mime-version header if already present (#1302) 2022-09-22 13:46:32 +02:00
Son Nguyen Kim 753a28e886
handle case msg is string in replace() (#1271)
should fix https://sentry.io/organizations/simplelogin/issues/3563106404/?alert_rule_id=2478639&alert_timestamp=1662404226476&alert_type=email&environment=production&project=1868546&referrer=alert_email
2022-09-07 10:22:11 +02:00
Son Nguyen Kim 192d03fd68
make sure sl_formataddr always return str (#1269) 2022-09-05 15:38:04 +02:00
Son Nguyen Kim 313a928070
Create sl_formataddr to handle unicode for built-in formataddr (#1265)
* Create sl_formataddr to handle unicode for built-in formataddr

* fix circular import
2022-09-05 08:40:24 +02:00
Son Nguyen Kim cea139b7d5
Improve handling when pgp key is invalid (#1264)
* 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
2022-09-02 11:47:04 +02:00
Adrià Casajús 494005eaa5
Fix: Add weird encodings to the list (#1146)
(cherry picked from commit cfed4061e7bf3e34c52518b905065055acb8858e)

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-05 12:19:14 +02:00
Adrià Casajús 3330625426
Allow mailer to keep in mem mails to validate tests 2022-05-19 12:27:06 +02:00
Adrià Casajús 88c60f5387
Allow '7-bit' encoding for Content-Transfer-Encoding 2022-05-18 09:56:30 +02:00
Son 41c6e8fd79 add quote 2022-05-16 19:23:24 +02:00
Son e61bf038be allow to use a different from for send_email() 2022-05-16 19:17:56 +02:00
Adrià Casajús 2adcbf52be
Merge pull request #963 from simple-login/ac-complaints
Handle complaints that have multiple recipients
2022-05-16 10:30:14 +02:00
Carlos Quintana 5fc8245b8b
Remove link to support from test email 2022-05-16 08:27:23 +02:00
Adrià Casajús 64c67f4429
PR comments 2022-05-13 18:14:21 +02:00
Carlos Quintana 2e62a9f00c
Remove support email from test email 2022-05-13 12:16:55 +02:00
Carlos Quintana bef71b7be3
Update contact instructions on test_email 2022-05-13 10:55:13 +02:00
Adrià Casajús 48554369bd
Get the mailbox if possible from the email log 2022-05-10 23:34:57 +02:00
Adrià Casajús a2f141d3cc
Get recipient address from the complaint report when possible 2022-05-10 17:54:51 +02:00
Son 44b0aba4f3 fix verp generation 2022-05-10 11:19:25 +02:00
Adrià Casajús c48247e852
Remove deprecated verp email validation 2022-05-04 16:17:51 +02:00
Adrià Casajús e62022f032
Merge remote-tracking branch 'origin/master' into ac-store-contact-bounces
* origin/master: (29 commits)
  PR comments
  support "enabled" param in /api/v2/aliases
  Update PGPy to 0.5.4 to allow for python 3.10
  Also install libpq-dev
  Fix python 3.10
  Add methods to check if alias will be auto-created
  PR comments
  Allow sending messages in a background thread
  Use the proper import for newrelic agent
  not send emails to inform about an alias can't be created to disabled user
  prevent disabled user from using the api
  make sure disabled user can't create new alias
  Put version version between " so it is 3.10 instead of 3.1
  Add workflow for python 3.10
  Remove it for all creds
  Do not send the transports to the js part since we have not stored them previously
  move help to menu on small screen
  only show the help button on desktop
  use another logo for mobile
  add new parameter disabled in /GET /api/v2/aliases
  ...
2022-04-29 15:56:09 +02:00
Adrià Casajús 9a04376894
Allow sending messages in a background thread 2022-04-28 14:43:24 +02:00
Son Nguyen Kim 5053d9f1f5
Merge pull request #918 from simple-login/handle-error-as-bytes
handle the AttributeError that can also be raised by as_bytes()
2022-04-22 10:51:55 +02:00
Son 68ec159d91 catch all exception in to_bytes 2022-04-22 10:20:43 +02:00
Son Nguyen Kim 2bcc22c391
Merge pull request #906 from simple-login/ac-hash-change
Support python>3.8 for verp emails and reduce size by truncating hmac and storing time in minutes since 2022-01-01
2022-04-22 10:11:31 +02:00
Adrià Casajús 0f14c3e74e
Move some comments as docstrings 2022-04-21 15:25:06 +02:00
Adrià Casajús 112b2c77c3
Add backwards compat with shake128 signed verp emails 2022-04-21 11:30:39 +02:00
Son 0f7ccec51a handle the AttributeError that can also be raised by as_bytes() 2022-04-21 11:28:11 +02:00
Adrià Casajús c573ef655e
Store bounces in the reply phase to prevent abuse 2022-04-21 11:23:58 +02:00
Adrià Casajús af24876c71
Use sha3 and truncate to 8 bytes and store time in minutes starting at 2022-01-01 2022-04-20 20:46:35 +02:00
Son Nguyen Kim 9b624edf11
Merge pull request #901 from simple-login/no-dot-in-reverse-alias
use _ instead of . in reverse alias
2022-04-19 18:24:37 +02:00
Adrià Casajús bad9202cf8
Calculate proper padding when decoding base32 2022-04-19 10:50:25 +02:00
Son 8dfdac79bf use _ instead of . in reverse alias
to avoid AC_FROM_MANY_DOTS SpamAssassin rule
2022-04-15 17:34:29 +02:00
Adrià Casajús d28980a810
Format 2022-04-14 18:27:20 +02:00
Adrià Casajús 4bcc728222
Merge remote-tracking branch 'origin/master' into remove-softfail
* origin/master: (34 commits)
  fix flake8
  add link to the anti phishing page
  improve email wording
  Move tests
  Only send enum names
  Only send enum name for events intead of the full class.enum
  Also track login and register events from the api routes
  typo
  revert changes
  Added fix for parts that are not messages
  Add missing formatting place
  Revert unwanted changes
  Do not show an error if we receive an unsubscribe from a different address
  Revert changes to pgp_utils
  fix import
  Send newrelic events on login and register
  PR changes
  format
  Move dmarc management to its own file
  ignore VERPTransactional
  ...
2022-04-14 18:25:03 +02:00
Adrià Casajús ca93c8e603
Merge remote-tracking branch 'origin/master' into ac-dmarc-reply-phase
* origin/master:
  Only send enum name for events intead of the full class.enum
  Also track login and register events from the api routes
  typo
  revert changes
  Added fix for parts that are not messages
  Add missing formatting place
  Revert unwanted changes
  Do not show an error if we receive an unsubscribe from a different address
  Revert changes to pgp_utils
  Send newrelic events on login and register
2022-04-12 12:48:46 +02:00
Adrià Casajús c16fd25b2e
Added fix for parts that are not messages 2022-04-11 15:52:31 +02:00
Adrià Casajús ae8824a356
Revert unwanted changes 2022-04-11 14:20:56 +02:00
Adrià Casajús 7649f6b822
Do not show an error if we receive an unsubscribe from a different address 2022-04-11 14:19:32 +02:00
Adrià Casajús 0dbe504329
format 2022-04-08 14:23:59 +02:00
Adrià Casajús 8df6d98522
Merge remote-tracking branch 'origin/master' into ac-dmarc-reply-phase 2022-04-08 11:34:12 +02:00
Adrià Casajús b128d64563
Moved spamd check to a custom file and cached the result 2022-04-07 19:17:37 +02:00
Adrià Casajús 0e3c46d944
Save original envelope for debugging 2022-04-06 17:31:46 +02:00
Adrià Casajús 8ca1be0166
Apply dmarc policy to the reply phase 2022-04-06 12:51:04 +02:00
Adrià Casajús 451e69a3c4
More rebase fixes 2022-03-30 16:09:17 +02:00