sreangsu acharyya forced the electrons to say:
>   as Suresh pointed out, its only the "Received:" header which breaks
> line. The subsequent lines usually begins with a "by" or "for" and
> sometimes the "id".

IIRC, It is an RFC 822 requirement that folded header lines in a mail
should be indented by whitespace. So, something like:

in_headers = true;
while (in_headers) {
   read (line);
   if (matches (line, '^$'))
      in_headers = false;
   else if (matches (line, '^[[:alpha:]]*:'))
      register_new_header (line);
   else if (matches (line, '^[[:space:]]'))
      continue_last_header (line);
   else
      handle_header_format_error();
}

should work.

Binand

PS: Don't have RFC 822 handy, so cannot verify the statement I made
above. :-)


----------------------------------------------
Find out more about this and other Linux India 
mailing lists at http://lists.linux-india.org/

Reply via email to