Operating System - Linux
1755986 Members
4483 Online
108839 Solutions
New Discussion юеВ

Re: how to test whether sendmail is working or not

 
Reena_1
New Member

how to test whether sendmail is working or not

hello
i want to check whether sedmail works on my red hat linux 7.1,how can i check this,coz i have to send mails using php scripts via this linux server..can u help me please..
thanx in anticipation..
reena
forum
3 REPLIES 3
Marco Paganini
Respected Contributor

Re: how to test whether sendmail is working or not

Hello Reena,

Sendmail is a complex beast. There are many things to test, but I'm guessing you only want some simple tests here.

The most basic (and preliminary) test would be to invoke sendmail with the "-bv" option, giving a valid email address.

You can try:

sendmail -bv youremail@yourdomain.com

You should see a short message indicating that sendmail is able to deliver that message.

After, that, telnet to localhost, port 25 and make sure you see the sendmail greeting.

The final test is to send a few emails, both to local and remote users to make sure everything is working properly. Be careful though, since some programs tend to send mail *directly* to local users, bypassing sendmail.

Hope it helps
-- Paga
Keeping alive, until I die.
I_M
Honored Contributor

Re: how to test whether sendmail is working or not

Hi

If you can not reach your port 25 using telnet command, you may want to check your ipchain-based-firewall configuration. Since RH7.1, you can setup it at install time.
Use #ipchains -L to see if packet can reach your server or not.

good luck
Roger Baptiste
Honored Contributor

Re: how to test whether sendmail is working or not

Reena,

do

#telnet 25

If this returns sendmailrelated messages, then
your mail port is working fine
and the sendmail server is running.

The next test is to see
whether you can send a mail
outside
do
#sendmail -vt xyz@abc.com

and then end it with a dot
below
.

-> see whether it works.
If it is not able to send
the mail, then you would
need to configure the
sendmai configuration file.

HTH
raj
Take it easy.