mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-08 17:51:57 +00:00
Distinguish between permanent and transient errors
This patch makes the queue and couriers distinguish between permanent and transient errors when delivering mail to individual recipients. Pipe delivery errors are always permanent. Procmail delivery errors are almost always permanent, except if the command exited with code 75, which is an indication of transient. SMTP delivery errors are almost always transient, except if the DNS resolution for the domain failed.
This commit is contained in:
@@ -73,7 +73,7 @@ func TestSMTP(t *testing.T) {
|
||||
*smtpPort = port
|
||||
|
||||
s := &SMTP{}
|
||||
err := s.Deliver("me@me", "to@to", []byte("data"))
|
||||
err, _ := s.Deliver("me@me", "to@to", []byte("data"))
|
||||
if err != nil {
|
||||
t.Errorf("deliver failed: %v", err)
|
||||
}
|
||||
@@ -133,7 +133,7 @@ func TestSMTPErrors(t *testing.T) {
|
||||
*smtpPort = port
|
||||
|
||||
s := &SMTP{}
|
||||
err := s.Deliver("me@me", "to@to", []byte("data"))
|
||||
err, _ := s.Deliver("me@me", "to@to", []byte("data"))
|
||||
if err == nil {
|
||||
t.Errorf("deliver not failed in case %q: %v", rs["_welcome"], err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user