Swaks (Swiss Army Knife for SMTP) is a simple, yet powerful command line tool that can be used for SMTP server testing as well as to send mail directly from command line. To install swaks do the following: Continue reading “How to send mail from command line using swaks”
How to send mail notification on user logn event
Regardless of user access, many times you have probably wanted to know when someone logs-in into your server. And it is pretty easy to setup your Linux server to send mail notification on user login event. Note that, if you have a system with many users who login few times a day, then you should expect a lot of mail traffic. To configure your Linux server to send mail on user logon event open your /root/.bashrc file and add the following line: Continue reading “How to send mail notification on user logn event”
How to send mail with attachment from linux console
To send mail with attachment directly from your console, you can use utility mutt. This utility is not installed by default, so first we need to install it using the following command:
aptitude install -y mutt
Now you can run the following command to send the mail.
Continue reading “How to send mail with attachment from linux console”