General
cancel
Showing results for 
Search instead for 
Did you mean: 

mqueue increasing problem >> can't delet it >>

 
SOLVED
Go to solution
Highlighted
Honored Contributor

Re: mqueue increasing problem >> can't delet it >>

Hi Prakash,

If the contents of mqueue are not important for you, delete them.

You can use the command:
# find /var/spool/mqueue -type f -exec rm -f +
Don't fix what ain't broke
Highlighted
Advisor

Re: mqueue increasing problem >> can't delet it >>

Hi R.K.

THis command also doesnt work. :(
Highlighted

Re: mqueue increasing problem >> can't delet it >>

>drwxr-xr-x 13963264 Dec 24 11:12 mqueue

For this directory to be this big means you have plenty of undeliverable mail. Try mailq(1m) to list them all.

>How can I delete this directory?

You don't. You fix the sendmail issues and the mail will be removed when sent.
Or you remove the file tuples for each message.

>I am getting following message continuously
>queueup: cannot lock tfFAA14641: No locks available"

You get this because you are removing the mail messages. You may want to stop sendmail while you do it.

>This command also doesn't work.

Why doesn't it work? How many files are left in mqueue/?

What do these show:
bdf /var/spool
du -kxs /var/spool/*
Highlighted

Re: mqueue increasing problem >> can't delet it >>

If you are worried about the 14 Mb for the size of the mqueue directory, then the only way to reduce it is to create a new directory and move the files there, then rename it.
Highlighted
Advisor

Re: mqueue increasing problem >> can't delet it >>

Hi,

I tried renaming... but it also doesnot work saying " directory already there"

Can anyone tell me how can i fix this sendmail issue ?
Highlighted
Honored Contributor
Solution

Re: mqueue increasing problem >> can't delet it >>

Stop your sendmail daemon before deleting /var/spool/mqueue/* files.

sh /sbin/init.d/sendmail stop

*Something* seems to be using your sendmail to continuously queue up more and more emails for sending, and your sendmail cannot deliver them to the destination for some reason.

1.) Check your cron job log: /var/adm/cron/log. Are there any often-repeating cron jobs?

If a cron job is producing any output to the standard output or standard error, the system will attempt to mail the output to the owner of the cron job. Normally this causes the /var/mail directory to grow, but if the cron job emails have been redirected to a remote destination which is unreachable, it will cause the /var/spool/mqueue directory to grow.

2.) If your system is accessible from the Internet and you haven't done anything to protect HP-UX 11.11 system against spammers, the spammers will eventually find your system and use your disk space, CPU time and network bandwidth to spread their junk emails.

The spammer connects to your sendmail, says "Hey, please deliver this message about herbal male enhancement pills to this list of 100 000 email addresses" and disconnects. Many of those addresses may be gathered programmatically from discussion forums and web pages, and a lot of those addresses are old or flat-out incorrect.

Your sendmail doesn't know this and makes multiple attempts to deliver each and every mail to its destination, storing each undeliverable message for about a week before eventually giving up.

This is called "being an open relay" and it's a very bad mail server administration practice. It harms you by letting the spammers consume your network bandwidth, and also harms other people by pushing unwanted junk messages to their systems.

Most email administrators hate junk emails and may report known spam relays to various blacklists. If this happens to you, emails from any server at your site may be rejected by some mail servers, causing problems in your email connectivity. Most blacklist systems will periodically verify whether the problem still exists and will eventually expire the blacklist entry if the mail system is secured, but this can take a while.

-----------

Read your /var/adm/syslog/mail.log to find out where these messages are coming from. If they have been generated on the local system, it is because some process has problems; fix it.

If these troublesome messages have been arriving from an outside source, start improving the security of your sendmail configuration. If your system does not have to receive email from the outside world and you have a firewall, block all access from the Internet to TCP port 25 of your HP-UX server.

MK
MK
Highlighted
Honored Contributor

Re: mqueue increasing problem >> can't delet it >>

Hi,

My configuration:

/dev/vg00/lvvarspool 24576 3375 20839 14% /var/spool

Create new lvol for "/var/spool"
Stop process "spooler", "pwgr", "maildaemon", etc. and copy files to new "lvol"

Remove old files and mount new fs.

Rgs,







Highlighted
Advisor

Re: mqueue increasing problem >> can't delet it >>

Thanks guys,

One most important thing i forgot to tell you that " WE ARE NOT USING MAIL SERVICES FROM THIS SERVICE. I.E. SYSTEM IS NOT CONFIGURED WITH ANY MAIL ACCOUNT. IT DOESNT HAVE INTERNET CONNECTON, NOT EVEN WITHA NY INTERNAL MAIL SERVER."



1) unfortunately no log file in var/adm/cron/

2.) System is not accessible from internet.

-----------

Read your /var/adm/syslog/mail.log to find out where these messages are coming from. If they have been generated on the local system, it is because some process has problems; fix it.
>>>>>>>

Unfortunately this entire directory is not htere " /var/adm/syslog" . I dont know why, but somebody might have removed it i feel.


MK
Highlighted

Re: mqueue increasing problem >> can't delet it >>

>I tried renaming... but it also does not work saying "directory already there"

You will have to move the old one out of the way:
# In /var/spool/
mkdir mqueue.new
mv mqueue/* mqueue.new # assuming small number of files
rmdir mqueue
mv mqueue.new mqueue

>Can anyone tell me how can I fix this sendmail issue?

It might help if you look at the mail to see why it is generated and failing to be sent?

>We ARE NOT USING MAIL SERVICES FROM THIS SERVICE.

This is a problem. Mail has to go somewhere, unless delivered locally.

>Unfortunately this entire directory is not there /var/adm/syslog.

Then recreate it so you can get some logs.
Highlighted
Honored Contributor

Re: mqueue increasing problem >> can't delet it >>

"WE ARE NOT USING MAIL SERVICES FROM THIS SERVICE..."

but you've, possibly, some job (or jobs) that are attempting to send mail. since it can't, its sitting in mqueue.

you either need to
a) get mail set up (which you seem not to want to do)
b) or find the jobs that are attempting to send mail and fix them so they don't
c) set a a scheduled job that cleans out mqueue routinely
d) some combination of the above.

you said you can't delete mqueue with "rm -rf", so what error do you get when you try?