-
- /* Get the Return-Path information from the "From " envelope. */
- snprintf(rp, rplen, "%.*s\n", (int)(bp - ap), ap);
-
- /*
- ** advance over the spaces to get to
- ** delivery date on envelope
- */
- while (*bp == ' ')
- bp++;
-
- /* Now get delivery date from envelope */
- snprintf(dd, ddlen, "%.*s\n", 24, bp);
-
- *unixbuf = '\0';
+ }
+ /* Extract the Return-Path. */
+ snprintf(rp, rplen, "%.*s\n", (int)(cp - fromline), fromline);
+ /* Advance over the whitespace. */
+ while (*cp == ' ' || *cp == '\t') {
+ cp++;
+ }
+ /* Extract the Delivery-Date. */
+ snprintf(dd, ddlen, "%.*s\n", 24, cp);
+ *fromline = '\0';