mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
More config cleanups for #86
This commit is contained in:
@@ -414,7 +414,7 @@ func (ss *Session) greet() {
|
||||
|
||||
// Calculate the next read or write deadline based on maxIdle
|
||||
func (ss *Session) nextDeadline() time.Time {
|
||||
return time.Now().Add(ss.server.maxIdle)
|
||||
return time.Now().Add(ss.server.timeout)
|
||||
}
|
||||
|
||||
// Send requested message, store errors in Session.sendError
|
||||
|
||||
@@ -366,7 +366,7 @@ func setupSMTPServer(ds storage.Store) (s *Server, buf *bytes.Buffer, teardown f
|
||||
Domain: "inbucket.local",
|
||||
DomainNoStore: "bitbucket.local",
|
||||
MaxRecipients: 5,
|
||||
MaxIdle: 5,
|
||||
Timeout: 5,
|
||||
MaxMessageBytes: 5000,
|
||||
StoreMessages: true,
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ type Server struct {
|
||||
domain string
|
||||
domainNoStore string
|
||||
maxRecips int
|
||||
maxIdle time.Duration
|
||||
maxMessageBytes int
|
||||
storeMessages bool
|
||||
timeout time.Duration
|
||||
|
||||
// Dependencies
|
||||
apolicy *policy.Addressing // Address policy.
|
||||
@@ -89,7 +89,7 @@ func NewServer(
|
||||
domain: cfg.Domain,
|
||||
domainNoStore: strings.ToLower(cfg.DomainNoStore),
|
||||
maxRecips: cfg.MaxRecipients,
|
||||
maxIdle: cfg.MaxIdle,
|
||||
timeout: cfg.Timeout,
|
||||
maxMessageBytes: cfg.MaxMessageBytes,
|
||||
storeMessages: cfg.StoreMessages,
|
||||
globalShutdown: globalShutdown,
|
||||
|
||||
Reference in New Issue
Block a user