This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin, mutt, Windows XP issues

On Fri, May 23, 2003 at 04:39:01PM -0400, Igor Pechtchanski wrote:
> On Fri, 23 May 2003, Peter Davis wrote:
> > Hi, Igor,
> >
> > Still wrestling with these issues ...
> >
> > On Tue, May 20, 2003 at 01:23:22PM -0400, Igor Pechtchanski wrote:
> > > On Tue, 20 May 2003, Peter Davis wrote:
> > >
> > > > I'm using mutt 1.4i under Cygwin on Windows XP.  My apologies for
> > > > cross-posting, but I'm really not sure if the problems I'm having are
> > > > mutt issues or Cygwin issues.  (Probably XP issues, but there's not
> > > > much help for that.)
> > > >
> > > > I'm running XP on two different systems.  One (home) was formerly NT4,
> > > > and one (work) was formerly Win2000.  In upgrading to both of these
> > > > systems, some new problems with mutt were introduced.  Specifically:
> > > >
> > > > 1) Mutt no longer can tell which mailboxes contain new mail.  Once I
> > > >    open the mailbox, the new messages are correctly marked, but when
> > > >    I'm looking for a mailbox with unread messages, mutt doesn't detect
> > > >    any.  This used to work correctly under NT4, but *not* under
> > > >    Win2000.  It may have to do with changes in how Windows handles
> > > >    file protections, but I've tried to un-protect these files in every
> > > >    imaginable way, and still can't get this to work.
> > > >
> > > >    I've looked at the mutt code somewhat, and it appears that mutt is
> > > >    checking the timestamp on the .mh_sequences file to detect
> > > >    mailboxes with new messages, but actually reading the .mh_sequences
> > > >    file to mark the new messages.  So it seems as if mutt is able to
> > > >    read the file, but not to get the correct timestamp.  That seems
> > > >    very weird to me.
> > >
> > > Peter,
> > >
> > > This one is most likely an XP protection issue.  IIRC, the timestamp is
> > > not stored in the file itself, but in a directory containing that file.
> > > Therefore, you'll need to allow the same read access to the directory
> > > containing the .mh_sequences file that you allow for the file itself.
> >
> > I have set the entire tree, folders and files, to essentially
> > unlimited access to the owner, at least as far as I can tell.  Yet
> > mutt is *still* not picking up on the folders containing new mail.
> > I've started using a second bash shell window in which I run:
> >
> > find ~/Mail -name .mh_sequences -a -exec egrep -li "unseen" {} \;
> >
> > but that's really a pain.  Mutt could work so nicely if I can solve
> > this.
> Peter,
> Are you sure the owner is who you think it is?  Do you have 'ntsec' on?
> Are your /etc/passwd and /etc/group files up to date (if you've upgraded
> your systems, most likely the user SIDs changed, so you'll need to update
> the passwd and group files)?


On my home system, the owner is the same as `whoami`, pdavis.
However, the group for these files shows up as 513, but I recently
changed /etc/passwd to give myself the group 544 (Administrators).
That was an attempt to fix this problem, though.  It didn't work even
when my group was 513.

> Did you try "touch"ing the .mh_sequences files yourself?  Does mutt pick
> up that change?  Did you try giving "touch" the -d or -r parameters?

I didn't try -d or -r, but touch by itself didn't work, and after
doing a mail fetch, the modification times on these files look correct
anyway.  The timestamp is getting updated by the fetching procedure.

> If you are willing to go into mutt's source, why not find a place that
> checks the timestamp and write a small test case that uses the exact same
> sequence.  You could then run it in a loop and see whether it detects that
> the file is touched...

I've done some looking at mutt sources, but not enough to be totally
confident of what's happening where.  I *think* the timestamp check is
where the problem is, but I'm not 100% certain.  As I mentioned, I'd
like to actually step through the code to see where it's checking, but
I need to figure out how to build a debug version of mutt, and now to
debug a curses application.

> Unfortunately, other than that, I'm fresh out of ideas.
> > > > 2) I have some Perl scripts I run from mutt.  One of them parses a
> > > >    piped in email message and records some information from the
> > > >    message header.  This works fine if I am viewing the message in
> > > >    mutt's pager, and pipe it to the script.  But if I tag some
> > > >    messages in mutt's index, and try to pipe them all (I do have
> > > >    pipe_split set to "yes"), I get "File not found" errors on the Perl
> > > >    script.  This used to work on both NT and Win2000.
> > >
> > > Can you insert some debugging print statements into the Perl scripts
> > > themselves, and see *exactly* which files they try to open (including
> > > whitespace and special characters)?  This may be the line ending issue all
> > > over again...  Or, it could be a shell quoting issue (if mutt passes
> > > backslashes through a shell without properly escaping them)
> >
> > It's the Perl scripts themselves that don't get found.  Mutt seems to
> > be using different code to pipe messages to these files, and one of
> > them's not working.  I'm stumped.
> Again, I would check the permissions on the scripts first (executable for
> whatever user mutt is running under).  Other than that, I don't really
> know much about mutt (I myself don't use it).

Unfortunately, I've gotten no responses from the mutt user's group on
what's being checked there.  I hate to bother the mutt developer's
group with what are essentially user issues, but maybe someone there
at least knows what is being checked, so I can concentrate on that.

> > > > I'm willing to try debugging mutt, but I'm not sure what's a
> > > > reasonable way to debug a curses-based application in a Cygwin
> > > > environment.  I'm open to any suggestions here.
> > > >
> > > > Any clues on any of this?
> > >
> > > Hope the above helps,
> >
> > Thanks, Igor.  This was helpful, but I haven't solved these problems
> > yet.  Any debugging tips?  I've been able to build mutt 1.5.4, but I
> > don't know how to build a debug version, and, unlike 1.4i, it crashes
> > on some messages.
> See suggestion above (write a short test case that uses the same code, and
> keep adding code from mutt to it until it stops working).  I doubt the
> part of mutt that checks the mailbox timestamps has anything to do with
> curses.

No, I know the timestamps have nothing to do with curses, I'm just
wondering if I can debug in the same window where curses is repainting
the screen, etc.

Thanks for all you help.  I'm sure it's a protection issue, and I just
don't understand enough about the Windows scheme.  I read the ntsec
section of the Cygwin User's Guide, but I still don't have a clear
picture of how all this works (or is supposed to work).  I guess I'll
keep digging around for information on that.



    Peter Davis                               Pageflex Inc
    617-520-8345                          215 First Street
    617-868-0784 (FAX)                 Cambridge, MA 02142

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]