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

89 Commits

Author SHA1 Message Date
Carlos Tadeu Panato Junior
6368e3a83b Add option to get the latest message using latest as request parameter (#63) 2017-12-15 17:00:09 -08:00
James Hillyerd
304a2260e8 Don't close writers with defer 2017-02-12 16:21:44 -08:00
James Hillyerd
9b1d28fc7d Reimplement msghub as an actor 2017-01-28 19:20:06 -08:00
James Hillyerd
de5b9a824b Remove empty intermediate directories, closes #12 2017-01-28 16:17:25 -08:00
James Hillyerd
9ac3c90036 Add mutex to protect directory operations 2017-01-22 22:03:56 -08:00
James Hillyerd
85e3a77fe5 Extract FileMessage into filemsg.go 2017-01-22 21:26:47 -08:00
James Hillyerd
32631daeae Refactor retention scanner prior to starting #12 2017-01-22 20:59:59 -08:00
James Hillyerd
b3db619db9 Broadcast deliveries into msghub for #44 2017-01-16 13:09:50 -08:00
James Hillyerd
6ca2c27747 Pull message delivery into its own method 2017-01-16 10:50:28 -08:00
James Hillyerd
a222b7c428 Make use of pkg context
- Use context inside of servers for shutdown
- Remove unnecessary localShutdown related code
2017-01-15 22:00:58 -08:00
James Hillyerd
dcc0f36f48 Increase max local-part length to 128
- Improves compatibility with Mailgun
- Closes #41
- Update CHANGELOG
2016-12-31 05:09:12 +00:00
James Hillyerd
26a9903492 Track enmime API change
0af1249adf
2016-11-21 20:29:45 -08:00
James Hillyerd
1906a147f0 Migrate from pkg go.enmime to enmime 2016-11-17 18:35:01 -08:00
James Hillyerd
017a097588 Switch to storing To addresses as a slice
- Changes on-disk storage format
- Changes JSON API
- To and From values are now parsed/formatted by Go's mail.ParseAddress
  function
- Fixed bug in list-entry-template, was not escaping HTML characters
- Updated tests
2016-09-21 22:12:20 -07:00
James Hillyerd
01ea89e7e2 Multi-recipient swaks test
- Add a multi-recipient test to run-tests.sh
- Removal accidental output of jq binary location when pretty-printing REST JSON
- Add To: change to CHANGELOG.md
- Fix comment typo
2016-09-18 17:48:21 -07:00
Tomasz Wojtuń
02eee0a608 corrected tests 2016-09-18 17:48:21 -07:00
Tomasz Wojtuń
124f830478 Added "To:" header 2016-09-18 17:48:21 -07:00
James Hillyerd
1856deae46 SMTP handler is now more forgiving of line endings, a la Postfix 2016-09-18 17:45:03 -07:00
James Hillyerd
a939605d4a Cache message in memory during receipt, closes #23 2016-09-18 16:35:13 -07:00
Tomasz Wojtuń
7adf3741d3 #35 Log error and continue when deleting oldest message fails. 2016-04-27 17:54:17 +02:00
James Hillyerd
e99baf766b RetentionJoin() could block if scanner never started 2016-03-05 19:19:57 -08:00
James Hillyerd
8e66be63f5 Retention scanner respects global shutdown
- Clean up vars in retention.go
- Check globalShutdown in several parts of the retention scanner
- smtpd.Drain() now waits for scanner to shut down
- Closes #22
2016-02-29 21:56:29 -08:00
James Hillyerd
28adcf0437 Graceful shutdown on error for httpd, smtpd, pop3d 2016-02-29 20:21:49 -08:00
James Hillyerd
4b4121bb3a Use channels to communicate shutdown request
- httpd now uses shutdown channel
- smtpd now uses shutdown channel
- pop3d now uses shutdown channel
- timedExit now removes PID file
- tidy up some struct instantiations, var blocks
2016-02-28 23:48:09 -08:00
James Hillyerd
982ad857e8 Take care of more TODO flagged code
- Improve TODO comments, mention related issues
- Export ErrNotWritable, move it to datastore.go
- Improve logging of corrupt mailbox GOB file
2016-02-28 16:14:37 -08:00
James Hillyerd
3f654e48be Fix retention tests on Windows 2016-02-28 13:42:17 -08:00
James Hillyerd
e6b7e335cb Follow meta-linter recommendations for all of Inbucket
- Rename BUILD_DATE to BUILDDATE in goxc
- Update travis config
- Follow linter recommendations for inbucket.go
- Follow linter recommendations for config package
- Follow linter recommendations for log package
- Follow linter recommendations for pop3d package
- Follow linter recommendations for smtpd package
- Follow linter recommendations for web package
- Fix Id -> ID in templates
- Add shebang to REST demo scripts
- Add or refine many comments
2016-02-22 00:16:45 -08:00
James Hillyerd
affcc01d19 Convert test message lengths to int64 to fix tests 2015-05-02 10:34:33 -07:00
James Hillyerd
88ae99abb0 Reformat *.go with goimports command 2014-05-19 19:40:33 -07:00
James Hillyerd
63084c67b9 Support numeric domain-parts, closes #24 2014-05-19 19:08:39 -07:00
James Hillyerd
d98e6a2b58 Missing message is now 404 instead of 500
- Added smtpd.ErrNotExist to make detecting missing message easier
- Return 404 instead of 500 when requesting a non-extistant message
- More REST unit tests
2013-11-14 15:08:46 -08:00
James Hillyerd
46fa714cc7 Add configurable mailbox message cap
- Add new configuration option [datastore]mailbox.message.cap
- Modify filestore to enforce message cap if value > 0
- Filestore unit tests for message cap when enabled & disabled
- Change to DataStore.Mailbox.NewMessage() interface to allow error
  return
2013-11-12 10:42:39 -08:00
James Hillyerd
2e1c937d23 Now adds a Recieved: header to raw message 2013-11-09 12:57:45 -08:00
James Hillyerd
df11575b3a Handle missing .raw better, closes #19
- Add filestore unit tests to exercise #19
- Move deferred file close under error check
- Handle error message from server gracefully on message click
- Scroll to top of page when message loads successfully
2013-11-09 08:47:20 -08:00
James Hillyerd
d80521b24d Use MockDataStore for handler_test.go 2013-11-06 17:18:56 -08:00
James Hillyerd
ef48b9c2dd Extend ParseMailboxName()
- Checks for invalid characters, returns useful error if it finds them
- Extended unit tests for ParseMailboxName
- Closes #6
2013-11-06 15:36:46 -08:00
James Hillyerd
6b606ebb9b SMTP, logging changes
- smtpd/handler uses ParseEmailAddress() when opening mailbox and
  checking domainNoStore
- Added host info to logging for both SMTP and POP3, closes #16
2013-11-05 15:18:19 -08:00
James Hillyerd
a0a5a9acb0 Wire address validation into MAIL & RCPT handlers 2013-11-05 12:12:25 -08:00
James Hillyerd
596b268380 Completed ParseEmailAddress() 2013-11-04 17:02:17 -08:00
James Hillyerd
193a5f6f13 Commit incomplete ParseEmailAddress() 2013-11-04 16:18:30 -08:00
James Hillyerd
21ad7a2452 Checkpoint before converting Validator->Parser 2013-11-04 14:00:23 -08:00
James Hillyerd
bd4db645bb ValidateLocalPart: Handle backslash quoted chars 2013-11-03 20:53:37 -08:00
James Hillyerd
ba943cb682 Initial version of ValidateLocalPart
Does not support any quoting yet, not RFC compliant
2013-11-03 10:25:34 -08:00
James Hillyerd
b2c3c4ce0f More testing
Test DATA on handler
Add a 2 second wait if the test fails so that all the logging data can
be collected.
2013-10-30 14:42:55 -07:00
James Hillyerd
038f4fafd3 Capture log output during unit tests 2013-10-30 11:43:35 -07:00
James Hillyerd
f34a73f8a6 Domain validator + tests (unwired) 2013-10-29 20:40:47 -07:00
James Hillyerd
e5b6ed2230 Add many more SMTP handler tests 2013-10-29 17:01:54 -07:00
James Hillyerd
38c124875e Prevent panic when submitting an empty message 2013-10-29 17:01:21 -07:00
James Hillyerd
00243a622f Framework for testing SMTP over Pipe() connection 2013-10-29 13:58:21 -07:00
James Hillyerd
5ccd6b2044 Inversion of Control for smtpd.Server
Allow more control over how Server is instaniated so that it can be unit
tested.
2013-10-29 10:27:55 -07:00