All great things are simple, and many can be expressed in single words: freedom, justice, honor, duty, mercy, hope

Saturday, December 22, 2012

How to install & configure send mail in Ubuntu?

Send mail is program which will help you to send email through command, you can send email from terminal or CMD . In this program we use our machine as a server. I will show you how to install & configure Send-Mail. So we can spoof email to targets. But problem is that this email is detected as spam due to automatic sending through machine.

How to Install Send-Mail?


Open terminal & type following command in terminal.

sudo apt-get install mailutils

sudo apt-get install sendmail


How to configure it?


After installing sendmail , you should configure sendmail. It`s little hard. But don`t worry after that we can spoof email to anyone.

Type following command on terminal

sudo gedit /etc/mail/sendmail.mc

It will open sendmail.mc file.

For example your last two lines are as follow

MAILER(`local')dnl

MAILER(`smtp')dnl

Put this code before that two lines.

MAILER_DEFINITIONS

define('SMART_HOST',`smtp.gmail.com')

Ok. now close that file

Now we will generate configure file from .mc file so type following command in terminal.

sudo bash -c 'cd/etc/mail/ && m4 sendmail.mc >sendmai.cf'

Now everything is complete, try to send mail using terminal or use Social Engineering Tool-Kit as i mention in previous post.


How to send mail through Command?


open terminal and type following command.

telnet 127.0.0.1 25

HELO server

MAIL from:sender`s email address

RCPT to: Recipient address

DATA

Subject:Test mail

from: sender`s email address

to: receiver`s address

Test Mail

.

quit


Now check spam folder of receiver`s email , you got email . Now check show original option of email , you can see that i.p. of computer , o.s. , many other things.

6 comments:

Kalyani Chavan said...

This really works...!!! Thanks a lot...

Nirav Desai said...

Glad to hear that it help you.

hao wei said...

is this works for ubuntu in VMware?

Kinect-Developer said...

m4 sendmail.mc >sendmai.cf'

Larry Franklin said...

Awesome it works!

Tanatsa Valentine Chigumba said...

By doing the above commands will be able to send email not only from the terminal or social enginnering tool kit but also from anywhere...for example I want to be able to send email directly from my drupal website!

Post a Comment

UA-35960349-1