Help us enhance your Sophos Community experience. Share your thoughts in our Sophos Community survey.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Clean exim mail queue manually

Hi 

I had to clean up the mail queue on a multi node cluster manually like:

chroot /var/chroot-smtp /bin/exim -bp | grep "spamuser@spamdomain.com" | awk {'print $3'} | xargs chroot /var/chroot-smtp /bin/exim -Mrm


The mail queue is now nearly empty "chroot /var/chroot-smtp /bin/exim -bp"


But the astaro mail manager still shows a huge spool.
What is to do now?

And no I could not use the mail manager to cleanup, this tool is just impossible to use with thousands of messages in the spool.


And why do I still have thousands of messages in /var/chroot-smtp/spool/input/input/* ? (Sry im clearly not an exim user) and exim -bp shows like 200.


Thanks


This thread was automatically locked due to age.
  • Raffis, on the lower-right-hand corner of the 'SMTP Spool' page in Mail Manager, you can select a "Global cleanup action" to delete everything.  Were you able to use that to fix your issue?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Raffis, on the lower-right-hand corner of the 'SMTP Spool' page in Mail Manager, you can select a "Global cleanup action" to delete everything.  Were you able to use that to fix your issue?

    Cheers - Bob


    Not really cause there are messages which I do not want to remove.
    Just need a command to sync the astaro db with the actual exim mail spool.
  • Still the same Problem.

    I need to remove 100.000 messages from the queue. 
    But only 100.000 messages from one user.

    How?
  • If you have a paid license, you should have your reseller contact Sophos Support.  If this is a home license, try:

    /etc/init.d/postgresql92 rebuild


    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi,

    I got a simular situation. A PC on the boardmembers network got infected and startet spamming. The local ASG120 is set to filter outgoing in transparent mode so it has taken a nasty hit.
    Spool says atm around 205000 emails in spool. Mail manager shows nothing..
    Deleting the entire spool queue is not an option.

    I dont really care if its not by the book, as long as I can convince exim in a shell to delete all mails from a certain domain "mail.mydomain.com".

    The command postet first in this thread returns : exim: no message ids given after -Mrm option
    When I just use "@mail.mydomain.com" in the grep.

    Help would be appreciated as the queue grows by the minut and it aint exactly business hours right now.
  • Just a follow up.. I got it solved but had to clear everything since the global delete everything only work on mails that is in spool or quarantine.

    Clearing out /var/storage/chroot-smtp/spool/work solved it in the end.

    after that global clear from mail manager og database rebuild.