commit 02e84b5161ed141ac051d10fd3c647dcfc79819b
parent 6cfc732f25d6739ee53d9417f2e688b76aef3125
Author: Brian C. Lane <bcl@brianlane.com>
Date: Sat, 7 Mar 2020 17:36:14 -0800
Make changes suggested by linter
Drop unused field from env, and simplify adding a list of ips to
allowedHosts.
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/main.go b/main.go
@@ -128,9 +128,7 @@ func parseHosts() {
// Does it look like a hostname?
ips, err := net.LookupIP(h)
if err == nil {
- for _, ip := range ips {
- allowedHosts = append(allowedHosts, ip)
- }
+ allowedHosts = append(allowedHosts, ips...)
}
}
}
@@ -140,7 +138,6 @@ type env struct {
rcpts []smtpd.MailAddress
destDirs []*maildir.Dir
deliveries []*maildir.Delivery
- tmpfile string
}
// AddRecipient is called when RCPT TO is received