Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-2009, 02:23 AM
Elite Member
 
Posts: 296
Default how clean postfix queue?

i have postfix queue full, as u can ses:

Code:
$ mailq
[snipped]
-- 7290 Kbytes in 2551 Requests.
i have an handy script of one line that i use in my postfix servers to clean the queue, here it is:

Code:
 cat clean_queue
mailq | tail -n +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($7 == "'$1'" ) print $1 } ' | tr -d '*!'| postsuper -d -
i need superuser privilges to run it and i need to be su as zimbra user to have his env

thsi is what i get:

Code:
su - zimbra

cd log/my_script
./clean_queue root@this.domain.it
postsuper: fatal: use of this command is reserved for the superuser
how can i recode the small script to overcome thsi issue?

tia

-m
Reply With Quote
  #2 (permalink)  
Old 07-13-2009, 03:00 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

Why not put 'sudo' in front of the word 'postsuper' in your one line script?

I think the questions to ask are: which queue is full and why is the queue full?
__________________
Regards


Bill
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.