- ptr = msg->cm_fields['M'];
- endptr = ptr + strlen(ptr); // only do strlen once :)
- CtdlLogPrintf(CTDL_DEBUG, "\033[33m%s\033[0m\n", ptr);
- while (ptr = memreadlinelen(ptr, buf, (sizeof buf - 2), &len), ((ptr < endptr) && (*ptr != 0)) ) {
- if (in_body) {
- char *pch;
- pch = malloc(len + 1);
- memcpy(pch, buf, len + 1);
- Put(mortuary, pch, len, pch, NULL);
+ /* skip past the headers */
+ ptr = strstr(msg->cm_fields['M'], "\n\n");
+ if (ptr != NULL) {
+ ptr += 2;
+ }
+ else {
+ ptr = strstr(msg->cm_fields['M'], "\n\r\n");
+ if (ptr != NULL) {
+ ptr += 3;