Check mail queue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check mail queue
# 1  
Old 01-20-2015
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 admin@mydomain.com )? very thanks
# 2  
Old 01-21-2015
I suspect that if you have pending mail, then generating a report to try to e-mail you a warning will also get stuck.

If your internet connection at home is not working, how do you e-mail the company/log a fault on their web-site to let them know? You have to use another method, e.g. phone, use an alternate provider next door etc.


What alternate notification have you considered?





Robin
# 3  
Old 01-22-2015
Quote:
Originally Posted by rbatte1
I suspect that if you have pending mail, then generating a report to try to e-mail you a warning will also get stuck.

If your internet connection at home is not working, how do you e-mail the company/log a fault on their web-site to let them know? You have to use another method, e.g. phone, use an alternate provider next door etc.


What alternate notification have you considered?





Robin
thanks reply ,

the email will send to my mobile phone , and my email system is very stable , it nearly 99.99% availability .
# 4  
Old 01-22-2015
If outgoing e-mail is stuck on your server, how will the notification get out to your mobile?

Consider a door bolted from the other side. How will you get a message out to ask someone to open the door?


I feel you are missing my point here.



Robin
# 5  
Old 01-23-2015
thanks reply ,

would you please ignore the probability of server failure .

thanks
# 6  
Old 01-23-2015
Quote:
Originally Posted by ust3
thanks reply ,

would you please ignore the probability of server failure .

thanks
You are completely missing the point!

If mail is stuck on your server, you can't send mail to anyone saying that mail is stuck because the mail message saying the mail is stuck will also be stuck.

The entire point of this thread is that your mail server is failing to deliver mail messages. If we ignore that there is a possible server failure, there is no need to send a message saying there has been a failure since you want to ignore what has happened.

If we don't ignore that your mail server has failed, you have to use some mechanism other than mail to deliver that notification.

As an example, if your car runs out of gas, you can't drive that car to a gas station to get more gas. You can call AAA to deliver gas to you; you can walk to a gas station, buy a gas can, fill the can with gas, walk back to your car, and put the gas you bought into you car; you can abandon your car and start using a bicycle to get around; or you can get around several other ways.

But, until you fix your mail server failure, you can't send mail to anyone saying that you have a mail server failure.
# 7  
Old 01-23-2015
thanks suggestions

mails stopped in the mailq usually because the particular mail domain error or mail relay problem , it do not cause the mail completely can't send out .
therefore , I think use script to check the mailq status is reasonable.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Advanced & Expert Users

can "netif_queue_stopped" function check wether or not the net device queue is stopped?

Hi, all: In linux 3.0.4, can "netif_queue_stopped" function check wether or not the net device queue is stopped? How could I know wether a net device queue is stopped or not? li,kunlun (0 Replies)
Discussion started by: liklstar
0 Replies

4. Shell Programming and Scripting

Check if Queue empty or full in perl

Hi, I got problem with queue code how to determined empty and full and problem with while loop Here is my pseudo code : Input page Access Input Pgae Frame For i =3 to pageframe count by 1 construct queue of size i set pageFaultCount to 0 while morepages do page = NextPage... (1 Reply)
Discussion started by: guidely
1 Replies

5. Shell Programming and Scripting

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 (12 Replies)
Discussion started by: mac4rfree
12 Replies

6. 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

7. 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

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

Featured Tech Videos