- cmd_mail_interactive.sh is interactive install and config; no editing required.
- Otherwise, Reads configuration from mail_conf.sh (edit this file to customize, for sure)
- Updates repos
- Installs msmtp-mta & heirloom-mailx from repositiories
- Configures msmtp-mta for gmail & based on variables in mail_conf.sh
- Configures mailx to use msmtp-mta
- Makes files with password information available only to you (chmod)
- Obtain with git clone or download and unzip.
- If the .sh files aren't already executeable, chmod +x each file.
- Use a text editor (leafpad or nano, for example) to set the email account name, the gmail address, and the password to the mail account
- Assuming you are at the command line and in the directory with the scripts, execute with: sudo cmd_mail.sh
mail -s "Subject" address@example.com < message.txt
- Scrap the configuration include and prompt user for addy, account name, and password (more secure, less configuration). It's not like that now because I'm used to automating and eliminating interactivity.
- If I get ambitious: prompt for info with dialog boxes (apt-get install dialog)
- If I get more ambitious: install and configure in a lab setting for specified list of users and corresponding passwords.