Re: Bash Script for Mail sending Check



Hi,

Even I am in the same opinion as Tapani. `nc` or `nmap` actually shows
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.

I don't think that I'll have to use KILL as there won't be any firewall
block in between two machines. `nc` is a wonderful tool and with -w
option works perfect. But I think I ll go with `telnet`.

Regards,

Kurian Thayil.

On Thu, 2009-04-16 at 17:07 +0300, Tapani Tarvainen wrote:
Neater, yes, but the functionality is not equivalent.
As I understood it, OP specifically wanted to test if they
can connect to the mail server, not just if port 25 is open.

Also, common though nc nowadays is, it's still not present
in every system, and if you have to install a new program
for the purpose you might as well install swaks.

Finally, irrelevant though it may be to Debian, portability
will suffer from every new external program you need.
Ugly though that kill hack is, it'll work in more or less
every *ix-related box, as it only uses standard POSIX tools.

--
Kurian Mathew Thayil.
(GPG KeyID: E232394F)

Attachment: signature.asc
Description: This is a digitally signed message part