bug-mailutils
[Top][All Lists]
Advanced

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

Re: [bug-mailutils] mail -f option processing


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] mail -f option processing
Date: Wed, 25 Jan 2006 14:03:47 EET

Helmut Leitner <address@hidden> wrote:

> Together with mailutils 0.6 I used:
>    :mailutils --maildir
>    :messages -f~/maildir

That's wrong. The label you begin with a colon is a ``capability
name''. Then all programs that use that capability will get
corresponding command line options. However, there is no such
capability  as "mailutils" or "messages". You will find the full list of
capabilities with the option names they  refer to in the documentation.

If you wish to pass a set of options to a certain command only, use that
program name without leading colon, e.g.:

mail --lock-retry-count=10

If you give mail the option `-f~/maildir', it is understood as "open the
file named `maildir' in the home directory", which is clearly not what
you want. To specify a mailbox type, use full URL specification of a
mailbox. The following is correct:

  mail -file=maildir://path/to/the/maildir
  mail -file=pop://server.dom.ain
  mail -file=pop://user:address@hidden
  mail -file=imap://server.dom.ain
  mail -file=imap://user:address@hidden

  etc...

There are, however, two points you should be aware of:  first, the option -f is
not common to all utilities (for example `messages' gets the URL of the
mailbox to open as its command line argument), and secondly, the ~
character is expanded only if it is the first symbol in an argument,
that is the following:

  mail -fmaildir://~/path/to/mailbox

is wrong. The following, however, is right:

  mail -fmaildir://$HOME/path/to/mailbox   


> or more to the point
>         else if(
>           (state->argv[state->next][0] != '\0') &&
>           (state->argv[state->next][0] != '-')
>         )

This looks reasonable, thank you.

Regards,
Sergey




reply via email to

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