Your message dated Sun, 27 Jan 2008 10:27:04 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Bug#462073: wishlist: a .mailrc command to quit if there are 
no command-line options
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: bsd-mailx
Version: 8.1.2-0.20071201cvs-2
Severity: wishlist


every so often i mistakenly type "mail" rather than "mailq" and have to
quickly suspend and kill it so that it doesn't bugger up the read/unread
status on my mailbox or, worse, move my inbox to ~/mbox (i don't even
want mutt doing that).

i've been doing this for years.

mail itself is quite useful - WHEN i want to use it.  i often use it
to send mail from the command line or from a script.  so i don't want
to uninstall or disable it.

it would be nice, however, to have a "quitifnoargs" (or similar) command
that i could put in ~/.mailrc or /etc/mail.rc so that i can't
accidentally run mail when i want to run mailq.



-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23.11 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages bsd-mailx depends on:
ii  base-files                    4.0.2      Debian base system miscellaneous f
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  liblockfile1                  1.06.2     NFS-safe locking library, includes
ii  postfix [mail-transport-agent 2.4.6-4    High-performance mail transport ag

bsd-mailx recommends no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Craig Sanders writes:

Hi,



every so often i mistakenly type "mail" rather than "mailq" and have to
quickly suspend and kill it so that it doesn't bugger up the read/unread
status on my mailbox

Use the `exit' (or one of its aliases: `x', `ex', `xit' ) command to quit mailx in such case.


it would be nice, however, to have a "quitifnoargs" (or similar) command
that i could put in ~/.mailrc or /etc/mail.rc so that i can't
accidentally run mail when i want to run mailq.

Oh, there're several ways to achieve this:

 - by having mail() function in your .profile (or /etc/profile)
        mail() {
                [ -z "$1" ] || /usr/bin/mail "$@"
        }

- by creating simple /usr/local/bin/mailx script (providing that /usr/local/bin preceedes /usr/bin in your $PATH)
        #!/bin/sh
        [ -z "$1" ] || exec /usr/bin/mail "$@"


 - or by aliasing mailq to e.g. mq ;)


I don't think mailx should have any logic to prevent users from such kind of errors, therefore I'm closing the bug report.


Regards,
robert




--- End Message ---

Reply via email to