[Top][All Lists]

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

Re: problems with "mail"

From: Alain Magloire
Subject: Re: problems with "mail"
Date: Thu, 28 Mar 2002 00:04:51 -0500 (EST)



> > reading mail:
> > In short, I haven't been able.
> > While mailx would show my mail in /var/mail/jordi just invoking it with
> > "mail", mailutils seems to only look after ~/mbox by default.
> That is, when you run mail with no arguments it opens ~/mbox, right?
> OK, I'll check it.
> > If I use the -f switch, it completely ignores it:
> > 65563:address@hidden:~$ mail -f /var/mail/jordi
> This is a very frequent mistake, unfortunately. In mailutils' mail
> an argument to --file (-f) is optional, therefore it must follow
> -f option without intervening whitespace. Similarly, if the long
> form is used, its argument must be preceeded by an equal sign
> (again, no intervening whitespace). So, the right form of invocation
> will be either
>      mail -f/var/mail/jordi
> or
>      mail --file=/var/mail/jordi
> > 65565:address@hidden:~$ mail --file=3D/var/mail/jordi=20
> > mail (mailutils) 0.0.9c, Copyright (C) 2001 Free Software Foundation, Inc.
> > mail is free software with ABSOLUTELY NO WARRANTY.
> > For details type `warranty'.
> > Send bug reports to <address@hidden>.
> > Can not read mailbox
> > 
> Very alarming. I will try to reproduce the situation on my box.
> Did you use any special options when configuring the package?

Yes, I see it, and somehow it also the same in utilities like frm/frm.c:

in the case of frm.c(main.c):
main(int argc, char **argv)
  char *mailbox_name = NULL;
  int c;
  mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL);

  /* have an argument */
  argc -= c;
  argv += c;

  if (argc)
    mailbox_name = argv[0];

    status = mailbox_create_default (&mbox, mailbox_name);

argc -= c;

will set argc to 0  and mailbox_name will always be NULL, ignoring
any --maildir=URL directives.  But in any case this code is not right.

For mail/mail.c(main):  it is more subtile, 

  args.file = NULL;

  /* argument parsing */
  mu_argp_parse (&argp, &argc, &argv, 0, mail_capa, NULL, &args);

  /* open the mailbox */
      if (args.file == NULL)
            rc = mailbox_create_default (&mbox, NULL);
      else if ((rc = mailbox_create_default (&mbox, args.file)) != 0)

args.file always return NULL and mailbox_create_default(&mbox, NULL) will
always be call in ignoring any --maildir directives.

> > There's also Debian Bug#139678, which says that the -m long option name
> > "--maildir", is confusing. I agree. I wish the option was called
> > --mailspool or --spooldir or whatever, so it doens't clash with the
> > Maildir format.
> > 
> Agreed. This is quite reasonable.


P.S.: Sorry to be so brief and not providing a fix/patch for this,
      that's all the time I have.

reply via email to

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