Sendmail Installation On A Debian, Ubuntu, Arch, Kali, CentOS, Fedora And Raspbian

Sendmail Installation On A Debian, Ubuntu, Arch, Kali, CentOS, Fedora And Raspbian

sendmail

Send email from the command line.

Maintainer: Debian QA Group



Section: mail

Install sendmail

  • Debian apt-get install sendmail Click to copy
  • Ubuntu apt-get install sendmail Click to copy
  • Arch Linux pacman -S sendmail Click to copy
  • Kali Linux apt-get install sendmail Click to copy
  • CentOS yum install sendmail Click to copy
  • Fedora dnf install sendmail Click to copy
  • Raspbian apt-get install sendmail Click to copy

Send email from the command line.

How to use sendmail?

Below are few example commands for sendmail that you can use in the terminal.

Send a message with the content of message.txt to the mail folder of local user `user_name`:
sendmail user_name < message.txtClick to copy
Send an email from [email protected] (assuming the mail server is configured for this) to [email protected] containing the message in `message.txt`:
sendmail -f [email protected][email protected] < message.txtClick to copy
Send an email from [email protected] (assuming the mail server is configured for this) to [email protected] containing the file `file.zip`:
sendmail -f [email protected][email protected] < file.zipClick to copy
Installation of latest sendmail command is available for Debian, Ubuntu, Arch, Kali, CentOS, Fedora and Raspbian. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.