mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
policy: Implement store domain policy for #51
- Update docs, change log, status.html
This commit is contained in:
@@ -365,10 +365,8 @@ func setupSMTPServer(ds storage.Store) (s *Server, buf *bytes.Buffer, teardown f
|
||||
cfg := config.SMTP{
|
||||
Addr: "127.0.0.1:2500",
|
||||
Domain: "inbucket.local",
|
||||
DomainNoStore: "bitbucket.local",
|
||||
MaxRecipients: 5,
|
||||
MaxMessageBytes: 5000,
|
||||
StoreMessages: true,
|
||||
DefaultAccept: true,
|
||||
RejectDomains: []string{"deny.com"},
|
||||
Timeout: 5,
|
||||
|
||||
@@ -97,11 +97,6 @@ func (s *Server) Start(ctx context.Context) {
|
||||
s.emergencyShutdown()
|
||||
return
|
||||
}
|
||||
if !s.config.StoreMessages {
|
||||
slog.Info().Msg("Load test mode active, messages will not be stored")
|
||||
} else if s.config.DomainNoStore != "" {
|
||||
slog.Info().Msgf("Messages sent to domain '%v' will be discarded", s.config.DomainNoStore)
|
||||
}
|
||||
// Listener go routine.
|
||||
go s.serve(ctx)
|
||||
// Wait for shutdown.
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
var TemplateFuncs = template.FuncMap{
|
||||
"friendlyTime": FriendlyTime,
|
||||
"reverse": Reverse,
|
||||
"stringsJoin": strings.Join,
|
||||
"textToHtml": TextToHTML,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user