[Dbmail-dev] Broken subjects in DB

2009-02-23 Thread Axel Steiner
Hi, I've noticed an issue with subjects, whenever an email was forwarded several times. If a subject has more than one "[fwd:" token, then dbmail saves a single "]" character in dbmail_subjectfield, instead of the subject. Example: Re: [Fwd: [Fwd: Test]] -> will be saved as "]" Re: [Fwd: Te

Re: [Dbmail-dev] Broken subjects in DB

2009-02-23 Thread Michael Monnerie
On Montag 23 Februar 2009 Axel Steiner wrote: > Example: > Re: [Fwd: [Fwd: Test]] -> will be saved as "]" > Re: [Fwd: Test] -> saved as "Test" > > In think the problem is in _strip_blob_prefix() in misc.c. But at the >   moment I understand > the code not completely. I thought dm_base_subject() rem

Re: [Dbmail-dev] Broken subjects in DB

2009-02-23 Thread Axel Steiner
Why does dbmail parse that text at all? It must store it as-is. Why is there any decoding or stripping? Good question. I think, that stripping is not necessary!? Is there any reason for? Maybe a config option would be good? strip_subjects = yes/no Decoding makes sense, otherwise imap would

Re: [Dbmail-dev] Broken subjects in DB

2009-02-24 Thread Paul J Stevens
Axel Steiner wrote: >> Why does dbmail parse that text at all? It must store it as-is. Why is >> there any decoding or stripping? Because the subjectfield is for thread=orderedsubject, and thread=orderedsubject so dictates. --

Re: [Dbmail-dev] Broken subjects in DB

2009-02-24 Thread Axel Steiner
Because the subjectfield is for thread=orderedsubject, and thread=orderedsubject so dictates. Damn, I queried the wrong table in my application. Shall I fix the stripping problem? Axel ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twiste

Re: [Dbmail-dev] Broken subjects in DB

2009-02-24 Thread Paul J Stevens
Axel Steiner wrote: > >> >> Because the subjectfield is for thread=orderedsubject, and >> thread=orderedsubject so dictates. > > Damn, I queried the wrong table in my application. Shall > I fix the stripping problem? Please do. Use the unit-tests in test/check_dbmail_imapd.c There is a test-case

Re: [Dbmail-dev] Broken subjects in DB

2009-02-25 Thread Axel Steiner
Paul, I'm a little bit confused about _strip_blob_prefix(). I assume, you want to remove the leading '[' and the trailing ']' character from the subject? But if that is the case, then will strncpy() never be called, because strlen of tmp always is 0. Please correct me, if my assumption is wro

Re: [Dbmail-dev] Broken subjects in DB

2009-02-25 Thread Axel Steiner
I'm a little bit confused about _strip_blob_prefix(). I assume, you want to remove the leading '[' and the trailing ']' character from the subject? But if that is the case, then will strncpy() never be called, because strlen of tmp always is 0. Please correct me, if my assumption is wrong