Subject: Problems with messages with Mime type: message/delivery-status

From: Raul Dias <[email-masked]>
Date: Wed, 17 Nov 1999 20:39:11 -0200

Hi,

I am having a problem with messages returned from the MAILER_DAEMON.

When trying to fetch the structure from the message I get a segmentation fault.

I am using Perl's module Mail::Cclient.  So, I don't know if it is a c-client or a
Mail::Client problem.

In Perl it happens when I do:

($env, $body) = $c->fetchstructure($message_from_mailer_daemon);

This is the equivalent to the function mail_fetchstructure() in the C API.

I have tried with: 
IMAP-4.5, 4.6-BETA, 4.6, 4.7-BETA and 4.7

I am using Mail::Cclient 0.5
I attached a mailbox with the message which causes the error.

So, can someone help me?  Is is the c-client or Mail::Cclient?

BTW, is there someone workig with Mail::Cclient too?

Thanks a lot,

Raul Dias

---

From: [email-masked]
Date: Wed, 17 Nov 1999 19:18:45 -0500 (EST)

That sounds like a problem I used to have.
Here are my diffs in Cclient.xs:make_body() ...

bash-2.01$ diff Cclient.xs ~/Mail-Cclient-0.5/Cclient.xs
291,295c291,299
< AV *mess = newAV();
< MESSAGE *msg = body->nested.msg;
< av_push(mess, msg ? make_envelope(msg->env) : &sv_undef);
< av_push(mess, msg ? make_body(msg->body) : &sv_undef);
< nest = newRV_noinc((SV*)mess);
---
> MESSAGE *msg = body->nested.msg;
> if (msg->body == body) {
> nest = newSVsv(&sv_undef);
> } else {
> AV *mess = newAV();
> av_push(mess, (msg&&msg->env) ?make_envelope(msg->env) : &sv_undef);
> av_push(mess, (msg&&msg->body) ? make_body(msg->body) : &sv_undef); 
> nest = newRV_noinc((SV*)mess);
> }

As I recall, the recursion is broken. I'm 
pretty sure it was the first change (checking 
for msg->body==body) that fixed it and not the
sanity checks on the make_* calls.
 
I hope that helps!

Brian

---

From: Raul Dias <[email-masked]>
Date: Thu, 18 Nov 1999 09:10:55 -0200

>>sanity checks on the make_* calls.

YES.  It helped a LOT! :-)

BTW, How did you manage the Content-disposition? For attachments.

the $body->disposition does not work.

Best Regards,
Raul Dias