-1

I am working with a really raw build of Debian that came pre-installed on a VPS and has no application software whatsoever on it. For example, I just went to test the mail system and found that the "mail" client is not there (command not found).

Now, in all honesty, I never knew exactly what "mail" is, other than it points to /etc/bin/mail. Is mail the same thing as elm, or is it different?

To solve my immediate problem, I installed mutt. The question is, should I:

  • install mail too
    or
  • make the command 'mail' a symbolic link to mutt
    or
  • just leave things the way they are with mutt installed, but mail not installed
Tyler Durden
  • 5,631
  • What is it exactly you're looking to test? mutt is an email client. You can use it to read email either locally or on a remote server. mail is a program which generates email messages and hands them off to a local mail transfer agent (i. e. SMTP server) for delivery. – DopeGhoti Jan 09 '18 at 17:25
  • @DopeGhoti No, I am talking about "mail" the MUA. When I type "mail" on every Debian system I have ever used, it opens up an email client. A mail client is a program that "generates email messages and hands them off to a transfer agent". That is what an email client does. – Tyler Durden Jan 09 '18 at 17:28
  • Yeah mail (or POSIX mailx) is a full client, albeit a rather obtuse one compare to Mutt for example. You can use mail from the command-line to easily send email, but it can also be used to receive email. – Stephen Kitt Jan 09 '18 at 17:29
  • @StephenKitt Ok, I guess it has no other name but "mail". So, the question is can I symbolically link this command to mutt, or would that be a bad move since the command is often used to activate the actual "mail" client. – Tyler Durden Jan 09 '18 at 17:31
  • 1
    I wouldn’t symlink mail to mutt, as you say there is an expected mail “API” which you would end up breaking. bsd-mailx is small enough, you should just install that (I guess I should make that a proper answer). – Stephen Kitt Jan 09 '18 at 17:36

3 Answers3

1

If you want mail, you should install mail (bsd-mailx in Debian). mail, or rather mailx, is a formally-specified POSIX tool, and installing anything else as mail is liable to lead to problems.

Stephen Kitt
  • 434,908
1

The mail command only actually deals with mail as files. It can process mail headers that are similar to http. But it doesn't actually send them over a network instead the command sendmail is used for this purpose.

An email client such as mutt does not fit into this mantra. Instead mail including its specific parameters are used by other commands such as sudo to log information for the administrator. Therefor its expected functionality on a system but it does not deal with servers when it creates mail.

In this sense the directory /var/spool/mail is its own domain where as a modern email client only connects to servers SMTP servers and IMAP or POP3 for receiving.

jdwolf
  • 5,017
  • Ok, I don't quite understand how mail is different than mutt (other than mutt has additional features). mail can read my mail and so can mutt, so they are both clients. You say that mail only deals with "files", how is that different than mutt? Don't they both read /var/mail/username to produce the local list of messages? – Tyler Durden Jan 09 '18 at 18:01
0

In my Debian 10.5 I installed apt-get install mailutils -y (but like mentioned above, it might work if you install bsd-mailx - I haven't tried ) and now I have the command.

root@debian10:~# which mail
/usr/bin/mail
Alex
  • 1