Results 1 to 2 of 2

Thread: how clean postfix queue?

  1. #1
    Join Date
    Mar 2007
    Small village in the center of Italy
    Rep Power

    Default how clean postfix queue?

    i have postfix queue full, as u can ses:

    $ mailq
    -- 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:

     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:

    su - zimbra
    cd log/my_script
    postsuper: fatal: use of this command is reserved for the superuser
    how can i recode the small script to overcome thsi issue?



  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Vannes, France
    Rep Power


    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?


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. postdrop fail to create file after upgrade to 5.0.3
    By echoadisan in forum Installation
    Replies: 23
    Last Post: 07-15-2013, 03:02 PM
  2. [SOLVED] Distribution list
    By chandu in forum Administrators
    Replies: 16
    Last Post: 04-02-2009, 05:17 AM
  3. [SOLVED] Error running mailboxd after script backup
    By ttortosa in forum Administrators
    Replies: 5
    Last Post: 10-22-2008, 01:33 AM
  4. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  5. 5.0 RC1: admin interface: no statistics, no mail queue
    By christian.kieft in forum Administrators
    Replies: 1
    Last Post: 11-13-2007, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts