View Single Post
Old 18-03-2005, 02:24 PM   #3 (permalink)
GNUrag
FooBar Guy
 
GNUrag's Avatar
 
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
Default Re: How to Work with sendmail and smtp!

Quote:
Originally Posted by mediator
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


Quote:
Originally Posted by mediator
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:
http://www.thinkdigit.com/forum/viewtopic.php?t=12170
----------
Quote:
Originally Posted by esumitkumar
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.



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 ....

Quote:
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.


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.
----------


Quote:
Originally Posted by mediator
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.

Quote:
Originally Posted by grub
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.
__________________
- --
http://web.gnuer.org
GNUrag is offline