How to Work with sendmail and smtp!

Status
Not open for further replies.

mediator

Technomancer
Q1:
I tried a lot but i dunno how to work with sendmail and smtp!
Please tell me how to work wwith sendmail !

I used smtp like "telnet some.mailserver.com 25".Connected ok.
blah blah!
then, RCPT TO:name@another.mailserver.com
But insted of 250 ok!
I get relaying error and authentication error!

CAN YOU HELP ME?


Q2:
I alo want to know how to modify email headers with pine?
:?:
 

GNUrag

FooBar Guy
mediator said:
Q1:
I tried a lot but i dunno how to work with sendmail and smtp!
Please tell me how to work wwith sendmail !
Ans 1:
Read the SMTP's RFC about the smtp protocol's commands. The RFC is available at www.faqs.org


mediator said:
I used smtp like "telnet some.mailserver.com 25".Connected ok.
blah blah!
then, RCPT TO:name@another.mailserver.com
But insted of 250 ok!
I get relaying error and authentication error!
The server does not allow relaying of email through the mail server.

NOTE: The following post has been copied from my previous post at:
*www.thinkdigit.com/forum/viewtopic.php?t=12170
----------
esumitkumar said:
hi so can we send mail from like that???[/b]
From : billgates@microsoft.com
to
To : raabo@digit.com

the domain digit.com does not have any mail exchanger defined.

*img.photobucket.com/albums/v606/anurag/digit/digit_mx.jpg

Anyways, let's assume that i'm sending a mail to anurag[AT]gnu.org.in from a non existant email billgates@microsoft.com then here is what i do.

Note, the commands in bold is what i am supposed to type. This process includes the detection of mail exchange server, to telnetting into its smtp port and typing mail ....

anurag@hbcse:~/cvs-web$ nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> set type=MX
> gnu.org.in
Server: 158.144.1.28
Address: 158.144.1.28#53

Non-authoritative answer:
gnu.org.in mail exchanger = 5 cc4.tifr.res.in.

Authoritative answers can be found from:
gnu.org.in nameserver = cc4.tifr.res.in.
cc4.tifr.res.in internet address = 158.144.1.20
>
anurag@hbcse:~/cvs-web$ telnet cc4.tifr.res.in 25
Trying 158.144.1.20...
Connected to tifrc6.tifr.res.in.
Escape character is '^]'.
220 cc4.tifr.res.in ESMTP Exim 4.34 Fri, 31 Dec 2004 19:42:46 +0530
helo laptop.billgates.microsoft.com
250 cc4.tifr.res.in Hello hbcse.tifr.res.in [158.144.44.129]
mail from: billgates@microsoft.com
250 OK
rcpt to: anurag[AT]gnu.org.in
250 Accepted
data
354 Enter message, ending with "." on a line by itself
From: "Billy Gates" <billgates@microsoft.com>
To: "Anurag P" <anurag[AT]gnu.org.in>
Subject: A digit member asked me to send this!

hi!

a digit forum member asked me to send this spam to you!

regards,
Bill Gates
.

250 OK id=1CkNX2-00023d-Dc
quit
221 cc4.tifr.res.in closing connection
Connection closed by foreign host.
You have new mail in /var/mail/anurag
anurag@hbcse:~/cvs-web$

I have scrambled my email address to prevent spamming. Just replace [AT] with @
And here is the email that i got that my friend Bill Gates sent to me.
*img.photobucket.com/albums/v606/anurag/digit/billgates_mail.jpg

Some short answer questions.

Q 1) How does one learn to do this ?
Ans ) Read the documentation of Sendmail, Postfix and the RFC paper on SMTP protocol.

Q 2) Is this illegal to do?
Ans ) Nope. This is not illegal. This is how all the email servers deliver emails around the world. Only difference is that here a human is issuing SMTP commands.

Q 3) Is it possible without access to Unix/Linux box ?
Ans) It can be done in Windows also. Windows XP ships with nslookup utility. I believe so.
----------


mediator said:
Q2:
I alo want to know how to modify email headers with pine?
:?:
Ans 2:
In pine you can press CTRL + R to enable Rich Headers. But you cannot add your own headers. However in mutt its possible to edit headers and add custom headers also. If you want my muttrc file then tell me.

grub said:
hey want to send fake mail
and u want help
This is nothing illegal. This method is used to check if the mail server is installed properly and relaying emails properly.
 

enoonmai

Cyborg Agent
@grub: Apart from what GNUrag just said, one small note though, this doesn't work with all major mail servers, except that of GMail. It works with a lot of corporate mail servers, though. However, if you're testing your sendmail, then its an entirely different matter altogether.
 

grub

Broken In
it's all right , but there are a lots of another method to check whether ur sendmail is working fine or not .
the method he applied to check sendmail is suspicies ,and this method is defind in many website to send fake mail, that's why i wrote that
 

enoonmai

Cyborg Agent
Sending spam/fake email to myself to check if my sendmail is working properly is not illegal, is it? But yes, that is just one method to send a fake email, but you should know that most major email providers do not allow this kind of mail relaying, and even if they do, they will put in "Unknown" in the From: field and automatically redirect it to the Spam Folder. :D BTW, any legit spammer must be totally mad if he's gonna use the manual method. :D
 

digen

Youngling
Yeah enoonmai true its a cumbersome process for them but the last I heard was email servers with mail relaying was one of the primary means of sending spam messages.There must be a automated processfor sending bulk spam messages?or did I miss something ?
 

enoonmai

Cyborg Agent
No, that is what I was saying too. There's gonna be no spammer who's gonna sit and "manually" send mails by logging on to a mail server and then sending the mail using their SMTP servers :D He would be mad to do something like that, and yes, there are automated tools for it, that rely on their own installed SMTP servers for relaying, pretty much the way new viruses have their own SMTP relays built into them. They rely on bulk spamming for their income, so they'd try to get out as many mails as possible in the shortest possible time.
 
Status
Not open for further replies.
Top Bottom