Results 1 to 3 of 3

Thread: [SOLVED] Testing mail server with Telnet - My experience

  1. #1
    void is offline Active Member
    Join Date
    Nov 2007
    Posts
    48
    Rep Power
    7

    Default [SOLVED] Testing mail server with Telnet - My experience

    *domains changed to protect the guilty*

    Howdy folks. This isn't actually a problem, and I do see that somebody else posted it here once before, quite some time ago, but the response was totally incorrect so I am bringing it up again.

    Mostly, it's more of an interesting potential bug... Enough preface, here is the issue:


    Have you ever tried to test your mail server by using "telnet mail.whatever.com 25" from any kind of command line (windows, linux, whatever)?

    You probably have. You probably know already the easy steps to testing that:

    helo $domainname
    mail from:somebody@somewhere.com
    rcpt to:localuser@localdomain.com
    data
    Blah
    .

    Standard right?

    I was having some issues with email yesterday, and a customer brought to my attention that he took the liberty of testing it via telnet to my server, but that once connected he could do thing.

    Here is what happens from Windows telnet:
    C:\> telnet mail.mydomain.com 25
    220 *****************************
    helo asdf.com
    402 4.5.2 Error: command not recognized

    400 4.5.2 Error: bad syntax
    helo sdf.com
    402 4.5.2 Error: command not recognized
    quit
    402 4.5.2 Error: command not recognized
    quit
    402 4.5.2 Error: command not recognized
    quit
    402 4.5.2 Error: command not recognized


    So, kind of strange. Your first impulse may be like mine was and to say "Your firewall/proxy/what-not device is probably filtering the helo command because only your mail server should be sending mail."

    But then why would "quit" also not work? Strange.

    I tried again, but this time from a linux machine I have hosted across town at a colo.

    [trixbox1.localdomain ~]# telnet mail.mydomain.com 25
    Trying 216.1.28.4...
    Connected to mail.mydomain.com.
    Escape character is '^]'.
    220 *****************************
    helo blah.test.com
    250 mail.mydomain.com
    mail fromresident@theworld.com
    250 2.1.0 Ok
    rcpt to:admin@mydomain.com
    250 2.1.5 Ok
    data
    354 End data with .
    Test!
    .
    250 2.0.0 Ok: queued as 60B11996006B


    Strange! This time it worked. In fact, it works from every LINUX machine I can possibly get to. Even from the mail.mydomain.com server to itself. Works fine.

    Why won't windows telnet work? I try Penguinet, my favorite little gui SSH program for Windows:

    220 *****************************
    helo blarh.com
    402 4.5.2 Error: command not recognized
    ehlo asd.com
    402 4.5.2 Error: command not recognized
    quit
    402 4.5.2 Error: command not recognized

    Then I noticed something, if I hit BACKSPACE it doesn't appear to see the correct ^H sequence and draws some gibberish on my screen.

    I wonder... is it my terminal?

    I connect again but this time I use PUTTY and when it says "Connection Type" I chose RAW:

    220 *****************************
    helo blarg.com
    250 mail.mysite.com
    mail from:test@testy.com
    250 2.1.0 Ok


    It works!

    So... something in Postfix hates certain terminals, and this WAS working until I updated Zimbra to version 6. Lets see... ah yes I am indeed on a new version of postfix. Very new. Looks like I hopped from 2.4.7.5 to 2.6.5.2

    Cool.

    Is email still working though? Yes. Working fine. I get all my incoming mail as far as I can tell. There is nothing in the logs showing "Somebody said HELO in a character set I don't understand or barfed binary gibberish at me during an SMTP session" (ok I made that message up).


    So strange.

    Maybe a guru out there could shed some light on this little fun mystery. As far as I can tell it's gotta be a config setting in Postfix, cause that is who answers to port 25 with a standard Zimbra install yes?

    Anybody else out there notice this odd behaviour too?
    Last edited by void; 04-13-2010 at 09:35 PM.

  2. #2
    void is offline Active Member
    Join Date
    Nov 2007
    Posts
    48
    Rep Power
    7

    Default

    Just for the sake of being insane, I tested this on a few other servers out there running Zimbra.

    Same behaviour. Anybody can confirm or deny? All servers are running version 6.XX either Network or Community.

    Someone? Anybody test this with their own server and share results?

    Feel I should also add the ESMTP inspection is disabled in my ASA 5510.
    Last edited by void; 12-28-2009 at 04:02 PM.
    Using:
    zcs-7.1.4_GA_2555.RHEL6_64.20120105094542

    On:
    CentOS 6.1
    Dual Xeon.Dell SC1425

  3. #3
    void is offline Active Member
    Join Date
    Nov 2007
    Posts
    48
    Rep Power
    7

    Default

    Ah ha!

    Damn you Cisco.

    Hope this helps: login to your firewall and turn off fixup, but you have to do it manually from command line, their GUI doesn't use this feature.
    NO FIXUP PROTOCOL SMTP 25

    I am no longer greeted with 220 *************** when I login, but instead get the right header, and things work fine.

    I hope this small tidbit of knowledge can help somebody else out there, and save them all the googling I just did.
    Using:
    zcs-7.1.4_GA_2555.RHEL6_64.20120105094542

    On:
    CentOS 6.1
    Dual Xeon.Dell SC1425

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with port 25
    By yogiman in forum Installation
    Replies: 57
    Last Post: 06-13-2011, 01:55 PM
  2. How to mail server responses telnet command!
    By zibra in forum Administrators
    Replies: 0
    Last Post: 10-12-2008, 10:11 AM
  3. Replies: 2
    Last Post: 02-12-2008, 11:55 AM
  4. DynDNS and Zimbra
    By afterwego in forum Installation
    Replies: 30
    Last Post: 04-01-2007, 03:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •