bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oops


From: Alain Magloire
Subject: Re: Oops
Date: Fri, 8 Jun 2001 22:54:04 -0400 (EDT)

> 
> "Alain Magloire" <address@hidden> writes:
> 
> > It seems that you can not write
> > back to the mailbox.  It this is a test application
> > maybe you open the mailbox MU_STREAM_READ only ?
> > or the mailbox is permission read only, or the
> > mail is not sgid mail etc ... or a bug in the library
> > send me you test case or how to reproduce I will
> > track back.
> 
> Using mail from a fresh mailutils build (sync'd a few hours ago):
> 
> address@hidden:~/test$ ~/mailutils/mail/mail -n -f`pwd`/mailbox
> mail (mailutils) 0.0.9, Copyright (C) 2001 Free Software Foundation,
> Inc.
> mail comes with ABSOLUTELY NO WARRANTY; for details type
> 'warranty'. This is free software, and you are welcome to
> redistribute it under certain conditions; type 'copying'
> for details.
> > 1 Mail Delivery Subsystem Postmaster notify: Service unavailable
>   2 Mail Delivery Subsystem Postmaster notify: Cannot send message
> within 5
>   3 Mail Delivery Subsystem Postmaster notify: Cannot send message
> within 5
>   4 root <address@hidden mirror update
>   5 root <address@hidden mirror update
> ?d *
> ?q
> Error expunging:833: Permission denied
> 
> address@hidden:~/test$ ls -l mailbox
> -rw-r--r--    1 jkaivo   jkaivo      18069 Jun  8 18:54 mailbox
> address@hidden:~/test$ rm mailbox
> address@hidden:~/test$ ls -l mailbox
> ls: mailbox: No such file or directory
> address@hidden:~/test$
> 
> I don't think mail needs to be setgid mail, I have all permissions to
> this file. Even as root, the same error results. Nothing special about
> the mailbox, I get the same result on all mbox files I've tried. POP3
> and IMAP4 backends work excellently, though.

Yes the mailbox is open for READ only by default, I think this
was done for testing.
See mailutils/mail/mail.c:270
        if (mailbox_open (mbox, MU_STREAM_READ) != 0)

change for 

        if (mailbox_open (mbox, MU_STREAM_RDWR) != 0)

And it will nuke your entire mailbox when
doing "d *" 8-)

--
alain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]