login
Header Space

 
 

Re: Using Mail(1)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pieter Verberne <pieterverberne@...>
Cc: <misc@...>
Date: Wednesday, December 26, 2007 - 3:05 pm

Hi Pieter,

Pieter Verberne wrote on Mon, Dec 24, 2007 at 05:09:20PM +0100:

I'm using it mainly for two purposes:
 1) Sending test messages i don't want to keep copies of,
    it those cases where mail(1) is more convenient than telnet(1).
 2) Sending administrative messages to users while logged into
    server consoles.
 3) And rather rarely when i feel just too lazy to start
    a full-blown mutt process.


Hm, i never cared about the features and differences of mail, Mail,
mailx and whatever.  They should just work for elementary purposes
and not change.  For the cases where i need advanced editing and
mailbox management features, emacs, elm, pine and mutt - in that
historical order - have always been around.


Are you sure you should call that an "editor"?
Methinks mail is just reading standard input line by line.

See the collect() function in /usr/src/usr.bin/mail/collect.c.
It's using readline(3) - what a bloat ;) - perhaps that gave
you the impression of talking to an editor.


Yeah, use STDIN and STDOUT and let users establish pipes as required.
That's it, you are quite right.


Mail _is_ designed to use ex(1) by default:

 $ mail schwarze@usta.de 
Subject: test
~e
/tmp/mail.RevPyHb17828: unmodified: line 1
:a
test text
^CInterrupted
:wq
/tmp/mail.RevPyHb17828: 1 lines, 10 characters
(continue)
^DEOT
 $

If you just start mail(1), you get no editor whatsoever.
You type in the text of you mail as if you were using telnet(1),
except, of course, that you may profit from readline(3).
If you want an editor, use ~e.  You get ex(1), unless EDITOR is set.
See mail(1) for more details.

[...]

Is that how rumours come into being?   =;c)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using Mail(1), Pieter Verberne, (Mon Dec 24, 12:09 pm)
Re: Using Mail(1), Ingo Schwarze, (Wed Dec 26, 3:05 pm)
speck-geostationary