Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Delete spam mails from queue

  1. #11
    Join Date
    Mar 2008
    Location
    India
    Posts
    24
    Rep Power
    7

    Default

    Freddie,

    How can I delete all mails from "MAILER-DAEMON", because with ID deleteing thousands mail is beyond impossible.

  2. #12
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    Quote Originally Posted by sandiphw View Post
    Hi,

    Sorry for misunderstanding. The files I attached are original one without any modification by me recently.
    There is one line in zmmta.cf
    POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf

    which I understand points to file postfix_recipient_restrictions.cf which need to be modified to block unknown receipent. So I had added the following line in this file:

    reject_unknown receipent

    (seeing syntax of rest parameters)

    Then I restart zimbra, but it didn't work. Where I am wrong?

    Thanks for your co-operation to understand my problem
    Sandip,

    If you insist on modifying it in this file instead of zmmta.cf, then the syntax needs to be
    smtpd_reject_unlisted_recipient
    Note it must start with "smtpd" and the word is "unlisted" rather than "unknown." Both of these elements are sourced here at Postfix. In addition, there is no space between any of the words, each is separated by an underscore character (_).

    You may need to add "=yes" to the end of that expression if there is a setting somewhere else in a file you haven't found that has made it "no" but according to Postfix the default for that setting is "yes" if you have inserted it.

    This is not one of those places where the computer understands what you MEANT to say, you have to be precise to every character.

    Cheers,

    Dan

  3. #13
    Join Date
    Jun 2007
    Location
    BC, Canada
    Posts
    281
    Rep Power
    8

    Default

    Quote Originally Posted by sandiphw View Post
    Freddie,

    How can I delete all mails from "MAILER-DAEMON", because with ID deleteing thousands mail is beyond impossible.
    Read the man page for postsuper. And check the docs on The Postfix Home Page. There are examples of perl scripts and awk scripts for deleting all messages with a specific e-mail address in there. I've never had to do more than 15-20 at a time, and never more than 2-3 times a year, so I haven't automated it beyond using the middle mouse button to copy/paste while typing -d in between.
    Freddie

  4. #14
    Join Date
    Mar 2008
    Location
    India
    Posts
    24
    Rep Power
    7

    Default

    Thank you both for your guidance. I shall try for both and let you know.

    We are presently on FC4 with kernel version 2.6.11

    If we want to upgrade zimbra to latest version, should we need to upgrade kernel also?


    Best Regards,

    Sandiip

  5. #15
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    Default

    Quote Originally Posted by sandiphw View Post
    We are presently on FC4 with kernel version 2.6.11

    If we want to upgrade zimbra to latest version, should we need to upgrade kernel also?
    Well, the current version (see downloads page) is for Fedora 7. The latest 4.x version, 4.5.11, is still available for Fedora Core 4, so I would think if you have it fully patched you should be OK.

    But I'm reasonably certain there is more different in the distro than just the kernel; upgrading kernel only would probably leave you lacking a few dependencies when it comes to 5.x.

  6. #16
    Join Date
    Sep 2012
    Posts
    15
    Rep Power
    3

    Default

    Let me summarize in a few commands what I got from this thread, which worked for me (ZCS 8)

    How to purge your queue:
    -------------------------


    Following is the step-by-step process. It gives you the opportunity to verify what you are doing in order to avoid the deletion of wrong mails. Additionally, it gives you the possibility to check who (mail address) is generating the spam.

    sudo su -
    cd /root
    # Letís retrieve all pending mails
    /opt/zimbra/postfix/sbin/postqueue -p > 01-cola.txt
    # Letís get the ID line (including date and sender)
    grep -v "^ " 01-cola.txt | grep -v "^$" | grep -v "^-" > 02-cola.txt
    # Letís get the ID only.
    cut -c-11 02-cola.txt > 03-cola.txt
    # Minor summary
    echo ďSe van a eliminar `cat 03-cola.txt | wc -l` elementos de las colas.Ē
    # Letís remove the mails.
    cat 03-cola.txt | /opt/zimbra/postfix/sbin/postsuper -d - > 04-cola.txt
    If you like risking, you can do everything in a single command (where cola = hold, incoming, active, deferred):

    sudo su -
    /opt/zimbra/postfix/sbin/postsuper -d ALL cola
    Thanks you all for this thread, it helped me a lot.
    Regards.
    Last edited by JMoreno; 11-02-2012 at 03:43 AM.

Similar Threads

  1. [SOLVED] Problems with Mails queue
    By danny.sierra@omtech.net in forum Administrators
    Replies: 3
    Last Post: 02-08-2008, 09:00 PM
  2. [SOLVED] Spam delete over a certain score
    By bjquinn in forum Administrators
    Replies: 10
    Last Post: 10-02-2007, 10:30 AM
  3. Mails accumulating in deferred queue
    By NIRMESH KUMAR in forum Administrators
    Replies: 10
    Last Post: 03-19-2007, 01:17 AM
  4. Mails stuck in queue
    By montievv in forum Administrators
    Replies: 1
    Last Post: 08-08-2006, 08:21 PM

Posting Permissions

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