1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-21 15:17:01 +00:00

Improve handling of <> addresses

We can send and received with a <> "mail from", which is explicitly allowed.

Internally, we use "<>" to represent it. This requires special-casing in a
couple of places, but makes sure the handling is explicit, and we don't
accidentally confuse it with not having a source address.

This patch fixes some inconsistencies with this handling.
This commit is contained in:
Alberto Bertogli
2016-09-25 15:57:07 +01:00
parent 0bf5d9b242
commit 927a74aa3c

View File

@@ -100,6 +100,10 @@ retry:
// Go's smtp does not allow us to do this, so leave for when we do it // Go's smtp does not allow us to do this, so leave for when we do it
// ourselves. // ourselves.
// c.Mail will add the <> for us when the address is empty.
if from == "<>" {
from = ""
}
if err = c.Mail(from); err != nil { if err = c.Mail(from); err != nil {
return tr.Errorf("MAIL %v", err), false return tr.Errorf("MAIL %v", err), false
} }