I have been tracking down a forward problem, see thread starting here:
http://mailman.fastxs.net/pipermail/dbmail/2004-March/004366.html
Anyway I have forwarding working now, but I don't know if I've missed something.
Also, Here is a patch to allow for linking against the mysql server. I don't know why
this wasn't fixed in rc3?
So, my question is: Why was the header put in the message in forward.c and in db.c?
removing from forward.c allows for mail to forwaord properly without duplicate headers.
ed
diff -c -r dbmail-2.0rc3/forward.c dbmail-2.0rc3-ed/forward.c
*** dbmail-2.0rc3/forward.c 2004-03-03 04:30:07.000000000 -0500
--- dbmail-2.0rc3-ed/forward.c 2004-03-08 15:49:45.000000000 -0500
***************
*** 128,134 ****
}
/* first send header if this is a direct pipe through */
! fprintf (pipe, "%s", header);
trace(TRACE_DEBUG, "forward(): wrote header to pipe");
trace(TRACE_INFO, "forward(): sending message id number [%llu] to forward pipe", msgidnr);
--- 128,134 ----
}
/* first send header if this is a direct pipe through */
! //fprintf (pipe, "%s", header);
trace(TRACE_DEBUG, "forward(): wrote header to pipe");
trace(TRACE_INFO, "forward(): sending message id number [%llu] to forward pipe", msgidnr);
diff -c -r dbmail-2.0rc3/imapcommands.c dbmail-2.0rc3-ed/imapcommands.c
*** dbmail-2.0rc3/imapcommands.c 2004-01-30 11:24:35.000000000 -0500
--- dbmail-2.0rc3-ed/imapcommands.c 2004-03-07 12:08:42.000000000 -0500
***************
*** 2047,2053 ****
}
}
! fetch_list.start = list_reverse(fetch_list.start);
/* now fetch results for each msg */
endptr = args[0];
--- 2047,2053 ----
}
}
! fetch_list.start = dbmail_list_reverse(fetch_list.start);
/* now fetch results for each msg */
endptr = args[0];
diff -c -r dbmail-2.0rc3/list.c dbmail-2.0rc3-ed/list.c
*** dbmail-2.0rc3/list.c 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.c 2004-03-07 12:10:32.000000000 -0500
***************
*** 65,71 ****
*
* reverse the order of a linked list
*/
! struct element* list_reverse(struct element *start)
{
struct element *newstart;
--- 65,71 ----
*
* reverse the order of a linked list
*/
! struct element* dbmail_list_reverse(struct element *start)
{
struct element *newstart;
***************
*** 75,81 ****
if (!start->nextnode)
return start; /* nothing to reverse */
! newstart = list_reverse(start->nextnode); /* reverse rest of list */
start->nextnode->nextnode = start;
start->nextnode = NULL; /* terminate list */
--- 75,81 ----
if (!start->nextnode)
return start; /* nothing to reverse */
! newstart = dbmail_list_reverse(start->nextnode); /* reverse rest of list */
start->nextnode->nextnode = start;
start->nextnode = NULL; /* terminate list */
diff -c -r dbmail-2.0rc3/list.h dbmail-2.0rc3-ed/list.h
*** dbmail-2.0rc3/list.h 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.h 2004-03-07 12:09:18.000000000 -0500
***************
*** 59,64 ****
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* list_reverse(struct element *start);
#endif
--- 59,64 ----
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* dbmail_list_reverse(struct element *start);
#endif
diff -c -r dbmail-2.0rc3/lmtp.c dbmail-2.0rc3-ed/lmtp.c
*** dbmail-2.0rc3/lmtp.c 2004-03-05 03:10:12.000000000 -0500
--- dbmail-2.0rc3-ed/lmtp.c 2004-03-07 12:09:29.000000000 -0500
***************
*** 532,538 ****
struct element *element;
/* The replies MUST be in the order received */
! rcpt.start = list_reverse(rcpt.start);
/* Resolve the addresses into deliverable / non-deliverable form. */
if (dsnuser_resolve_list(&rcpt) == -1)
--- 532,538 ----
struct element *element;
/* The replies MUST be in the order received */
! rcpt.start = dbmail_list_reverse(rcpt.start);
/* Resolve the addresses into deliverable / non-deliverable form. */
if (dsnuser_resolve_list(&rcpt) == -1)
diff -c -r dbmail-2.0rc3/rfcmsg.c dbmail-2.0rc3-ed/rfcmsg.c
*** dbmail-2.0rc3/rfcmsg.c 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/rfcmsg.c 2004-03-07 12:09:48.000000000 -0500
***************
*** 90,100 ****
}
/* reverse this list */
! msg->children.start = list_reverse(msg->children.start);
/* reverse header items */
! msg->mimeheader.start = list_reverse(msg->mimeheader.start);
! msg->rfcheader.start = list_reverse(msg->rfcheader.start);
}
/*
--- 90,100 ----
}
/* reverse this list */
! msg->children.start = dbmail_list_reverse(msg->children.start);
/* reverse header items */
! msg->mimeheader.start = dbmail_list_reverse(msg->mimeheader.start);
! msg->rfcheader.start = dbmail_list_reverse(msg->rfcheader.start);
}
/*
Security on the internet is impossible without strong, open,
and unhindered encryption.
http://mailman.fastxs.net/pipermail/dbmail/2004-March/004366.html
Anyway I have forwarding working now, but I don't know if I've missed something.
Also, Here is a patch to allow for linking against the mysql server. I don't know why
this wasn't fixed in rc3?
So, my question is: Why was the header put in the message in forward.c and in db.c?
removing from forward.c allows for mail to forwaord properly without duplicate headers.
ed
diff -c -r dbmail-2.0rc3/forward.c dbmail-2.0rc3-ed/forward.c
*** dbmail-2.0rc3/forward.c 2004-03-03 04:30:07.000000000 -0500
--- dbmail-2.0rc3-ed/forward.c 2004-03-08 15:49:45.000000000 -0500
***************
*** 128,134 ****
}
/* first send header if this is a direct pipe through */
! fprintf (pipe, "%s", header);
trace(TRACE_DEBUG, "forward(): wrote header to pipe");
trace(TRACE_INFO, "forward(): sending message id number [%llu] to forward pipe", msgidnr);
--- 128,134 ----
}
/* first send header if this is a direct pipe through */
! //fprintf (pipe, "%s", header);
trace(TRACE_DEBUG, "forward(): wrote header to pipe");
trace(TRACE_INFO, "forward(): sending message id number [%llu] to forward pipe", msgidnr);
diff -c -r dbmail-2.0rc3/imapcommands.c dbmail-2.0rc3-ed/imapcommands.c
*** dbmail-2.0rc3/imapcommands.c 2004-01-30 11:24:35.000000000 -0500
--- dbmail-2.0rc3-ed/imapcommands.c 2004-03-07 12:08:42.000000000 -0500
***************
*** 2047,2053 ****
}
}
! fetch_list.start = list_reverse(fetch_list.start);
/* now fetch results for each msg */
endptr = args[0];
--- 2047,2053 ----
}
}
! fetch_list.start = dbmail_list_reverse(fetch_list.start);
/* now fetch results for each msg */
endptr = args[0];
diff -c -r dbmail-2.0rc3/list.c dbmail-2.0rc3-ed/list.c
*** dbmail-2.0rc3/list.c 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.c 2004-03-07 12:10:32.000000000 -0500
***************
*** 65,71 ****
*
* reverse the order of a linked list
*/
! struct element* list_reverse(struct element *start)
{
struct element *newstart;
--- 65,71 ----
*
* reverse the order of a linked list
*/
! struct element* dbmail_list_reverse(struct element *start)
{
struct element *newstart;
***************
*** 75,81 ****
if (!start->nextnode)
return start; /* nothing to reverse */
! newstart = list_reverse(start->nextnode); /* reverse rest of list */
start->nextnode->nextnode = start;
start->nextnode = NULL; /* terminate list */
--- 75,81 ----
if (!start->nextnode)
return start; /* nothing to reverse */
! newstart = dbmail_list_reverse(start->nextnode); /* reverse rest of list */
start->nextnode->nextnode = start;
start->nextnode = NULL; /* terminate list */
diff -c -r dbmail-2.0rc3/list.h dbmail-2.0rc3-ed/list.h
*** dbmail-2.0rc3/list.h 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.h 2004-03-07 12:09:18.000000000 -0500
***************
*** 59,64 ****
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* list_reverse(struct element *start);
#endif
--- 59,64 ----
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* dbmail_list_reverse(struct element *start);
#endif
diff -c -r dbmail-2.0rc3/lmtp.c dbmail-2.0rc3-ed/lmtp.c
*** dbmail-2.0rc3/lmtp.c 2004-03-05 03:10:12.000000000 -0500
--- dbmail-2.0rc3-ed/lmtp.c 2004-03-07 12:09:29.000000000 -0500
***************
*** 532,538 ****
struct element *element;
/* The replies MUST be in the order received */
! rcpt.start = list_reverse(rcpt.start);
/* Resolve the addresses into deliverable / non-deliverable form. */
if (dsnuser_resolve_list(&rcpt) == -1)
--- 532,538 ----
struct element *element;
/* The replies MUST be in the order received */
! rcpt.start = dbmail_list_reverse(rcpt.start);
/* Resolve the addresses into deliverable / non-deliverable form. */
if (dsnuser_resolve_list(&rcpt) == -1)
diff -c -r dbmail-2.0rc3/rfcmsg.c dbmail-2.0rc3-ed/rfcmsg.c
*** dbmail-2.0rc3/rfcmsg.c 2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/rfcmsg.c 2004-03-07 12:09:48.000000000 -0500
***************
*** 90,100 ****
}
/* reverse this list */
! msg->children.start = list_reverse(msg->children.start);
/* reverse header items */
! msg->mimeheader.start = list_reverse(msg->mimeheader.start);
! msg->rfcheader.start = list_reverse(msg->rfcheader.start);
}
/*
--- 90,100 ----
}
/* reverse this list */
! msg->children.start = dbmail_list_reverse(msg->children.start);
/* reverse header items */
! msg->mimeheader.start = dbmail_list_reverse(msg->mimeheader.start);
! msg->rfcheader.start = dbmail_list_reverse(msg->rfcheader.start);
}
/*
Security on the internet is impossible without strong, open,
and unhindered encryption.