From 8dc83edef0b512b3b658a82a26485b3c012b5477 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 26 Mar 2012 22:36:22 +0200 Subject: [PATCH] Remove old smtpqueue code --- webcit/smtpqueue.c | 155 --------------------------------------------- 1 file changed, 155 deletions(-) diff --git a/webcit/smtpqueue.c b/webcit/smtpqueue.c index b059ff905..0ce44e328 100644 --- a/webcit/smtpqueue.c +++ b/webcit/smtpqueue.c @@ -5,161 +5,6 @@ #include "webcit.h" HashList *QItemHandlers = NULL; -/* - * display one message in the queue - */ -void display_queue_msg(long msgnum) -{ - char buf[1024]; - char keyword[32]; - int in_body = 0; - int is_delivery_list = 0; - time_t submitted = 0; - time_t attempted = 0; - time_t last_attempt = 0; - int number_of_attempts = 0; - char sender[256]; - char recipients[65536]; - int recipients_len = 0; - char thisrecp[256]; - char thisdsn[256]; - char thismsg[512]; - int thismsg_len; - long msgid = 0; - int len; - - strcpy(sender, ""); - strcpy(recipients, ""); - recipients_len = 0; - - serv_printf("MSG2 %ld", msgnum); - serv_getln(buf, sizeof buf); - if (buf[0] != '1') return; - - while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { - - if (!IsEmptyStr(buf)) { - len = strlen(buf); - if (buf[len - 1] == 13) { - buf[len - 1] = 0; - } - } - - if ( (IsEmptyStr(buf)) && (in_body == 0) ) { - in_body = 1; - } - - if ( (!in_body) - && (!strncasecmp(buf, "Content-type: application/x-citadel-delivery-list", 49)) - ) { - is_delivery_list = 1; - } - - if ( (in_body) && (!is_delivery_list) ) { - while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { - /* Not a delivery list; flush and return quietly. */ - } - return; - } - - if ( (in_body) && (is_delivery_list) ) { - extract_token(keyword, buf, 0, '|', sizeof keyword); - - if (!strcasecmp(keyword, "msgid")) { - msgid = extract_long(buf, 1); - } - - if (!strcasecmp(keyword, "submitted")) { - submitted = extract_long(buf, 1); - } - - if (!strcasecmp(keyword, "attempted")) { - attempted = extract_long(buf, 1); - ++number_of_attempts; - if (attempted > last_attempt) { - last_attempt = attempted; - } - } - - if (!strcasecmp(keyword, "bounceto")) { - char *atsign; - extract_token(sender, buf, 1, '|', sizeof sender); - - /* Strip off local hostname if it's our own */ - atsign = strchr(sender, '@'); - if (atsign != NULL) { - ++atsign; - if (!strcasecmp(atsign, ChrPtr(WC->serv_info->serv_nodename))) { - --atsign; - *atsign = 0; - } - } - } - - if (!strcasecmp(keyword, "remote")) { - thismsg[0] = 0; - - extract_token(thisrecp, buf, 1, '|', sizeof thisrecp); - extract_token(thisdsn, buf, 3, '|', sizeof thisdsn); - - if (!IsEmptyStr(thisrecp)) { - stresc(thismsg, sizeof thismsg, thisrecp, 1, 1); - if (!IsEmptyStr(thisdsn)) { - strcat(thismsg, "
  "); - stresc(&thismsg[strlen(thismsg)], sizeof thismsg, - thisdsn, 1, 1); - strcat(thismsg, ""); - } - thismsg_len = strlen(thismsg); - - if ((recipients_len + thismsg_len + 100) < sizeof recipients) { - if (!IsEmptyStr(recipients)) { - strcpy(&recipients[recipients_len], "
"); - recipients_len += 6; - } - strcpy(&recipients[recipients_len], thismsg); - recipients_len += thismsg_len; - } - } - - } - - } - - } - - wc_printf(""); - wc_printf("%ld
", msgnum); - wc_printf(" %s", - msgnum, msgid, _("(Delete)") - ); - - wc_printf(""); - if (submitted > 0) { - webcit_fmt_date(buf, 1024, submitted, 1); - wc_printf("%s", buf); - } - else { - wc_printf(" "); - } - - wc_printf(""); - if (last_attempt > 0) { - webcit_fmt_date(buf, 1024, last_attempt, 1); - wc_printf("%s", buf); - } - else { - wc_printf(" "); - } - - wc_printf(""); - escputs(sender); - - wc_printf(""); - wc_printf("%s", recipients); - wc_printf("\n"); - -} typedef struct _mailq_entry { -- 2.30.2