502 Command not implemented

Issue #416 resolved
Former user created an issue

This is a new install on centos 6.5. When telnetting from the piler host to port 25, everything works. When I try from another client (even on the same network) I can initiate the telnet connection to port 25, which brings up:

220 mailarchiver.localhost ESMTP

however ehlo or any other command results in:

502 Command not implemented.

Any thoughts as to what I may have done wrong?

Thanks.

Comments (14)

  1. Steve Bland

    Version is 1.1.0 Centos is installed on a hyperv machine on which I've disabled the firewall just in case. Other than that the client is on the same network with no other firewall between.

  2. Janos SUTO repo owner

    Please install ngrep (it's a packet sniffer), then run "ngrep -X -e -d lo port 25", and show me the output when you telnet from piler host to port 25 and issue "ehlo aaa.fu".

    Then repeat the the telnet test from the other host, and run "ngrep -X -e port 25", and show me both outputs. Please make sure you format (use the preview button before sending the comment) the output when copy paste it here, otherwise bitbucket will show it as garbage to me.

  3. Steve Bland

    from other client:

    ngrep -X -e -d lo port 25

    interface: lo (127.0.0.0/255.0.0.0)

    filter: ( port 25 ) and (ip or ip6)

    Then nothing received.

    from piler host:

    interface: lo (127.0.0.0/255.0.0.0)

    filter: ( port 25 ) and (ip or ip6)

    T 192.168.0.81:45595 -> 192.168.0.81:25 [S]

    T 192.168.0.81:25 -> 192.168.0.81:45595 [AS]

    T 192.168.0.81:45595 -> 192.168.0.81:25 [A]

    T 192.168.0.81:25 -> 192.168.0.81:45595 [AP]

    220 mailarchiver.localhost ESMTP..

    T 192.168.0.81:45595 -> 192.168.0.81:25 [A]

    T 192.168.0.81:25 -> 192.168.0.81:45595 [AP]

    ehlo aaa.fu..

    T 192.168.0.81:45595 -> 192.168.0.81:25 [A]

    T 192.168.0.81:25 -> 192.168.0.81:45595 [AP]

    250-mailarchiver.localhost..250-PIPELINING..250-STARTTLS..250-SIZE..250 8BITMIME..

  4. Janos SUTO repo owner

    If you listen on the loopback interface you surely won't get anything when trying from the remote host. Try this instead: "ngrep -x -e port 25". Anyway piler apparently gives a proper answer for ehlo.

  5. Janos SUTO repo owner

    OK, that's better. Notice that it's pretty different from the previous. One more try: use -x (lowercase x) not -X to see what those non printable characters are.

  6. Janos SUTO repo owner

    OK, the last network dump shows that you send garbage to piler, so it provides a proper response, ie. 502 command not implemented.

  7. Steve Bland

    From the same client I can telnet to our live email server (on the same network also), with no problems. Any thoughts as to why garbage may be being sent to piler and not elsewhere?

  8. Janos SUTO repo owner

    OK, now we know what piler gets. Let's check the client end: install ngrep on it, and run ngrep while using telnet. Thus we may tell if the sent data is incorrect from the beginning or something changes it while in transit. Anyway try connecting to piler with a mailer application (and not manually by using telnet), eg. configure your mail server to copy emails to piler, and let's see what happens.

  9. Steve Bland

    Have setup postfix on the piler server to run from port 225 and gone through the same steps from the same client and it works fine:

    interface: eth0 (192.168.0.0/255.255.255.0)

    filter: ( port 225 ) and (ip or ip6)

    T 191.168.0.85:62842 -> 192.168.0.81:225 [S]

    T 192.168.0.81:225 -> 191.168.0.85:62842 [AS]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [A]

    00 00 00 00 00 00 ......

    T 192.168.0.81:225 -> 191.168.0.85:62842 [AP]

    32 32 30 20 6d 61 69 6c 70 69 6c 65 72 2e 73 66 220 mailpiler.sf

    67 75 6b 2e 6c 6f 63 61 6c 20 45 53 4d 54 50 20 guk.local ESMTP

    50 6f 73 74 66 69 78 0d 0a Postfix..

    T 191.168.0.85:62842 -> 192.168.0.81:225 [A]

    00 00 00 00 00 00 ......

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    65 00 00 00 00 00 e.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    68 00 00 00 00 00 h.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    6c 00 00 00 00 00 l.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    6f 00 00 00 00 00 o.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    20 00 00 00 00 00 .....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    61 00 00 00 00 00 a.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    61 00 00 00 00 00 a.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    61 00 00 00 00 00 a.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    2e 00 00 00 00 00 ......

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    66 00 00 00 00 00 f.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    75 00 00 00 00 00 u.....

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 191.168.0.85:62842 -> 192.168.0.81:225 [AP]

    0d 0a 00 00 00 00 ......

    T 192.168.0.81:225 -> 191.168.0.85:62842 [A]

    T 192.168.0.81:225 -> 191.168.0.85:62842 [AP]

    32 35 30 2d 6d 61 69 6c 70 69 6c 65 72 2e 73 66 250-mailpiler.sf

    67 75 6b 2e 6c 6f 63 61 6c 0d 0a 32 35 30 2d 50 guk.local..250-P

    49 50 45 4c 49 4e 49 4e 47 0d 0a 32 35 30 2d 53 IPELINING..250-S

    49 5a 45 20 31 30 32 34 30 30 30 30 0d 0a 32 35 IZE 10240000..25

    30 2d 56 52 46 59 0d 0a 32 35 30 2d 45 54 52 4e 0-VRFY..250-ETRN

    0d 0a 32 35 30 2d 45 4e 48 41 4e 43 45 44 53 54 ..250-ENHANCEDST

    41 54 55 53 43 4f 44 45 53 0d 0a 32 35 30 2d 38 ATUSCODES..250-8

    42 49 54 4d 49 4d 45 0d 0a 32 35 30 20 44 53 4e BITMIME..250 DSN

    0d 0a ..

    T 191.168.0.85:62842 -> 192.168.0.81:225 [A]

    00 00 00 00 00 00 ......

    exit

    31 received, 0 dropped

    Will post results of an email client connecting to piler next.

  10. Steve Bland

    Bizarre. The email server sends the email fine (however, telnet from the email server produces same errors!). Even tried netcat which didn't work either. I'm happy as long as the email servers can send ok. Sorry to take up your time.

  11. Janos SUTO repo owner

    I think I figured out what happened. I assume you have some windows server, and apparently its telnet client sends a packet after pressing a single button. Postfix does a better job since it buffers the input until it gets the trailing CR LF, however piler expects a complete command at once. Fortunately an MTA doesn't use telnet to send emails, so even though telnet gave you some fun, piler should work for you even with exchange, etc.

  12. Log in to comment