1832897 Members
2572 Online
110048 Solutions
New Discussion

Sendmail Issue on HPUX

 
panks
Regular Advisor

Sendmail Issue on HPUX

Hi All,

I have one server with HPUX 11iv2
Its sending a tons of mail to a prticular id, we came to know about it when messaging team reported the problem.
When I checked in the configuration file of sendmail I found that it is not using the same mail server mentioned in the sendmail.cf.
When I given ps -ef | grep -i sendmail, I found that it is sending a mail using 2 differentmail servers.
This server has been configured by the sys admin who left the organization.

How could I find any information about those mail it is sending, I can see them in a mailq but then it leaves the mailq soon, so how could I check the body of the mail.
Any ideas!!!

Thanks
6 REPLIES 6
VK2COT
Honored Contributor

Re: Sendmail Issue on HPUX

Hello,

Simplest method without any special changes
(there are more creative ways but they involve
some knowledge of MTA):

a) Stop the sendmail processes:

# /sbin/init.d/sendmail stop

b) Go to /var/spool/mqueue directory
and check the spooled messages.

Most probably, some cron(1) jobs generate
these frequent messages.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Johnson Punniyalingam
Honored Contributor

Re: Sendmail Issue on HPUX

also please check your routing table

you can test by your self


(type the below command followed with . and enter )

/usr/sbin/sendmail -v username@hp.com
.

Rgds,
Johnson
Problems are common to all, but attitude makes the difference
panks
Regular Advisor

Re: Sendmail Issue on HPUX

Thanks for your replies.
I found more information on this issue. The id to which system was sending the mail was of sys admin and there was alias in /etc/mail/aliases file. So every system mail was going to that id and that sys admin left the organization there was reply back coming from exchange for mail delivery failure. I commented that alias and ran the new aliases.
Now the problem I ma facing is still system is sending the lot many mails to root and root mail are getting full to number of MB in few minutes. I checked the mail details but couldn't find more, its is more of saying that mail delivery failure. Why the system is generating so many can anybody give a light on this issue.

Thanks
Johnson Punniyalingam
Honored Contributor

Re: Sendmail Issue on HPUX

Check your crontabs .?

crontab -l --> root

check if any sendmail scripts is placed and check there schedule so that you can narrow down them

or can write script to purge or delete those failed delivery mails under your " /var/mail/ "

Just an idea only

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Sendmail Issue on HPUX

forgot !! some thing !!

also try if you can stop & start the sendmail services, i saw on your pervious post to have changed the aliasess

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start


Rgads,
Johnson
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: Sendmail Issue on HPUX

>Why the system is generating so many

I assume the system is trying to send all of the mail that bounced to that old admin. After this bounces, it gets even more copies.

As Dusan mentioned, you can go into /var/spool/mqueue and clean things up.

>Johnson: can write script to purge or delete those failed delivery mails

I had to delete 1000s of messages recently. Here is what I did:
1) Use vi to look at some of the df* files. If you see lots of them you don't want, create a grep pattern.
2) grep -l "pattern" > file_list
3) Run this script to remove them:

rm_files:
#!/usr/bin/ksh
for file in $( < file_list); do
base=${file#d}
rm d$base q$base
done

4) Then go back to 1) for the next junk mail pattern.