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
James Hillyerd
d11ae3710c
config: make note of domain addressing ( #331 )
2023-02-12 16:17:41 -08:00
James Hillyerd
5d18d79539
lua: Preload json module ( #330 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-02-10 11:44:36 -08:00
James Hillyerd
b38b2e9760
lua: Preload gluahttp module ( #328 )
2023-02-09 19:04:33 -08:00
James Hillyerd
75b7c69b5c
lua: Add getter/setter tests for bound objects ( #326 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-02-08 17:20:57 -08:00
James Hillyerd
239426692e
lua: Use table syntax for user object bindings ( #325 )
...
* lua: update bind_message to use table syntax
* lua: update bind_address to use table syntax
2023-02-08 13:38:00 -08:00
James Hillyerd
7f91c3e9cb
lua: Bind after_message_stored and before_mail_accepted ( #322 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-24 16:37:26 -08:00
James Hillyerd
55addbb556
lua: Init with config and pool ( #321 )
...
* lua: Intial impl with config and pool
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-24 12:16:58 -08:00
James Hillyerd
8fd5cdfc86
extension: Add BeforeMailAccepted event ( #320 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-22 18:01:56 -08:00
James Hillyerd
e74efbaa77
extension: Make AfterMessageStored async ( #319 )
2023-01-22 16:26:52 -08:00
James Hillyerd
b383fbf9ab
manager: Test that MessageStored event is emitted ( #318 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-17 19:26:44 -08:00
James Hillyerd
c9912bc2bb
Fix incorrect test capitalization ( #317 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-17 19:08:59 -08:00
James Hillyerd
f0d457b8f5
extension: Add MessageStored event ( #316 )
...
* Replace existing direct StoreManager->msghub communication with this
event
* For #280 #309 #312 #310
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-16 21:30:47 -08:00
James Hillyerd
3bf4b5c39b
extension: Implement an EventBroker ( #315 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
Signed-off-by: James Hillyerd <james@hillyerd.com >
2023-01-16 20:34:16 -08:00
James Hillyerd
547a12ffca
smtp: Adjust fromRegex to handle AUTH=<> in middle of args ( #291 )
...
Signed-off-by: James Hillyerd <james@hillyerd.com >
2022-09-03 14:03:55 -07:00
James Hillyerd
c8d22ac802
smtp: Break up handler tests ( #290 )
...
* Do drain logging from main to reduce test output
* Break up some of the larger handler test funcs
* Introduce sub-tests
2022-08-25 14:19:57 -07:00
James Hillyerd
9dbffa88de
Refactor SMTP handler_test log collection ( #289 )
...
* smtp: allow logger to be passed into startSession
* smtp: remove logbuf and teardown from handler_test
* smtp: handler_test log output to testing.T
2022-08-24 21:42:53 -07:00
James Hillyerd
eae4926b23
Dependency injection improvements ( #288 )
...
Refactor server life-cycle into it's own file, make service startup and monitoring more consistent and testable.
* Extract services creation in preparation for DI
* pop3: rename New to NewServer
* lifecycle: Add fatal error Notify()
* web: Introduce Server struct w/ Notify()
* Extract Start in lifecycle
* Add Start() to Hub
* RetentionScanner startup consistent with other svcs
* Remove global shutdown channel
* Implement a readiness notification system
2022-08-13 13:22:34 -07:00
Abirdcfly
29d1ed1e7f
delete minor unreachable code caused by t.Fatal ( #287 )
...
Signed-off-by: Abirdcfly <fp544037857@gmail.com >
2022-08-10 08:59:09 -07:00
James Hillyerd
1f1a8b4192
Handle IP address domains ( #285 )
...
* Add basic TestRecipientAddress tests
* Handle forward-path route spec
* Validate IP addr "domains"
* Forward-path test cases
* Add integration test
* Add IPv4 recip swaks test
* Special case domain mailbox extraction
* add IPv6 swaks test
* Formatting
Signed-off-by: James Hillyerd <james@hillyerd.com >
* Update changelog
2022-08-07 20:13:58 -07:00
James Hillyerd
87018ed42d
Allow AUTH=<> FROM parameter ( #284 )
...
* Use backtick on regex
* Accept AUTH=<> FROM parameter
* Update changelog
2022-07-30 10:57:29 -07:00
James Hillyerd
2016142747
smtp: allow empty user & pass during AUTH LOGIN ( #225 )
2021-07-31 10:38:48 -07:00
James Hillyerd
4f9f961cac
smtp: fix formatting ( #224 )
2021-07-31 10:32:08 -07:00
James Hillyerd
985f2702f2
Fix command line length bug ( #221 )
...
* handler: Don't fail on 8 character command lines
Fixes #214
* handler: Test that STARTTLS is parsed correctly.
2021-07-11 12:00:28 -07:00