The shell expands that * into a list of filenames and then tries to run the rm command with that list. But there's a limit to how long that list can be and you exceeded it.
Since you are using the full path, you might try a relative path instead:
Now each individual file no longer has the /var/spool/mqueue/ prefix so the expanded command is much shorter. But if this is still too long, you can try this...
The ls produces a list of file names which xargs reads. It then assembles them into a bunch of rm commands. It knows how long each one can be and it won't assemble a command that is too long.
But are sure that you want to do this? You are going to discard all of your mail! My idea of clearing the queue is
Last edited by rbatte1; 11-17-2016 at 10:59 AM..
Reason: Added CODE tags
Hi shell experts,
I would like to have a shell script running in a redhat server for monitoring the mailqueue status. I have already installed the qmHandle and I am using it to get a status of the mail queue in daily basis. I am executing the qmhandle in the cron.
Now I am planning to execute... (10 Replies)
Hi,
I have some problems w/ the sendmail. I see that messages are queued in the /var/spool/mqueue
and they are never sent to the recipients. This problem just suddenly started without any modifications in the current configuration. I already started and stop the sendmail and it did not help.... (3 Replies)
hi all.
Am using smtpd_recipient_restrictions & check_recipient_access in postfix.
The hash file looks like this:
emailaddress1 HOLD
emailaddress2 HOLD
The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
HI admins,
I am not able to clear pvid .I am getting below error.
chdev -l hdisk273 -a pv=clear
Method error (/usr/lib/methods/chgdisk):
0514-047 Cannot access a device.
pv
The disk is from SAN. I can clear remove the disk using rmdev.But if i run cfgmgr , this disk apperas... (2 Replies)
Hello
I'm using Cent OS6 and a webmin interface
I've had an issue where over 1 million emails were queued in the sendmail mail queue. I found a thread on here from 2002 explaining how to delete them all and it worked great.
Thanks Perderabu
unix-for-dummies-questions-and-answers /... (0 Replies)
I know the command mailq can check the pending mail in mqueue , and also have another command to check POSIX mail queue in server , now I will regularly check the mqueue manually , it is time consuming , would advise the script that could help to check the mail queue , and then send the details to... (3 Replies)
We use Redhat server , we always use mailq to check any pending mail in mailq , when run the command mailq , it shows all existing pending mail would advise how to write a script to show the pending mails which are older than 24 hours , ( if possible , then send this pending mail info to... (9 Replies)
Hi
I have installed an HP X451dw printer on our network and want to print from Sco Openserver v6
The printer produces correct output but then repeats until the queue is manually stopped. :confused:
It is using a netcat/dumb interface
Any advice on how to persuade it to only print once... (5 Replies)
Discussion started by: David Holmes
5 Replies
LEARN ABOUT SUNOS
mqueue
mqueue.h(3HEAD) Headers mqueue.h(3HEAD)NAME
mqueue.h, mqueue - message queues
SYNOPSIS
#include <mqueue.h>
DESCRIPTION
The <mqueue.h> header defines the mqd_t type, which is used for message queue descriptors. This will not be an array type. A message
queue descriptor may be implemented using a file descriptor, in which case applications can open up to at least OPEN_MAX file and message
queues.
The <mqueue.h> header defines the sigevent structure (as described in <signal.h>, see signal.h(3HEAD)) and the mq_attr structure, which is
used in getting and setting the attributes of a message queue. Attributes are initially set when the message queue is created. A mq_attr
structure has the following members:
long mq_flags message queue flags
long mq_maxmsg maximum number of messages
long mq_msgsize maximum message size
long mq_curmsgs number of messages currently queued
Inclusion of the <mqueue.h> header may make visible symbols defined in the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO fcntl.h(3HEAD), signal.h(3HEAD), time.h(3HEAD), types.h(3HEAD), attributes(5), standards(5)SunOS 5.10 30 Aug 2002 mqueue.h(3HEAD)