LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-26-2009, 04:51 PM   #1
bigspot
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Rep: Reputation: 0
Question Cleaning mqueue and maillog contents


I'm a real newbie, so please be gentle with me.

This is kind of a dual question: I have an apache server running linux. There are autoresponders on 4 domains serving large mail lists, averaging about 50,000 to 60,000 email addresses.

There are a lot of "could not deliver mail for 4 hours, will keep trying until the message is 5 days old."

This causes the mqueue and maillog sizes to grow very large. The huge majority of the could not deliver for 4 hour bounces eventually are undeliverable.

I thought I could empty the mqueue with
# cd /var/spool/mqueue/
mqueue # find . | xargs -- rm -f

That returns a cannot remove '.' or '..' message.

What commands can I use to empty the mqueue and what command to empty the maillog?

Thanks, bigspot
 
Old 09-27-2009, 01:12 PM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by bigspot View Post
I'm a real newbie, so please be gentle with me.

This is kind of a dual question: I have an apache server running linux. There are autoresponders on 4 domains serving large mail lists, averaging about 50,000 to 60,000 email addresses.

There are a lot of "could not deliver mail for 4 hours, will keep trying until the message is 5 days old."

This causes the mqueue and maillog sizes to grow very large. The huge majority of the could not deliver for 4 hour bounces eventually are undeliverable.

I thought I could empty the mqueue with
# cd /var/spool/mqueue/
mqueue # find . | xargs -- rm -f

That returns a cannot remove '.' or '..' message.

What commands can I use to empty the mqueue and what command to empty the maillog?

Thanks, bigspot

Code:
find /var/spool/mqueue -type f -delete
wrt maillogs, you can tell log rotate to rotate the log when it gets to a certain size, or you can get the log to rotate daily.

see

Code:
man logrotate
for many examples
 
Old 10-01-2009, 01:24 AM   #3
bigspot
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Cleaning mqueue and maillog

Thanks, I got the maillogs and mqueue cleaned. I think I interrupte a current mailing by emptying the mqueue in the middle of a mail send. I think that by waiting until their is no mailing underway to empty the mqueue will work.

Thanks again.
 
  


Reply

Tags
maillog


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mqueue.h + no such file or directory kewl Programming 1 07-28-2009 02:29 PM
Not able to clean up mqueue on servers vathsan AIX 2 10-20-2008 06:16 AM
why is maillog on my server getting created in /var/log/maillog.3 ? weblink_dipti Linux - Software 2 06-16-2007 04:47 AM
mqueue has grown too large Pete Dogg Linux - Software 1 10-29-2004 09:10 AM
What is /var/spool/mqueue?? WorldBuilder Linux - General 4 05-07-2003 02:32 PM


All times are GMT -5. The time now is 03:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration