Commit Graph
111 Commits
Author SHA1 Message Date
Trenton H 48d97b78bb Chore: Move model factories to the shared test layer (#14170)
The model factories lived in the documents test package, but three other
apps needed them. The AI, mail and testing suites all reached across an app
boundary to import from documents.tests.factories, which made a private test
package into a shared dependency.

The factories now live in the shared testing package, where cross-app use is
the intended use.
2026-09-21 10:57:11 -07:00
shamoon f1679a2ee3 Fix: truncate mail subjects to field max length (#13991) 2026-09-05 01:52:18 -07:00
Trenton H 713c857a08 Fix: Handle Celery mail task chord errors (#13936)
* Fix: mail rule loops forever when all attachments are duplicates

When every attachment in a mail is rejected as a duplicate, the chord's
header tasks all fail. Celery's default task_allow_error_cb_on_chord_header
skips the error callback in that case, so no ProcessedMail row is ever
created, and the same mail is refetched and reprocessed on every poll for
as long as it stays in the rule's maximum_age window.

* Minor simplifications and cleanup
2026-09-02 08:41:30 -07:00
shamoon f6f37898e8 Chore: use PinnedIMAP4 2026-08-27 00:21:02 -07:00
shamoon f5ddc14588 Fix: also check global change_mailaccount with test 2026-08-25 10:44:49 -07:00
Trenton H 2ea4a792fe Performance: More efficient mail fetching to reduce the amount of data pulled (#13432) 2026-08-04 15:35:30 +00:00
Hugo Beauzée-Luyssen f0d934259c Fix: scope ProcessedMail UID deduplication by IMAP UIDVALIDITY (#12839) 2026-07-15 13:43:16 -07:00
Trenton H 14fe520319 Chore: Update typing and baselines again (#12641)
a
2026-04-28 09:28:05 -07:00
Trenton H 50ec987a81 Chore: Refactors all of the mail tests to use model factories instead of bare create (#12613) 2026-04-20 15:43:43 -07:00
Trenton H fbf4e32646 Chore: Converts all call sites and test asserts to use apply_async and headers (#12591) 2026-04-20 11:40:04 -07:00
shamoon 8f036c9521 Merge branch 'main' into dev
# Conflicts:
#	docs/usage.md
#	src/documents/signals/handlers.py
#	src/documents/tests/test_api_documents.py
#	src/documents/views.py
2026-04-14 15:11:23 -07:00
shamoon e7c7978d67 Enhancement: allow opt-in blocking internal mail hosts (#12502) 2026-04-03 03:24:28 +00:00
shamoon 3cfe9fa2a8 Fixhancement: default mail -created correspondent matching to exact (#12414) 2026-03-21 16:15:18 -07:00
Trenton H 1caa3eb8aa Chore: Disables the system checks for management commands in tests and when unnecessary (#12332) 2026-03-16 15:10:35 +00:00
shamoon 90ae55252f Enhancement: prevent duplicate mail processing across rules (#12159) 2026-02-26 00:58:45 +00:00
shamoon 5b667621cd Try not to piss off mypy 2026-02-21 17:48:11 -08:00
shamoon 1b912c137a Merge branch 'main' into dev 2026-02-21 17:45:28 -08:00
shamoon 1bb4b9b473 More permissions on mail account test endpoint 2026-02-21 16:47:55 -08:00
shamoon 65ca78e9e7 Security: fix/GHSA-7qqc-wrcw-2fj9 2026-02-21 16:34:33 -08:00
shamoon a467df0755 Enhancement: option to stop processing further mail rules (#12053) 2026-02-13 17:33:29 +00:00
Trenton H 276dc13e3f Chore: Fixes the TO filter chaining so it doesn't reset the messages list + deterministic UIDs (#11987) 2026-02-03 11:31:19 -08:00
Sebastian Steinbeißer 3b5ffbf9fa Chore(mypy): Annotate None returns for typing improvements (#11213) 2026-02-02 08:44:12 -08:00
shamoon 4e789acf2d Chore: mark test_error_skip_rule as flaky 2025-12-18 10:15:04 -08:00
shamoon 598540fda0 Chore: mark another test flaky 2025-12-18 07:17:50 -08:00
shamoon 7a1aae7749 Fix: set match value for correspondents created by mail rule (#10820) 2025-09-09 09:14:48 -07:00
shamoon a68800d53c See if this helps with intermittent mail test failure 2025-08-16 10:30:25 -07:00
shamoon e4fd008441 Fix: fix some API crashes (#10196) 2025-06-16 22:44:39 -07:00
Sebastian Steinbeißer e560fa3be0 Chore: Enable ruff FBT (#8645) 2025-02-07 09:12:03 -08:00
Trenton H 702de0cac3 Chore: Upgrades dependencies and hook versions (#8895) 2025-01-24 12:08:58 -08:00
shamoon dafb0b1f21 Enhancement: process mail button (#8466) 2024-12-11 11:03:53 -08:00
shamoon df2c139721 Chore: mark another test flaky 2024-12-04 12:10:31 -08:00
shamoon 2353f7c2db Feature: OAuth2 Gmail and Outlook email support (#7866) 2024-10-10 20:57:32 +00:00
shamoon e49ed58f1a Fix: skip accounts without enabled rules 2024-10-04 23:59:31 -07:00
Martin Richtarskyandshamoon b3487f1843 Enhancement: check for mail destination directory, log post-consume errors (#7808)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-10-02 20:21:35 -07:00
shamoon 991c9b0ca4 Enhancement: disable-able mail rules, add toggle to overview (#7810) 2024-09-30 19:42:19 -07:00
Trenton H e6f59472e4 Chore: Drop Python 3.9 support (#7774) 2024-09-26 12:22:24 -07:00
shamoon 9a7f95865f Chore: mark some more tests as flaky 2024-09-10 16:41:11 -07:00
shamoon 4903e4290d Enhancement: re-work mail rule dialog, support multiple include patterns (#7635) 2024-09-05 15:32:03 -07:00
Daniel Bankmannandshamoon ce663398e6 Enhancement: mail message preprocessor for gpg encrypted mails (#7456)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-08-29 00:22:44 +00:00
Dennis Melzerandshamoon eaaaa575b8 Enhancement: allow multiple filename attachment exclusion patterns for a mail rule (#5524)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-08-27 09:31:46 -07:00
shamoon f525ac0af6 Chore: add pre-commit hook for codespell (#5324) 2024-01-08 13:03:05 -08:00
Thomas FalkenbergandTrenton H 355a434a07 Enhancement: fetch mails in bulk (#5249)
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2024-01-05 10:43:22 -08:00
Trenton H fbf1a051a2 Use the attachment filename so downstream template matching works against it (#4931) 2023-12-11 09:08:42 -08:00
Trenton Handshamoon 6e371ac5ac Enhancement: Allow excluding mail attachments by name (#4691)
* Adds new filtering to exclude attachments from processing

* Frontend use include / exclude mail rule filename filters

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-12-02 08:26:19 -08:00
shamoon 9712ac109d Feature: consumption templates (#4196)
* Initial implementation of consumption templates

* Frontend implementation of consumption templates

Testing

* Support consumption template source

* order templates, automatically add permissions

* Support title assignment in consumption templates

* Refactoring, filters to and, show sources on list

Show sources on template list, update some translation strings

Make filters and

minor testing

* Update strings

* Only update django-multiselectfield

* Basic docs, document some methods

* Improve testing coverage, template multi-assignment merges
2023-09-22 16:53:13 -07:00
Trenton Holmes 650c816a7b Removes support for Python 3.8 and lower from the code base 2023-09-10 11:42:59 -07:00
Trenton H b961df90a7 Reduces the 2 mail tests flakiness 2023-08-07 15:32:33 -07:00
shamoon 0ebe08d796 Return default 'ALL' mailbox criterias for some imap servers 2023-06-06 20:00:31 -07:00
shamoon 81a7b34101 Dont perform mail actions when rule filename filter not met
Update mail.py
2023-05-06 23:59:33 -07:00
Trenton H 26cd470d31 Don't ever send GMail related keywords if the server doesn't report support for the extensions 2023-04-29 09:34:50 -07:00