Hi All,

Only a working and connection accepting Mail Server gives the status 220.
And I will be able to know only using telnet. And generally, if any other
application (not a mail server) is running in port 25 (just like SSH in port
25) both `nc` and `nmap` shows open but they won't give status 220.

Regards,

Kurian Thayil.

On Sat, Apr 18, 2009 at 12:18 PM, Tapani Tarvainen <
[email protected]> wrote:

> On Sat, Apr 18, 2009 at 08:27:43AM +0300, Andrei Popescu (
> [email protected]) wrote:
>
> > On Sat,18.Apr.09, 08:04:12, Kurian Thayil wrote:
>
> > > only whether the port is open or not. But what I need is to check if an
> > > SMTP server is listening in that port. So I guess the best tool is
> > > telnet and to check 220 status.
>
> > Hhm, I thought a port cannot be "open" unless some server is *listening*
> > on that port. What other server do you think would otherwise listen to
> > port 25?
>
> It could be under inetd, which would keep the port open even if it
> couldn't actually start the mail server, or there could be a mail
> server that's not accepting mail for some reason.
> And people do abuse ports - I've even seen ssh in port 25.
>
> So if the intent is to check if mail could be sent,
> checking for smtp reply code is better.
> (It's not 100% reliable either, but then nothing is, short of
> actually sending the mail and waiting for reply or something.)
>
> --
> Tapani Tarvainen
>
>
> --
> To UNSUBSCRIBE, email to [email protected]
> with a subject of "unsubscribe". Trouble? Contact
> [email protected]
>
>

Reply via email to