1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00
Commit Graph

183 Commits

Author SHA1 Message Date
corey-aloia
3112deb3e6 [Rest Client] changing to enable relative urls (#477)
* changing to enable relative urls

Signed-off-by: Corey Aloia <corey.aloia@sap.com>
2024-02-09 08:53:44 -08:00
James Hillyerd
6a389c78cc rest/client: fix comment lint error (#465)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2024-02-04 19:50:02 -08:00
James Hillyerd
6d66012a0c Rename client.WithOptTransport (#464)
* Update apiv1_client_opts.go
* Update apiv1_client_test.go
2024-01-25 10:06:35 -08:00
corey-aloia
b5ccd3da51 [Rest Client] Use options for client.New (#463)
* adding in clientopts to the rest client

Signed-off-by: Corey Aloia <corey.aloia@sap.com>
2024-01-25 09:46:31 -08:00
James Hillyerd
5a5864fde6 storage test: fix failures on windows (#457)
* storage test: close source reader
* fstore: properly close directory handle
2023-12-12 19:31:14 -08:00
James Hillyerd
e6e4e0987d storage: $ can be used in place of : in filestore path (#449) 2023-11-30 19:45:26 -08:00
James Hillyerd
32b83e6345 test: preserve SYSTEMROOT on windows (#451) 2023-11-29 16:36:40 -08:00
James Hillyerd
043551343c storage: fail startup if unable to create file store dir (#448)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-28 15:09:17 -08:00
James Hillyerd
c1d5d49126 event: Use pointers for InboundMessage addresses (#447)
* event: Use pointers for InboundMessage addresses

To ease conversions to/from MessageMetadata

Signed-off-by: James Hillyerd <james@hillyerd.com>

* message: test StoreManager.MailboxForAddress()

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-22 17:28:33 -08:00
James Hillyerd
d2121a52a9 message: Prefer To header for BeforeMessageStored event (#446)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-22 16:58:14 -08:00
James Hillyerd
3e94aacc20 message: improve manager test coverage (#438) 2023-11-21 15:40:14 -08:00
James Hillyerd
41889ee83a test: impl StoreStub.PurgeMessages (#444)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-21 14:56:21 -08:00
James Hillyerd
1b5a783dbd test: impl StoreStub.MarkSeen (#443)
* test: impl StoreStub.MarkSeen

Signed-off-by: James Hillyerd <james@hillyerd.com>

* continue to Message interface in StoreStub

Signed-off-by: James Hillyerd <james@hillyerd.com>

* test errors

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-18 11:21:09 -08:00
James Hillyerd
208d20582e test: Add tests for StoreStub (#440)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-17 16:34:49 -08:00
James Hillyerd
1088ccb8d1 luahost: add type check TODOs (#436)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-13 13:26:41 -08:00
James Hillyerd
e56638cbac various: resolve linter errors in a number of pkgs (#434)
- webui: resolve linter errors
- msghub: resolve linter errors
- policy: resolve linter errors
- extension: resolve linter errors
2023-11-13 12:21:19 -08:00
James Hillyerd
843cb8a015 lifecycle: Don't create multiple notify channels (#435)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-13 11:54:14 -08:00
James Hillyerd
535438342e server: resolve linter errors (#433)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-13 11:34:05 -08:00
James Hillyerd
e22ed26633 storage: resolve linter errors (#432)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-13 11:22:49 -08:00
James Hillyerd
7ae7d29741 rest: resolve linter errors (#430) 2023-11-12 19:32:43 -08:00
James Hillyerd
86d762ac88 stringutil: fix golint comment format error (#429)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-12 13:21:27 -08:00
James Hillyerd
85e1c2c7d7 message: Verify empty mailbox list does not error (#424)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-12 13:10:29 -08:00
Cyd
20ef8af047 Reject invalidomain with wildcards (#412)
Co-authored-by: Cyril DUPONT <cyd@9bis.com>
2023-11-12 09:42:20 -08:00
James Hillyerd
4a6b727cbc lua: bind BeforeMessageStored function (#418)
* lua: Restore missing test log output
* lua: Use logger for test assert_async output
* lua: add InboundMessage bindings
* lua: bind BeforeMessageStored function

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-06 18:10:02 -08:00
James Hillyerd
01fb161df8 extension: BeforeMessageStored event to rewrite envelope (#417)
* extension: add InboundMessage type
* manager: fires BeforeMessageStored event
* manager: Reacts to BeforeMessageStored event response
* manager: Apply BeforeMessageStored response fields to message

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-06 14:53:38 -08:00
James Hillyerd
0cb62af074 message: Add test for recipient policy (#416)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-03 12:34:58 -07:00
James Hillyerd
74a27875e9 message: migrate more delivery logic into manager.go (#414)
* message: migrate more delivery logic into manager.go

Signed-off-by: James Hillyerd <james@hillyerd.com>

* manager: tidy up a few things

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-11-01 13:54:27 -07:00
James Hillyerd
b655c0cc11 smtp: Use enmime.DecodeHeaders for better performance (#413)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-10-30 17:10:09 -07:00
James Hillyerd
163a84f353 lua: fix incorrect function name (#409)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-10-23 17:05:56 -07:00
James Hillyerd
d6c23df241 lua: Expose logger object (#407)
Allows Lua scripts to add entries to Inbuckets log

Closes #327

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-10-23 16:06:19 -07:00
Saulius Gurklys
b1acff08a3 UTC format timestamps in headers (#404) (#406)
This change makes all header timestamps (e.g. "Received") to use
UTC time zone.

This way the length of such headers do not depend on local time zone
which if effect fixes #404.

Signed-off-by: Saulius Gurklys <s4uliu5@gmail.com>
2023-10-21 16:22:49 -07:00
Benson Margulies
beb5abc62d Add a ForceTLS flag for SMTP. (#402)
When this is enabled, the server listens with TLS instead of waiting for
STARTTLS.

Signed-off-by: Benson Margulies <bimargulies@google.com>
2023-10-16 14:31:16 -07:00
James Hillyerd
3709aa8b51 message: Include inlines when returning attachments (#398)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-09-14 14:29:33 -07:00
James Hillyerd
63e47a4e74 web: Redirect base path prefix to prefix/ (#397)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-09-13 12:18:08 -07:00
James Hillyerd
9836c0ffbb go: update mod and imports to correctly reflect major version (#388) 2023-09-09 12:36:21 -07:00
Benson Margulies
00736cc704 pop3 TLS: don't do server-side handshake explicitly... (#386) 2023-09-07 09:56:19 -07:00
Benson Margulies
9f0fef3180 Implement STLS for pop3 (#384) 2023-09-05 14:28:26 -07:00
Cyd
06ec140e72 add reject from origin domain feature (#375)
Add a new feature to be able to reject email *from* specific domains.

Co-authored-by: Cyril DUPONT <cyd@9bis.com>
2023-08-26 11:05:20 -07:00
guangwu
0ae452ed17 chore: remove refs to deprecated io/ioutil (#376)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-07 16:25:36 -07:00
James Hillyerd
e84d21cb28 events: Remove unnecessary go calls (#352) 2023-02-28 10:25:16 -08:00
James Hillyerd
5a886813c3 Provide inbucket object in Lua (#351)
* fix delve fortify thingy
* Expose inbucket.after.message_stored in lua
* Expose inbucket.after.message_deleted in lua
* Expose inbucket.before.mail_accepted in lua
2023-02-27 20:22:10 -08:00
James Hillyerd
7044567d64 msghub: Clear deleted messages instead of unlinking (#348)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-17 15:06:43 -08:00
James Hillyerd
82ddf2141c Create V2 API for monitor+deletes, revert V1 API (#347)
* Revert socketv1 controller API to maintain V1 contract, introduce
V2 controller for Inbucket UI.

Signed-off-by: James Hillyerd <james@hillyerd.com>

* Introduce MessageID for deletes, instead of recycling header

Signed-off-by: James Hillyerd <james@hillyerd.com>

* Update UI for monitor V2 API

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-17 12:37:17 -08:00
James Hillyerd
36095a2cdf extension: split out an async specific broker for "after" events (#346)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-16 16:17:06 -08:00
James Hillyerd
a55da8b7d1 file & mem stores should emit delete events on purge (#338)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-14 19:51:42 -08:00
James Hillyerd
561ed93451 feat: Monitor tab dynamically updates when messages are deleted (#337)
* WIP: msghub handles deletes, UI does not yet display them

Signed-off-by: James Hillyerd <james@hillyerd.com>

* socket and UI support message deletes

Signed-off-by: James Hillyerd <james@hillyerd.com>

* use Delete naming for consistency

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-14 19:02:06 -08:00
James Hillyerd
ef12d02b83 msghub: Recover and log panics (#336)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-14 14:00:13 -08:00
James Hillyerd
de617b6a73 delete event: test lua func (#335)
* lua: tidy test helpers

Signed-off-by: James Hillyerd <james@hillyerd.com>

* lua: test after_message_deleted func

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-14 10:56:43 -08:00
James Hillyerd
69b6225554 storage: emit AfterMessageDeleted events (#334)
* Ignore test lua script

Signed-off-by: James Hillyerd <james@hillyerd.com>

* Wire ExtHost into storage system
imports

Signed-off-by: James Hillyerd <james@hillyerd.com>

* storage/file: emit deleted events

Signed-off-by: James Hillyerd <james@hillyerd.com>

* storage/mem: emit deleted events

Signed-off-by: James Hillyerd <james@hillyerd.com>

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-13 17:11:04 -08:00
James Hillyerd
5adef42df7 Replace message.Metadata usage with event.MessageMetadata (#333)
Signed-off-by: James Hillyerd <james@hillyerd.com>
2023-02-13 13:52:28 -08:00