Steps for simultaneous Sendmail and mailutils:
Note: Only Sendmail is needed to discover that quota (quota) mails call Sendmail, but Sendmail is not as convenient as mailutils.
Sendmail is installed in Ubuntu by default. You need to uninstall sendmail-bin first (it will be uninstalled together with Sendmail)
$ Sudo apt-Get autoremove sendmail-bin
Uninstall if the exim4-daemon-light and exit-config are automatically installed in the middle
$ Sudo apt-Get autoremove exim4-daemon-light
$ Sudo apt-Get autoremove exim4-config
Then install mailutils (which is matched with postfix and will be automatically installed)
$ Sudo apt-Get install mailutils
Then install Sendmail (Postfix is uninstalled during installation, but mailutils is retained)
$ Sudo apt-Get install sendmail
In this case, both Sendmail and mailutils exist, and mutual use is not affected.
$ Which Sendmail (/usr/sbin/sendmail)
$ Which mail (/usr/bin/mail)
Mailutils example:
$ Sudo/usr/bin/mail-s "aaaa" [email protected] </root/aa.txt (Note: AAAA is the subject of the email and/root/aa.txt is the body of the email)
This article is from the "Linux" blog and will not be reproduced!
Steps for simultaneous Sendmail and mailutils