Your message dated Mon, 3 Mar 2008 01:20:37 -0600
with message-id <[EMAIL PROTECTED]>
and subject line Closing
has caused the Debian Bug report #257892,
regarding offlineimap: header line insertion point still wrong (I think)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
257892: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257892
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: offlineimap
Version: 4.0.4
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Currently, the header line insertion point logic looks like this:

 1)  find the first \r\n
 2a) if found, insert new header line _after_ it
 2b) if not found, insert new header line before message

I think there are a couple of problems with this.

a) logical header lines spanning multiple lines, like so:
    | Received: from foo [....]
    |           by bar (.......)
   turns into
    | Received: from foo [....]
    | X-OfflineIMAP-....: ....
    |           by bar

b) if the content variable also contains the email body
   (I'm not sure about that at this point), then the logic
   in 2a is also broken if the original message contains
   no header line at all (ie starts with \r\n), because it
   will add a line to the body instead of the header.

I'm seeing the problem in a) and had reported a bug about this
(which was #254261), but either there's something wrong here, or
the bug isn't fixed. I'm looking at code that looks like it'll
make the mistake.

I think the logic should be like this:
 1) check if message starts with \r\n (see problem b),
    if so insert header line just at the start and be done with it
 2) insert the header line at the position given by
     | re.compile(r"\r\n[^\s]").search(content).start()
    as that takes continued lines into account.

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (400, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.3
Locale: LANG=C, [EMAIL PROTECTED] (ignored: LC_ALL set to en_US)

Versions of packages offlineimap depends on:
ii  python2.3                     2.3.4-4    An interactive high-level object-o

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Comment: Johannes Berg (SIP Solutions)

iQIVAwUBQOmZBKVg1VMiehFYAQKhwA/9HN3fI+hmj8Nw/0ucYdcrLpUNRPmpn1Fq
hLlU/jDqy6ST+3cWCEEHNZDvzPs52Fmmu4+vZsP85ThMRxGEk/bWKyTTjNyhFKFH
tGtzyAQyf0X50rWwEOcINtWW80jH0qV9b++SMUygvGP9FfCkTqSOqcZwIEKCHgA3
YbkgKMt5Th+Hsywdr2YCxpuMWYJg2swD9mZbk3qALgNBZF90IfDWofhhEjrcW5xD
1VwAY29B74SULXS8yuCxTydXPiSDtd2AewbiatKQvy/vNQDVWZmvNe2qsEwf6oOv
84j5SKlnOctemPklmnnhXPZTWHarfjzFbFQWrdRIClbz8a27hWccEqsE2jOM1YZf
XWzR+yDUFPcgvPJs+ESMPT4AYgLYTYYish4hBRc0Jy01N8LiS245LNotdtvOAGGT
O823+peHQ2KUUrpaQipG3EPcazlKheb26X/sUPucCV/0feeo/a0HtAf3e5Pgyg6T
98OQw9kJAy2Ij64x/DsEBaY76Ob2e88G0wrzgR5mOj0JT6hWm9WFbQzSSCgwILVc
hx+AQS07vB0i6nvKltKxLXG5Ou46Rjdt67jcg3HXnmzoCCtHOOBPiv2dc+0wCrRM
QVctbB1UEmmd4L+D7ifpmcVpUAtzOcwG2wypm0zjjEMLz4QGmCz3C0f3YANue8x5
BK/cQvAwxOM=
=EN6d
-----END PGP SIGNATURE-----


--- End Message ---
--- Begin Message ---
Thanks, Johannes.

-- 
John Goerzen
Author, Foundations of Python Network Programming
http://www.amazon.com/exec/obidos/tg/detail/-/1590593715


--- End Message ---

Reply via email to