seculabs ebook - send mail from backtrack linux system with ssmtp and mutt
TRANSCRIPT
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 1/10
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 2/10
SECUGENIUS SECURITY SOLUTIONS
--------------------------------------------------------------------------------------
(A UNIT OF HARKSH TECHNOLOGIES PVT. LTD)
Company Profile:
Secugenius Security Solutions is a Student Entrepreneurial Company started by 2 Social Student
Entrepreneurs in 2010 with an aim to make our country Cyber Crime Free. We at SECUGENIUS
are headquartered at Ludhiana, the Manchester of Punjab. The main activities of Secugenius
Security Solutions are providing training in Information Security and various professional courses.
Secugenius Security Solutions is an organization which believes in inventing and implementing newideas to influence the technological minds of the youngsters
Looking at the number of Cyber Crimes since last many years, We at Secugenius Security
Solutions provides training on Ethical hacking & Cyber Security to students, IT Professionals, Bank
Employees, Police officials.
Secugenius conducts workshops in all parts of the country in various Colleges/institutions for the
benefit of the students & making them aware of the latest trends in technological era of the
Computer age. We believe in spreading knowledge to all the youngsters & growing minds of the
nation so that they could serve the nation with perfect skill-sets in the field of Cyber Crime
Investigation & Forensic Sciences
Secugenius provides various security solutions to its clients by securing their websites from cyber
attacks. We provide training to college students, graduates and professionals in various fields.
Education is delivered to students through two modes i.e. Regular mode and Distance mode which
are available as short term and long term courses.
In the workshops conducted by Secugenius, participants can claim to be trained by the highly
experienced & skilled corporate trainers from different parts of the nation. We believe in making
the base of students to be as strong as possible. All the modules have been designed in order to
provide students with specialized knowledge by specialized trainers.
This library was furnished, managed and funded by the Founders and Directors of Secugenius
Er. Harpreet Khattar & Er. Kshitij Adhlakha. The overall resource person for the content of
the series of this Digital Library is Er. Chetan Soni - Sr. Security Specialist, Secugenius Security
Solutions.
This Online Digital Library has been initiated as a free resource & permanent
resource on specialization basis for every student of Team Secugenius.
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 3/10
Send Mail from BT Linux with SSMTP and MUTT
Product ID No: SG/ODL/13021
Founder & Director: Harpreet Khattar & Kshitij Adhlakha
Resource Person: Chetan Soni
Secugenius Security Solutions
SCO-13A, Model Town Extn, Near Krishna Mandir,
Ludhiana-141002, Punjab – India
[email protected], [email protected]
www.secugenius.com , www.seculabs.in
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 4/10
What is SSMTP & MUTT?
SSMTP is a simple MTA (Message Transfer Agent) to send off mail from a
Linux system to a mail hub.
For a mail hub will use a Gmail account.SSMTP can send emails by itself or you can install mutt (it's another simpleMTA).
Always it's a good idea to configure your server to notify you with somecronjobs for errors instead of not doing it at all and just checking logs byyourself.
Step 1 –
Open Your Terminal and install SSMTP package by typing this command,
root@bt:~# apt-get install ssmtp
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 5/10
Step 2 –
Now its time to configure the ssmtp, so to configure this, open configurationfile of ssmtp by typing this command,
root@bt:~# vi /etc/ssmtp/ssmtp.conf
Step 3 –
Now Change the following fields,
Syntax –
root=<Your Gmail ID>
Example – [email protected]
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 6/10
Step 4 –
Syntax – mailhub=<SMTP Address:SMTP Port No>
Example – mailhub=smtp.gmail.com:587
Step 5 –
Edit your hostname,
hostname=bt
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 7/10
Step 6 –
At the End of the file Add these lines(One Per Line)
Syntax – AuthUser=<Your Gmail Username> AuthPass=<Your Gmail Password> useSTARTTLS= yes
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 8/10
Step 7 –
Now Open your terminal and type these lines to send the mail,
root@bt:~# ssmtp [email protected] <Press Enter> To:[email protected] <Press Enter> From:[email protected] <Press Enter> Subject:Testing <Press Enter> <Blank Line>Hello Hi Guys <Press Enter>
To Send Mail Press “CTRL+D”
You can also send mails from predefined .txt file by typing this command.root@bt:~# ssmtp [email protected] < message.txt
<Your Message must be in Standard Format>
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 9/10
Step 8 –
Mutt is a sophisticated email client for Linux terminal. It supports MIME,GPG, PGP and threading.
To Install Mutt, type this command in your terminal,
root@bt:~# apt-get install mutt
T
Step 9 –
To send a mail by using mutt, type this command in your terminal,
root@bt:~# echo “test” | mutt –s Your-Subject [email protected]
7/29/2019 Seculabs eBook - Send Mail From Backtrack Linux System With SSMTP and MUTT
http://slidepdf.com/reader/full/seculabs-ebook-send-mail-from-backtrack-linux-system-with-ssmtp-and-mutt 10/10
Step 10 –
You can also send command output via Email from mutt by typing thiscommand,
root@bt:~# whois Secugenius.com | mutt –s Whois-Report [email protected]
To Check Who Rebooted Your machine,
root@bt:~# last |grep reboot | mutt –s Rebootinfo [email protected]
To Check who’s Currently logged in,
root@bt:~# w |mutt –s Whois-currently-loggedin [email protected]
Output :-