1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

smtp: Wire in policy.Recipient for #84

This commit is contained in:
James Hillyerd
2018-03-17 12:39:09 -07:00
parent 469a778d81
commit b9003a9328
4 changed files with 47 additions and 66 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/jhillyerd/inbucket/pkg/log"
"github.com/jhillyerd/inbucket/pkg/message"
"github.com/jhillyerd/inbucket/pkg/msghub"
"github.com/jhillyerd/inbucket/pkg/policy"
"github.com/jhillyerd/inbucket/pkg/rest"
"github.com/jhillyerd/inbucket/pkg/server/pop3"
"github.com/jhillyerd/inbucket/pkg/server/smtp"
@@ -135,7 +136,8 @@ func main() {
go pop3Server.Start(rootCtx)
// Startup SMTP server
smtpServer = smtp.NewServer(config.GetSMTPConfig(), shutdownChan, ds, msgHub)
apolicy := &policy.Addressing{Config: config.GetSMTPConfig()}
smtpServer = smtp.NewServer(config.GetSMTPConfig(), shutdownChan, ds, apolicy, msgHub)
go smtpServer.Start(rootCtx)
// Loop forever waiting for signals or shutdown channel