|
|
Question : Telnet: Send mail
|
|
Hi,
My objective is very simple. I have a pop3 account: Have authorization to use a pop3 and smtp server. I want to build a batch file to send a mail to a specific email address (not using the same pop3 and smtp server) USING TELNET.
To make this easier, let me give you an example of a task I wish to accomplish. I can use "mail.vsnl.net" and "smtp.vsnl.net" (If you could suggest a better FREE pop3 e-mail service: authorization touse the site's pop3 and smtp server for free, I would be happy). My e-mail address is "[email protected]". I want to send a mail to "[email protected]". I want to do this using telnet and build a batch file.Please do NOT post any links to sites which tell you how to do this 'cause I have read them myself and it doesn't seem to work. Just give me instructions line by line on how to do the task specified above.
To recieve mail, I connect to mail.vsnl.net port 110. Then I give my username and password, bring up a list of the mails and retrive a mail: --------------------------------------------------------------------------------------------------------------------------------------------------- o mail.vsnl.net 110 user [email protected] // Don't be worried about the "@vsnl.net": Just assume its ram_einstein pass 12345 // This isn't my actual password so don't try it ;-) list retr # // # is replaced by the message number on the list quit --------------------------------------------------------------------------------------------------------------------------------------------------- This works perfectly. Sending mail on the other hand always fails: Do I have to give my username and password to send a mail? Why can't I send a mail to the hotmail server?
Can I also send mail from a http server such as hotmail? Please give me an example.
Thanking you for your time,
ram_einstein
|
Answer : Telnet: Send mail
|
|
First of all, http://www.faqs.org/rfcs/rfc821.html is the real source for how to use the SMTP mail protocol. No, this is not just another tutorial site, this is the actual description of what everything means and why it works from the controlling RFC. The folks who write the mail server software refer to this paper when deciding what their software MUST do, or what it MUST NOT do, or what it CAN do as an option. Very dry reading but be assured your answer IS in there.
Primarily, it looks like the info you have is fine, yet assumes you have already done the authentication, so if you slap the user name and passwords in the right place on the telnet line you're covered. The problem comes with how you decide you want to get the user name and password to your script without letting it get out. I leave that to you. Also, make sure you are connecting your telnet session to the correct port (Usually 25). Your results appear that you are, however some servers could use fake output on port 25 to make abusers give up when authentication fails, with the real SMPT service using a different port. Your folks letteing you use the server should have already told you the right port number.
(\o/) Good Luck, 2K
p.s. Information only: What you are doing works by using what is called a "Relay Host" - That is not a bad thing if it is a Closed Relay (Only allowed to authenticated users). Spammers are notorious for searching out a Relay Host that will forward for non-authenticated users (open to anyone) and having a script populate several other scripts with mail names to have a message relayed to. The effect is many folks getting an advertizement with low overhead to the spammer. That is why a host that allows "Open Relay" is getting more difficult to find and also why there are constantly updated lists of them. The lists are used by many email admins who refuse all mail from a mail server that allows "Open Relay". ( see http://www.faqs.org/rfcs/rfc3552.html , section 6.1.1.8.1. Closed Relaying [NEW] )
This does not mean you can't do it, only that you have to make sure those folks letting you do this are reputable. It will work until a spammer finds them and abuses the privaledge. Then someone will complain, and their ISP will report the open relay to a blacklist service if they use one. Then every ISP that uses the same blacklist service will ignore all mail from the open relay server until the open relay is closed. Your open relay service will then have three options: 1) Leave the relay open and let your mail get through to some of your clients, but maybe some will not get it. 2) Close the relay and force you to authenticate. 3) Register a new domain name and IP address and restart business as usual (trying to eliminate the abusers in the process if they can, so you can get back to work). Mail servicers that choose this option are often veiwed by the Internet community as spammer friendly. Deserved or not, spammers constantly reverse-search email domains for open relay so they WILL eventually find and use that open relay. This is just the plug the hole in the dyke option.
|
|
|
|
|