]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtpeventclient.c
SMTP-Client: when relaying failed also notify aide that somethings broken.
[citadel.git] / citadel / modules / smtp / serv_smtpeventclient.c
index 9e97dda97aed2e8660abb7b31cf1d46b3d0e83f1..03697d30cf04c6c6f8cf1bd22e7a0a9eaa7d3a80 100644 (file)
@@ -153,9 +153,10 @@ eNextState FinalizeMessageSend_DB(AsyncIO *IO)
 
        Msg->IDestructQueItem = DecreaseQReference(Msg->MyQItem);
 
-       Msg->nRemain = CountActiveQueueEntries(Msg->MyQItem);
+       Msg->nRemain = CountActiveQueueEntries(Msg->MyQItem, 0);
 
        if (Msg->MyQEntry->Active && 
+           !Msg->MyQEntry->StillActive &&
            CheckQEntryIsBounce(Msg->MyQEntry))
        {
                /* are we casue for a bounce mail? */
@@ -176,7 +177,7 @@ eNextState FinalizeMessageSend_DB(AsyncIO *IO)
        Msg->MyQItem->QueMsgID = -1;
 
        if (Msg->IDestructQueItem)
-               smtpq_do_bounce(Msg->MyQItem, Msg->msgtext);
+               smtpq_do_bounce(Msg->MyQItem, Msg->msgtext, Msg->pCurrRelay);
 
        if (Msg->nRemain > 0)
        {