Telnet from within a script strange problem - Redhat

This is a discussion on Telnet from within a script strange problem - Redhat ; 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, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Telnet from within a script strange problem

  1. Telnet from within a script strange problem

    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.



  2. Re: Telnet from within a script strange problem

    .... after inserting a credit, Frederik Tilkin leaned
    forward and saw...
    >I wrote a script so that I could send the output of scripts per mail
    >internally without setting up sendmail or exim.


    Try netcat (or "nc") - that may do what you want.

    As to why it's interpreting the letter "w" incorrectly.. no idea.

    --
    "You float like a feather
    In a beautiful world.
    I wish I was special..."

+ Reply to Thread