SMTP-Client: first add backups, then Relays, since we want Relays to be attempted...
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 12 Jul 2012 21:43:07 +0000 (23:43 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 12 Jul 2012 21:43:07 +0000 (23:43 +0200)
citadel/modules/smtp/serv_smtpqueue.c

index 0fa9956b0441c8e191117e86e137d8569307e2fe..0fa65bea2000901c0098d814f5fcabbc9f0cb481 100644 (file)
@@ -817,7 +817,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
        {
                char mxbuf[SIZ];
                ParsedURL **Url = &MyQItem->URL;
-               nRelays = get_hosts(mxbuf, "smarthost");
+               nRelays = get_hosts(mxbuf, "fallbackhost");
                if (nRelays > 0) {
                        StrBuf *All;
                        StrBuf *One;
@@ -836,7 +836,6 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                                                     ChrPtr(One));
                                }
                                else {
-                                       ///if (!Url->IsIP)) // todo dupe me fork ipv6
                                        (*Url)->IsRelay = 1;
                                        MyQItem->HaveRelay = 1;
                                }
@@ -844,9 +843,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                        FreeStrBuf(&All);
                        FreeStrBuf(&One);
                }
-
-               Url = &MyQItem->FallBackHost;
-               nRelays = get_hosts(mxbuf, "fallbackhost");
+               nRelays = get_hosts(mxbuf, "smarthost");
                if (nRelays > 0) {
                        StrBuf *All;
                        StrBuf *One;
@@ -865,6 +862,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                                                     ChrPtr(One));
                                }
                                else {
+                                       ///if (!Url->IsIP)) // todo dupe me fork ipv6
                                        (*Url)->IsRelay = 1;
                                        MyQItem->HaveRelay = 1;
                                }
@@ -872,6 +870,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                        FreeStrBuf(&All);
                        FreeStrBuf(&One);
                }
+
        }
 
        It = GetNewHashPos(MyQItem->MailQEntries, 0);