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
9836c0ffbb
go: update mod and imports to correctly reflect major version ( #388 )
2023-09-09 12:36:21 -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
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
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
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
Timur Makarchuk
c096f018d6
Add support for AUTH, closes #62
...
* Add PLAIN and LOGIN auth support
2021-04-10 13:58:18 -07:00
James Hillyerd
316a732e7f
cmd, pkg: add line breaks to several go source files
2020-07-26 11:59:27 -07:00
Sascha Andres
046de42774
allow empty envelope ( #166 )
...
* feat: allow empty MAIL FROM
Closes #164
2020-07-25 10:23:31 -07:00
James Hillyerd
3a1c757d04
smtp: Handle late EHLO, fixes #141
2019-08-17 15:46:28 -07:00
James Hillyerd
e4c48a0705
go code: rename to github.com/inbucket/inbucket
2019-02-24 09:43:10 -08:00
James Hillyerd
0d7c94c531
smtp: add missing log message param
2018-10-20 11:13:39 -07:00
kingforaday
00dad88bde
Fixing an erroneous connection close introduced in #98 . ( #101 )
2018-05-20 09:51:40 -07:00
James Hillyerd
fdcb29a52b
smtp: rename readByteLine to readDataBlock for #98 .
...
Update change log.
2018-05-06 12:09:55 -07:00
kingforaday
894db04d70
Opportunistic TLS Support ( #98 )
...
* STARTTLS Support, disabled by default.
* Added documentation
2018-05-06 11:56:38 -07:00
James Hillyerd
12f98868ba
smtp/policy: Store messages with full naming for #33
...
- Added some tests to make sure stores do not enforce their own naming.
- Improve recipient structured logging.
2018-04-07 13:06:56 -07:00
James Hillyerd
ff2121fbb9
policy: Add support for MailboxNaming to ExtractMailbox for #33
2018-04-04 20:22:40 -07:00
James Hillyerd
c2e1d58b90
policy: Accept Root config instead of SMTP for #33
2018-04-02 19:43:05 -07:00
James Hillyerd
064549f576
policy: Implement store domain policy for #51
...
- Update docs, change log, status.html
2018-04-01 19:59:04 -07:00
James Hillyerd
a7d2b00a9c
policy: Implement recipient domain policy for #51
...
- INBUCKET_SMTP_DEFAULTACCEPT
- INBUCKET_SMTP_ACCEPTDOMAINS
- INBUCKET_SMTP_REJECTDOMAINS
2018-04-01 18:05:21 -07:00
James Hillyerd
3fe4140733
pop3, smtp: embed Server struct into Session for #91
2018-03-31 17:09:30 -07:00
James Hillyerd
2c813081eb
smtp: Use config.SMTP directly in Server #91
2018-03-31 16:49:52 -07:00
James Hillyerd
e076f80416
smtp: Use zerolog hooks for warns/errors expvars #90
2018-03-31 14:06:58 -07:00
James Hillyerd
92f2da5025
server: -netdebug flag now controls tracing for #90
...
Network trace is sent to stdout, no longer part of normal debug
logging.
2018-03-31 13:37:42 -07:00
James Hillyerd
6601d156be
metric: new pkg refactored from log for #90
2018-03-31 12:16:54 -07:00
James Hillyerd
779b1e63af
smtp, pop3: Use zerolog for session logging #90
2018-03-27 21:52:28 -07:00
James Hillyerd
6f25a1320e
pop3, smtp: rename Session method receivers to s
2018-03-27 20:51:13 -07:00
James Hillyerd
e2ba10c8ca
Replace pkg/log with zerolog for normal logging #90
2018-03-27 20:26:06 -07:00
James Hillyerd
f0a94f4848
More config cleanups for #86
2018-03-22 20:03:05 -07:00
James Hillyerd
845cbedc0d
config: Replace robfig with envconfig for #86
...
- Initial envconfig system is working, not bulletproof.
- Added sane defaults for required parameters.
2018-03-21 22:50:21 -07:00
James Hillyerd
f953bcf4bb
smtp: Move delivery into message.Manager for #69
2018-03-17 17:04:12 -07:00
James Hillyerd
dc4db59211
smtp: Don't require MIME headers for metadata
...
This was a regression, will again fall back to MAIL FROM/RCPT TO data.
2018-03-17 14:41:03 -07:00
James Hillyerd
e84b1f8952
storage: Make locking an implementation detail for #69
...
- file: Store handles its own locking #77
- file: Move mbox into its own file
- file & test: remove LockFor()
2018-03-17 14:02:50 -07:00
James Hillyerd
b9003a9328
smtp: Wire in policy.Recipient for #84
2018-03-17 12:39:09 -07:00
James Hillyerd
d132efd6fa
policy: Create new policy package for #84
2018-03-17 09:48:53 -07:00
James Hillyerd
5e13e50763
test: Start work on test suite for #82
...
- smtp: Tidy up []byte/buffer/string use in delivery #69
2018-03-14 22:51:40 -07:00
James Hillyerd
2cc0da3093
storage: More refactoring for #69
...
- impl Store.AddMessage
- file: Use AddMessage() in tests
- smtp: Switch to AddMessage
- storage: Remove NewMessage, Append, Close methods
2018-03-14 20:37:20 -07:00
James Hillyerd
3bc66d2788
storage: Store addresses as mail.Address for #69
2018-03-11 16:57:53 -07:00
James Hillyerd
487e491d6f
storage: Message refactoring for #69
...
- Message interface renamed to StoreMessage
- Message.Delete becomes Store.RemoveMessage
- Added deleted message tracking to Store stub for #80
2018-03-11 15:01:40 -07:00
James Hillyerd
12ad0cb3f0
storage: Eliminate storage.Mailbox interface for #69
...
storage/file Mailbox has been renamed mbox, and is now just an
implementation detail.
2018-03-11 11:54:35 -07:00
James Hillyerd
137466f89b
storage: Move NewMessage() into Store interface for #69
2018-03-11 10:48:50 -07:00
James Hillyerd
d9b5e40c87
storage: More refactoring for #69
...
- retention: Start from pkg main instead of server/smtp
- file: Remove DefaultStore() constructor
- storage: AllMailboxes replaced with VisitMailboxes for #69
- test: Stub VisitMailboxes for #80
2018-03-10 22:05:10 -08:00