mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
in DSN, don't add a comment with a nil IP address if we don't have an IP
This commit is contained in:
parent
b190a2cda8
commit
e81ed7af26
1 changed files with 5 additions and 1 deletions
|
@ -262,7 +262,11 @@ func (m *Message) Compose(log *mlog.Log, smtputf8 bool) ([]byte, error) {
|
|||
status("Status", statusLine) // ../rfc/3464:975
|
||||
if !r.RemoteMTA.IsZero() {
|
||||
// ../rfc/3464:1015
|
||||
status("Remote-MTA", fmt.Sprintf("dns;%s (%s)", r.RemoteMTA.Name, smtp.AddressLiteral(r.RemoteMTA.IP)))
|
||||
s := "dns;" + r.RemoteMTA.Name
|
||||
if len(r.RemoteMTA.IP) > 0 {
|
||||
s += " (" + smtp.AddressLiteral(r.RemoteMTA.IP) + ")"
|
||||
}
|
||||
status("Remote-MTA", s)
|
||||
}
|
||||
// Presence of Diagnostic-Code indicates the code is from Remote-MTA. ../rfc/3464:1053
|
||||
if r.DiagnosticCode != "" {
|
||||
|
|
Loading…
Reference in a new issue