Telnet from within a script strange problem

From: Frederik Tilkin (ft_at_hotmail.com)
Date: 08/12/05


Date: Fri, 12 Aug 2005 15:18:05 GMT

I wrote a script so that I could send the output of scripts per mail
internally without setting up sendmail or exim. It works fine on debian, but
from "redhat 7.something" with telnet-0.17-20, the letter w, and only this
letter, ends up in my mails as ÿôÿý. I tried to send it to a debian server
and a windows 2003 exchange server. Both give the same problem...
When try the same from a commandline, not a script, it works fine.

This is very annoying, but it will also fail to send massages to
walter@something.com for instance, because there's a w in it.
Does anyone have an idea how this comes and what to do? Is telnet broken?

Anyway here's the idea of the script:

(
echo "HELO mydomain.com"
sleep 2
echo "MAIL FROM: someone@mydomain.com"
sleep 2
echo "RCPT TO: me@mydomain.com"
sleep 2
echo DATA
sleep 2
echo "Subject: w test"
sleep 2
echo "A message with a w in it."
sleep 2
echo .
sleep 2
echo quit
) | telnet smtp-server-ip-adress 25

thanks for your ideas.



Relevant Pages