Skip to content

Commit

Permalink
cmd/smtp-debug-server: fix -l ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Dec 9, 2020
1 parent c36845b commit 46a2f74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/smtp-debug-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/emersion/go-smtp"
)

var addr string
var addr = "127.0.0.1:1025"

func init() {
flag.StringVar(&addr, "l", "127.0.0.1:1025", "Listen address")
flag.StringVar(&addr, "l", addr, "Listen address")
}

type backend struct{}
Expand Down Expand Up @@ -50,7 +50,7 @@ func main() {

s := smtp.NewServer(&backend{})

s.Addr = ":1025"
s.Addr = addr
s.Domain = "localhost"
s.AllowInsecureAuth = true
s.Debug = os.Stdout
Expand Down

0 comments on commit 46a2f74

Please sign in to comment.