A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=855 
====================================================================== 
Reported By:                ttessier
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   855
Category:                   Command-Line programs (dbmail-users, dbmail-util)
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             23-Aug-10 19:21 CEST
Last Modified:              23-Aug-10 22:10 CEST
====================================================================== 
Summary:                    Crash on dbmail-export and regular dbmail-imad or
pop mailbox retreival
Description: 
This issue is related to the retrieval of specific emails from the db. I
believe that I am somehow getting a null message into the db. Any help that
you can give on how to work around this issue please let me know. I am
looking at fixing at dbmail-message.c:612 to detect a null and fill it in
appropriately.

I am hoping that you have more knowledge of GMIME_OBJECT to let me know if
I can simply do something like 

return
g_mime_object_to_string(GMIME_OBJECT(self->content?self->content:"(NULL)"));
====================================================================== 

---------------------------------------------------------------------- 
 (0003096) ttessier (reporter) - 23-Aug-10 20:59
 http://www.dbmail.org/mantis/view.php?id=855#c3096 
---------------------------------------------------------------------- 
I have found that it appears the the boundary is not getting applied
properly in gmime. So this is getting a null and is trying to be written as
null. I can modify the gmime sources to prevent the gmime from
segfaulting.

Content-Type: multipart/mixed;
boundary="----=_Part_80_20846071.1281633422966"

 boundary="----=_Part_80_20846071.1281633422966"

Note in the sql output there appears not to be a trailing \r\n which may
be why the header is not being parsed properly.

Content-Type: multipart/mixed;
boundary="----=_Part_80_20846071.1281633422966"|1989|1




0xfeefc4a3 in multipart_write_to_stream (object=0x80d2318,
    stream=0x80d2140) at gmime-multipart.c:278


 node = multipart->subparts;
        while (node) {
                part = node->data;

                /* write the boundary */
                if ((nwritten = g_mime_stream_printf (stream, "\n--%s\n",
multipart->boundary)) == -1) // line 278
                        return -1;

                total += nwritten;

                /* write this part out */
                if ((nwritten = g_mime_object_write_to_stream (part,
stream)) == -1)
                        return -1;

                total += nwritten;

                node = node->next;
        }




Any Ideas? 

---------------------------------------------------------------------- 
 (0003097) ttessier (reporter) - 23-Aug-10 21:01
 http://www.dbmail.org/mantis/view.php?id=855#c3097 
---------------------------------------------------------------------- 
MODULE_VERSION="gmime-2.2.23" which should coincide with this version of
dbmail if I am not mistaken. 

---------------------------------------------------------------------- 
 (0003098) ttessier (reporter) - 23-Aug-10 21:54
 http://www.dbmail.org/mantis/view.php?id=855#c3098 
---------------------------------------------------------------------- 
Upgraded to gmime-2.2.26 and changed the following code

if ((nwritten = g_mime_stream_printf (stream, "\n--%s\n",
multipart->boundary)) == -1) // line 278

to

if ((nwritten = g_mime_stream_printf (stream, "\n--%s\n",
multipart->boundary?multipart->boundary:"")) == -1) // line 278

This at least is preventing the crash, however, the multipart section is
breaking ( obviously because the boundaries are messed up. 

---------------------------------------------------------------------- 
 (0003099) paul (administrator) - 23-Aug-10 22:01
 http://www.dbmail.org/mantis/view.php?id=855#c3099 
---------------------------------------------------------------------- 
Since you are on solaris: are you certain you have read and applied
README.solaris?

 

---------------------------------------------------------------------- 
 (0003100) paul (administrator) - 23-Aug-10 22:03
 http://www.dbmail.org/mantis/view.php?id=855#c3100 
---------------------------------------------------------------------- 
This looks and smells like an upstream gmime bug. Nothing much we can do
about it afaict. 

---------------------------------------------------------------------- 
 (0003101) ttessier (reporter) - 23-Aug-10 22:10
 http://www.dbmail.org/mantis/view.php?id=855#c3101 
---------------------------------------------------------------------- 
I am not certain about README.solaris - but I could not use the lib
workaround for the printf null handling. I realize that this is most
certainly a gmime bug and I am using an old gmime to boot: 2.2 series but
as I understand - this is my only option for dbmail 2.2 series.

Can you tell me anything about mime-1.0 support or characters supported in
the boundary field or if I can inject my own ( random ) boundary. Thanks in
advance and I will re-read the README.solaris 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
23-Aug-10 19:21  ttessier       New Issue                                    
23-Aug-10 20:59  ttessier       Note Added: 0003096                          
23-Aug-10 21:01  ttessier       Note Added: 0003097                          
23-Aug-10 21:54  ttessier       Note Added: 0003098                          
23-Aug-10 22:00  paul           Note Added: 0003099                          
23-Aug-10 22:01  paul           Note Edited: 0003099                         
23-Aug-10 22:03  paul           Note Added: 0003100                          
23-Aug-10 22:10  ttessier       Note Added: 0003101                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to