Help, can't complete telnet port 25 SMTP session to Comcast SMTP server.

Discussion in 'Tomato Firmware' started by TexasFlood, Jun 2, 2010.

  1. TexasFlood

    TexasFlood Network Guru Member

    Copied over from another thread, hoping it would be more visible here and someone might have a helpful suggestion. Thanks in advance....
    So I just tried this, finally, :wink:.

    My first test was from my Ubuntu laptop to the Comcast SMTP server which worked fine as shown below, slightly sanitized to remove my personal info, specifically my IP address and my source and destination email accounts. The email was delivered and looked fine.

    When doing from the Tomato router, all is well up until I try to enter the "." to end the data input. The Comcast SMTP server simply won't recognize the "." to end the data input so I can't finish and send the email. Maybe the line end needs to be CR/LF or something and isn't so not recognized, or something else simple like that. I tried a few ideas to get it working but nothing I tried worked as of yet.

    If anyone has an idea what the issue is & how to resolve, I'd sure appreciate a clue.
    telnet 25
    Connected to
    Escape character is '^]'.
    220 comcast ESMTP server ready
    250 hello [{my IP address was removed from here}], pleased to meet you
    mail from:
    250 2.1.0 <> sender ok
    rcpt to:
    250 2.1.5 <> recipient ok
    354 enter mail, end with "." on a line by itself
    subject: test subject line
    Test message line 1
    Test message line 2
    Test message line 3
    Testing, testing, 1, 2, 3, testing
    Test message last line
    250 2.0.0 QGew1e00B0uhdwP3TGfHkj mail accepted for delivery
    221 2.0.0 comcast closing connection
    Connection closed by foreign host.
    I was actually trying to implement the scripted approach as shown below but hit the same issue as doing it interactively. The script actually seems to work, up until the aforementioned "." problem.
    MESSAGE="This is the message"
    SUBJECT="Subject line"
    if (
            sleep $DELAY
            echo "HELO $DOMAINNAME"
            sleep $DELAY
            echo "MAIL FROM: $FROM"
            sleep $DELAY
            echo "RCPT TO: $TO"
            sleep $DELAY
            echo "DATA"
            sleep $DELAY
            echo "Date: $DATETIME"
            echo "From: $FROM"
            echo "To: $TO"
            echo "Subject: $SUBJECT"
            echo "X-Mailer: $MAILERNAME $MAILERVERSION"
            echo ""
            echo "$MESSAGE"
            echo "."
            sleep $DELAY
            echo "QUIT"
            sleep $DELAY
            logger local7.warning -t "smtp_auto_message" "WARNING: condition"
  2. mstombs

    mstombs Network Guru Member

    Would an extra carriage return help?

    echo -e ".\n"
  3. TexasFlood

    TexasFlood Network Guru Member

    Thanks for the suggestion but tried it and no-go. This is just weird. I'm sure there is a simple explanation, I just can't figure out what it is.
  4. TexasFlood

    TexasFlood Network Guru Member

    Anyone else have an idea?

    I just seem to have hit a wall here, silly as it sounds.

    Maybe need to capture some packets from the working session on Ubuntu vs. the non-working one on the Tomato router & compare. I can use wireshark on Ubuntu. Actually if I can find the old hub I used to have, I can probably sniff the Tomato router with wireshark on Ubuntu also. Unless there is a better way.
  5. rhester72

    rhester72 Network Guru Member

    You can use tcpdump on Tomato (get it from my utilities site), but yeah, that's about the best way to approach it.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice