Send a mail over a linux shell


$> sudo apt-get install sendmail
$> sudo apt-get install mailutils
$> sudo apt-get install postfix

Send messages using the mail-command

To check If  postfix is installed and ready to work on your system, you can try:

$> mail
Subject: TEST
EOT (Shortcut: ctrl + shift + d)

Reconfiguration of postfix on Debian / Ubuntu:

$> sudo dpkg-reconfigure postfix

Alternative sendmail

$> /usr/sbin/sendmail -t << EOF
> To:
> Subject: Test
> Blaasdn asndnasdaoisj aksmndcik


Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.