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

33 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
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
b3db619db9 Broadcast deliveries into msghub for #44 2017-01-16 13:09:50 -08: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ń
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
Tomasz Wojtuń
7adf3741d3 #35 Log error and continue when deleting oldest message fails. 2016-04-27 17:54:17 +02: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
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
88ae99abb0 Reformat *.go with goimports command 2014-05-19 19:40:33 -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
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
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
38c124875e Prevent panic when submitting an empty message 2013-10-29 17:01:21 -07:00
James Hillyerd
1e85699ccf Add REST call for purging an entire mailbox 2013-10-14 15:35:09 -07:00
James Hillyerd
46d4f7be1d Message size calculation changes
Message sizes are now calculated as the message is written out to disk,
and saved into the index.gob file
2013-10-13 21:03:51 -07:00
James Hillyerd
52771e19b6 Finishing up index.gob work
- Wrote more unit tests to make sure filestore behaves as expected
 - Renamed NewFileDataStore to DefaultFileDataStore, implemented a new
   NewFileDataStore for unit tests.
 - filestore now removes entire mailbox dir when last message is deleted
2013-10-13 11:46:20 -07:00
James Hillyerd
08f16db7ac More index.gob work
Use a global lock for reading/writing any index file.  Possible
bottleneck, but good enough for now.

Don't create a mailbox directory until a message is being written to it.
2013-10-11 20:06:33 -07:00
James Hillyerd
9354b9692f First crack at single gob per mailbox, hardly works 2013-10-09 21:43:45 -07:00
James Hillyerd
c9392c7eb1 Wired character-set decoding into From and Subject
- Removed extra message object from ReadBody() return type
 - We now use enmime's GetHeader() when building the GOB, this will get
   us alternate character set decoding for the From and Subject headers.
 - Added a swaks test with a utf-8 subject line
2013-10-01 14:01:08 -07:00
James Hillyerd
2e78e4e6f7 Logging and unit test changes
Logging methods were renamed so they don't trigger go-vet warnings for
error() and Error() formatting.

Unit tests were updated to use new github.com/stretchr repo (was renamed
from stretchrcom)

Missing methods were added to Message mock object.
2013-09-13 14:06:57 -07:00
James Hillyerd
01f6ad514b Started impl DELE 2013-09-12 15:55:45 -07:00
James Hillyerd
983b4f745a More basic POP3 implementation
Filestore/Datastore now supports a Size() method.
2013-09-10 17:56:04 -07:00
James Hillyerd
afe0d779cb Replace internal MIME with go.enmime 2012-11-04 13:25:24 -08:00
James Hillyerd
53bcb52e64 Implementing AllMailboxes 2012-10-25 22:54:17 -07:00
James Hillyerd
57d3b198b2 Refactore FileDataStore into its own file 2012-10-25 22:33:50 -07:00