Helmut Leitner <[EMAIL PROTECTED]> wrote: > The program "mail" seems to process the -f option incorrectly. > In a call > mail -f path name > or > mail name > (with "-f path" coming from /etc/mailutils.rc ":mail -f path") > the name is interpreted as another mailbox path and the > stored path is overwritten and lost.
The switch -f takes an optional argument. As such, it must eiter appear right after the short form (-f), or after an equal sign if used with the long form (--file), in both cases without any intervening whitespace. That is, the correct ways of invocation are: mail -fpath mail --file=path Any other usage is an error and previous versions of mail detected it as such. However, as the comment you noticed states, people were often forgetting this option specific and therefore an heuristics was introduced that allows to handle both `mail -fpath' and `mail -f path' the same way *in the absence of other command line arguments*. It did not appear to me that anyone would want to use both mailbox name and recipient addresses on the same command line, since this is effectively senseless. The invocation mail -f path name should be understood as follows: "set default mailbox url to the system mailbox for the current uid and enter compose mode for sending a message to users `path' (sic) and `name'". Currently, however, mail understands it as "open `path', than drop it and open `name' instead". The proposed way of understanding this invocation as "open mailbox `path' and send a mail to `name'" is also wrong, since `path' has nothing to do with -f, because it is separated from it. Perhaps the best bet would be to print an error message and exit. Regards, Sergey _______________________________________________ Bug-mailutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-mailutils
