Friday, 30 December 2016

How to Send Email via SMTP Server from gmail Account or other mail account

Configure SSMTP on Linux/Centos

1. install ssmtp package
   #yum install ssmtp

2. Configure SSMTP  - edit vi /etc/ssmtp/ssmtp.conf
#mailhub=mail
root=abc@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=abc@gmail.com
AuthPass=xxxxxx
UseSTARTTLS=YES
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
RewriteDomain=localhost
Hostname=localhost

save and exit.

3. Test sendmail command line
   #ssmtp xxxx@gmail.com
    type masg
    Ctrl+D       ( close and send the massage)

 4. Send mail to multiple recipients using in script
    #ssmtp abc@gmail.com, zyz@gmail.com < msg.txt

Sunday, 11 December 2016

Allow/block ports in Linux/centos/redhat iptables

If you want to open port in firewall via command line

vi /etc/sysconfig/iptables and add below line

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

save and exit.

#service iptables restart

Reset Grace Period of Windows Server 2012 RDS

Error: the remote session was disconnected because there are no remote desktop license servers available to provide license in aws Solu...