---
 smtpd/mda.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/smtpd/mda.c b/smtpd/mda.c
index 23d288e..24c7442 100644
--- a/smtpd/mda.c
+++ b/smtpd/mda.c
@@ -447,9 +447,15 @@ mda_imsg(struct mproc *p, struct imsg *imsg)
 
                        /* update queue entry */
                        if (error) {
-                               queue_tempfail(e->id, 0, error);
-                               snprintf(buf, sizeof buf, "Error (%s)", error);
-                               mda_log(e, "TempFail", buf);
+                               if (strncmp(error, "BOUNCE:", 7) == 0) {
+                                       error += 7;
+                                       queue_permfail(e->id, error);
+                                       mda_log(e, "PermFail", error);
+                               } else {
+                                       queue_tempfail(e->id, 0, error);
+                                       snprintf(buf, sizeof buf, "Error (%s)", 
error);
+                                       mda_log(e, "TempFail", buf);
+                               }
                        }
                        else {
                                queue_ok(e->id);
-- 
1.8.2.1


-- 
You received this email because you are subscribed to mailing list: 
[email protected]
To unsubscribe, send mail with subject:
        [[email protected]] unregister

Reply via email to