I am using alpine linux running in a docker container to run a webapp. The webapp is supposed to send emails using the mail command from the command line.
To support this, I have installed mail as follows:
apk add mailx
When I try to send a message I get the following error:
bash-4.3# mail foo@bar.com
Subject: test
EOT
Null message body; hope that's ok
bash-4.3# send-mail: applet not found
Not sure what I am doing wrong. Any help is highly appreciated.
Best Answer
There is no default MTA available in Alpine. Besides mailx, you will also need to install and configure a MTA (Mail Transfer Agent), such as postfix:
Start postfix:
Send the test message: