Why do I suspect this? Because with a correct setting, your *connection* would be denied, not just your SMTP session.
oscar:~ courier$ telnet jeff 25 Trying 192.168.58.08... Connected to jeff. Escape character is '^]'. Connection closed by foreign host.
That said, I *do* see the same behavior you noted with nc. But run it in verbose mode and you find something interesting. Namely, it seems not to wait for the responder to be ready to receive input. I put two lines (helo and quit) in a test file and tried nc'ing that to the host, and as I said got the same behavior. Then I tried setting the verbose options on nc and when I stopped the process got the following:
^C sent 16, rcvd 29
And, as it happens, my test input file has 16 bytes in it. So nc says it sent them, but the service obviously didn't receive them successfully. So, it's off to snoop land, and here is what happens up to the point where the smtp server displays it's banner.
# snoop host oscar
Using device /dev/hme (promiscuous mode)
oscar -> jeff SMTP C port=51596
jeff -> oscar SMTP R port=51596
oscar -> jeff SMTP C port=51596
oscar -> jeff SMTP C port=51596 HELO oscar\nquit\n
jeff -> oscar SMTP R port=51596
jeff -> oscar SMTP R port=51596 220 mail.billsden.or
oscar -> jeff SMTP C port=51596
oscar -> jeff SMTP C port=51596
jeff -> oscar SMTP R port=51596
jeff -> oscar SMTP R port=51596
oscar -> jeff SMTP C port=51596Two things to note here. First, nc did *not* send \r\n, as Sam indicated the server was expecting. Second, and perhaps more important, is that nc sent it's entire data stream *before* the smtp server issued it's first prompt. So which is the problem? Fix the easy thing (\r\n) and test again. This time we get (on the client side)
oscar:/tmp courier$ cat test.txt | nc -v -v jeff 25 jeff [192.168.58.08] 25 (smtp) open 220 mail.billsden.org ESMTP 250 mail.billsden.org Ok. 221 Bye. sent 18, rcvd 66
and (on the server side).
# snoop host oscar
Using device /dev/hme (promiscuous mode)
oscar -> jeff SMTP C port=51628
jeff -> oscar SMTP R port=51628
oscar -> jeff SMTP C port=51628
oscar -> jeff SMTP C port=51628 helo oscar\r\nquit\r\n
jeff -> oscar SMTP R port=51628
jeff -> oscar SMTP R port=51628 220 mail.billsden.or
jeff -> oscar SMTP R port=51628 250 mail.billsden.or
oscar -> jeff SMTP C port=51628
oscar -> jeff SMTP C port=51628
jeff -> oscar SMTP R port=51628Oh, look! We see \r\n now! And it works... imagine. Moral of this story... pay attention to the man who knows the code and says "the spec says CRLF". I have a sneaking suspicion that if you do this it will also work on the other smtp servers for which you use this nc test.
Bill
Fabiano Sidler wrote:
Hello list!
My esmtpd does not respond anything on connect, even when I specify BLOCK for localhost (in smtpaccess) with an error message:
user@<host> $ nc localhost 25
220 <host> ESMTP
HELO localhost
[^C]
user@<host> $
The only log entry (with ESMTP_LOG_DIALOG=1) is as follows:
Dec 14 19:00:41 <host> courieresmtpd: started,ip=[::ffff:127.0.0.1]
I didn't configure any further access restriction or TLS setting yet. I only let esmtpd listen on 127.0.0.1 exclusively.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
