flush the mail queue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting flush the mail queue
# 1  
Old 10-07-2009
flush the mail queue

Hi Guys,

My mail queue is showing a mail.

I want to flush the queue.

Can you let me know how to flush the mail queue.

Regards,
Magesh
# 2  
Old 10-07-2009
Hi,

What OS and what MTA?
# 3  
Old 10-07-2009
Sendmail-sendmail -q command flushes mail queue.
Postfix-postfix flush OR postfix -f

Last edited by rbatte1; 11-17-2016 at 11:01 AM.. Reason: Added ICODE tags
# 4  
Old 10-07-2009
You can try
Code:
cp /dev/null /var/spool/mail/your_userid

.
It works fine on AIX.
# 5  
Old 10-08-2009
@ripat,
My OS is SunOs. I do not know what is MTA?

@ proactiveaditya ,

Sendmail is not found in my box.
Code:
d003:/var/spool>sendmail -q
ksh: sendmail:  not found

@giannicello ,
mail folder is not found in /var/spool directory.
but the mail command is installed in my box.

Code:
d003:/var/spool>which mail
/usr/bin/mail

# 6  
Old 10-08-2009
Quote:
Originally Posted by mac4rfree
@ripat,
My OS is SunOs. I do not know what is MTA?
MTA == Mail Transfer Agent like exim, postfix, qmail, sendmail etc...

Which one do you have?
# 7  
Old 10-08-2009
How to find it out.. sorry i do not know about it.. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check mail queue

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)
Discussion started by: ust3
9 Replies

2. Shell Programming and Scripting

Check pending mail in mail queue

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)
Discussion started by: ust3
3 Replies

3. UNIX for Dummies Questions & Answers

Mail Queue refilling

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)
Discussion started by: bullbreed
0 Replies

4. Emergency UNIX and Linux Support

DNS flush is not working

I have a Linux machine and it seems DNS cache is not getting clear on it. It is still showing old values, even after changing in DNS server by Network team. I did /etc/init.d/nscd restart But still it is showing old values on this server. On my rest of servers in environment, nslookup is showing... (7 Replies)
Discussion started by: solaris_1977
7 Replies

5. IP Networking

postfix - reinject mail to postfix from hold queue directory

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)
Discussion started by: coolatt
0 Replies

6. UNIX for Advanced & Expert Users

mail is not sent, instead just coping into /var/spool/queue dir

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)
Discussion started by: ktanya
3 Replies

7. HP-UX

lp print flush

Dear frnds, i just migrated to hp_ux11i from digital unix, from my new system some printers not printing next day, what i mean is, in lpstat it shows printer is enabled but printing not happening. for that what i do u know, i just disable the lp and enable it again. then it would print. is there... (0 Replies)
Discussion started by: jestinabel
0 Replies

8. Shell Programming and Scripting

shell script needed for mail queue notification

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)
Discussion started by: Nightman
10 Replies

9. Shell Programming and Scripting

MyDoom in mail queue

Is there someone out there that has a script for cleaning up the mail queue after viruses such as MyDoom? (5 Replies)
Discussion started by: pmj1970
5 Replies

10. UNIX for Dummies Questions & Answers

Clearing Mail Queue

Hello, I am trying to clear my mail queue with the following command: rm /var/spool/mqueue/* But when I do this I get this error: /bin/rm: Argument list too long. Can someone tell me what that error means and what I can do to correct it so I can clear my mail queue? Thanks (2 Replies)
Discussion started by: Chet
2 Replies
Login or Register to Ask a Question