mirror of
https://github.com/decke/smtprelay.git
synced 2026-11-06 07:51:36 -06:00
Fix IPv6 remote address formatting
This commit is contained in:
1 parent
37279f241c
commit
7881935f54
3 files changed
+110
-1
No files matched your search
+2
-1
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/smtp"
|
||||
"net/url"
|
||||
)
|
||||
@@ -55,7 +56,7 @@ func ParseRemote(remoteURL string) (*Remote, error) {
|
||||
Scheme: u.Scheme,
|
||||
Hostname: hostname,
|
||||
Port: port,
|
||||
Addr: fmt.Sprintf("%s:%s", hostname, port),
|
||||
Addr: net.JoinHostPort(hostname, port),
|
||||
}
|
||||
|
||||
if u.User != nil {
|
||||
|
||||
Reference in new issue
Block a user