Bash script that allows sending an e-mail to a recipient or multiple recipients.
- Type in terminal
sudo apt install mailutils
- Set
postfix
asinternet site
during installation - Type in terminal
sudo nano /etc/postfix/main.cf
- Set
inet_interfaces
toloopback-only
in the main.cf file - Type in terminal
sudo systemctl restart postfix
- Type in terminal
sudo apt install sysvbanner
To send an e-mail there should be an e-mail file created (text file). Optionally file containing different email addresses can be included.
- recipient definiton
- subject
- title
- content
Recipient definition can be either a single email address or a name of the file with email addresses in the current directory.
- address 1
- address 2
- address 3
- etc...