setup mail and firewall

http://tuxtweaks.com/2012/10/send-gmail-from-the-linux-command-line/

basic commands

//start firewall
sudo ufw -enable

sudo apt-get install msmtp-mta

pluma ~/.msmtprc

paste
#Gmail account
defaults
logfile ~/msmtp.log

account gmail
auth on
host smtp.gmail.com
from your_address@gmail.com
auth on
tls on
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
user your_address@gmail.com
password your_gmail_password
port 587

account default : gmail



sudo apt-get install heirloom-mailx


pluma ~/.mailrc

paste

set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
chmod 600 ~/.msmtprc
chmod 600 ~/.mailrc
mail -s "Subject" address@example.com < nsaProvoke.txt  or
mail -s "Subject" address@example.com
Ctrl+D to end your message
Comments