ASIC/FPGA Design and Verification Out Source Services
Sending Mail From Command Line Using TelNet 
The following explains how to send an e-mail form the command line using TelNet. This procedure has been tried successfully with HOTMAIL on a SUSE 9.2 machine a few years ago.Recently it has been re-checked on debian lenny with bezeqint mail server.
- First you need to find the encoding of you user name in base64. In my case the encoding of :bknpk@hotmail.com is YmtucGtAaG90bWFpbC5jb20=.
- In a similar way you need to find your password encoding. The script sends the first input parameter and puts in the subject and in the mail content of your message.
- The script can be seen at - Perl Script
- An example of how to call it from a PERL script- Call From Perl Script
- I use hotmail and you need to get the right daemons set. hotwayd/hotsmtpd are POP3/SMTP-HTTPMail gateway daemons.
- The HTTPMail protocol is used by the mail servers Hotmail, Lycos, Spray and MSN.
- Recently my TELNET script fails. I believe because it does not support encryption. Therefor I use:mailsend
- Some mail serevers use SSL. I have discovered, that hotmail stopped working with my telnet script and gave the following error message after I tried to authenticate:
530 5.7.0 Must issue a STARTTLS command first
- So I needed to re-write my script. This time I used openssl command
openssl s_client -starttls smtp -crlf -connect mail.bezeqint.net:25
- Please note that spamming is not allowed. This send mail script is only to allow me getting message on assorted linux machines at home to work, when their status changes.
I modified the script accordingly: script to send a mail openssl script.
- A few notesYou have to modify the script and put your own user name and passworded encoded to base64.Also be aware that I created a special new account for this purposes, but hotmail did allow me to send mail. I could only do it from my old account. So they might have a restriction on new accounts, which I intend to check.The script was tried on a debiam lenny machine.
|