SMTP-Client: decide when to send a bounce or not.
[citadel.git] / citadel / modules / smtp / serv_smtpeventclient.c
index d1815f91bccf3d068ae52172c3edfe48ef1607ea..7374107d810ccbfcdc20d5427651d4c1a097ea19 100644 (file)
@@ -139,6 +139,13 @@ void FinalizeMessageSend(SmtpOutMsg *Msg)
 
        nRemain = CountActiveQueueEntries(Msg->MyQItem);
 
+       if (Msg->MyQEntry->Active && 
+           CheckQEntryIsBounce(Msg->MyQEntry))
+       {
+               /* are we casue for a bounce mail? */
+               Msg->MyQItem->SendBounceMail = 1;
+       }
+
        if ((nRemain > 0) || IDestructQueItem)
                MsgData = SerializeQueueItem(Msg->MyQItem);
        else