Check pending mail in mail queue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Check pending mail in mail queue
# 1  
Old 10-16-2014
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 me by sendmail ?

I am not want to handle this pending mail , I just would like to know how many pending mail in the mqueue , is there a script can do that ?
thanks in advance.

Last edited by rbatte1; 10-17-2014 at 08:12 AM..
# 2  
Old 10-17-2014
Hello ust3,

Whilst you have the commands to tell you interactively if the queue is blocked for some reason (e.g. the relay server that you pass mail to is not responding) then you will not receive the notification. That could be a flaw in your thinking.

Do you have other servers that could remote connect (rsh or ssh) and get them to report to you somehow? Of course, they may be unable to send mail if it is a wider problem.



Regards,
Robin
# 3  
Old 10-17-2014
Quote:
Originally Posted by rbatte1
Hello ust3,

Whilst you have the commands to tell you interactively if the queue is blocked for some reason (e.g. the relay server that you pass mail to is not responding) then you will not receive the notification. That could be a flaw in your thinking.

Do you have other servers that could remote connect (rsh or ssh) and get them to report to you somehow? Of course, they may be unable to send mail if it is a wider problem.



Regards,
Robin
thanks reply,
yes , there are remote server , but I prefer use localhost to do the checking.
# 4  
Old 10-19-2014
Quote:
Originally Posted by rbatte1
Hello ust3,

Whilst you have the commands to tell you interactively if the queue is blocked for some reason (e.g. the relay server that you pass mail to is not responding) then you will not receive the notification. That could be a flaw in your thinking.

Do you have other servers that could remote connect (rsh or ssh) and get them to report to you somehow? Of course, they may be unable to send mail if it is a wider problem.


Regards,
Robin
Thanks reply,

I am not want to know the reason of failure to send mail and how to fix the error , I just would like to know how many mail is in the mqueue in a time .

is there script could do that ? thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

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

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. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 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. 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. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 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