LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2014, 01:34 PM   #1
circus78
Member
 
Registered: Dec 2011
Posts: 273

Rep: Reputation: Disabled
Re-initialize postfix spool directories


Hi,

I manually deleted lots of message in /var/spool/postfix/defer and /var/spool/postfix/deferred

Now, mailq says that I've just 3 email in queue.
But I noticed that I still have several (about 30000) files under /var/spool/postfix/* directories.

How can I completely erase my queue?
Thank you
 
Old 06-04-2014, 01:37 PM   #2
G_A
LQ Newbie
 
Registered: Jun 2014
Posts: 29

Rep: Reputation: Disabled
How about:
sudo postsuper -d ALL
 
Old 06-05-2014, 06:21 AM   #3
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Hi, I already did this:

Quote:
# time postsuper -d ALL
postsuper: Deleted: 6 messages

real 7m16.440s
user 0m0.008s
sys 0m51.095s
anyway, I notice that every time I use "mailq" command, it takes a very long time.
Furthermore:

Quote:
# ls -la
totale 220104
drwxr-xr-x 20 root root 4096 28 mag 17:26 .
drwxr-xr-x 6 root root 4096 12 lug 2010 ..
drwx------ 2 postfix root 118841344 5 giu 12:50 active
drwx------ 2 postfix root 4096 5 giu 10:52 bounce
drwx------ 2 postfix root 4096 12 lug 2010 corrupt
drwx------ 18 postfix root 4096 25 set 2010 defer
drwx------ 18 postfix root 4096 25 set 2010 deferred
drwxr-xr-x 2 root root 4096 5 giu 06:27 dev
drwxr-xr-x 3 root root 4096 4 giu 10:21 etc
drwx------ 2 postfix root 4096 4 giu 12:41 flush
drwx------ 2 postfix root 4096 12 lug 2010 hold
drwx------ 2 postfix root 106237952 5 giu 12:34 incoming
drwxr-xr-x 2 root root 4096 4 giu 10:21 lib
drwx-wx--T 2 postfix postdrop 4096 5 giu 12:34 maildrop
drwxr-xr-x 2 root root 4096 4 feb 2012 pid
drwx------ 2 postfix root 4096 4 giu 12:17 private
drwx--s--- 2 postfix postdrop 4096 4 giu 12:17 public
drwx------ 2 postfix root 4096 12 lug 2010 saved
drwx------ 2 postfix root 4096 30 mag 10:28 trace
drwxr-xr-x 3 root root 4096 12 lug 2010 usr
this is quite strange..
 
Old 06-05-2014, 07:14 AM   #4
G_A
LQ Newbie
 
Registered: Jun 2014
Posts: 29

Rep: Reputation: Disabled
Quote:
Originally Posted by circus78 View Post
Hi, I already did this:

anyway, I notice that every time I use "mailq" command, it takes a very long time.
Furthermore:

this is quite strange..
I might be stating the obvious(and the dangerous), but: Did you try stopping Postfix and any other mail related software, entering those dir's and moving/deleting all the files in them ?
 
  


Reply



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
tar: var/spool/postfix/public/cleanup: socket ignored Skaperen Ubuntu 2 01-21-2010 03:51 PM
How to initialize Postfix? Gins Linux - General 13 08-11-2007 04:43 PM
/var/spool/postfix/trace/ permissions paul_mat Linux - Networking 1 06-13-2006 03:15 PM
postfix error procmail: Couldn't create "/var/spool/mail/ bentman78 Linux - Software 4 05-26-2004 12:04 AM
postfix spool problem wedgeworth Linux - Software 3 10-30-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration