• Home
  • Free Stuff
  • About
  • Contact

Script to Remove Over Quota Message from Zimbra Queue

October 26, 2018

Sometimes we have a bunch of over quota message filling up Zimbra queue, with detail as below :

197CF170F9 59761 Wed Oct 24 09:49:48   email-palsu@vivianchow.id
(host alt1.gmail-smtp-in.l.google.com[74.125.195.27] said: 452-4.2.2 The email account that you tried to reach is over quota. Please direct 452-4.2.2 the recipient to 452 4.2.2 https://support.google.com/mail/?p=OverQuotaTemp m3-v6si2776998pld.435 – gsmtp (in reply to RCPT TO command))
email-palsu@gmail.com

The email message will be automatically removed from the queue after a while, depending on our queue lifetime setting on the server. If we want to automatically remove on the selected time interval, we can then set up crontab to run the following script :

del-over-quota.sh
[code lang=”bash”]
#!/bin/sh

clear

/opt/zimbra/postfix/sbin/postqueue -p | grep -A 1 “over quota” | grep @ | sort | uniq > /tmp/over-quota.txt

USERS=`cat /tmp/over-quota.txt`

echo “Looping for all users”
for ACCOUNT in $USERS; do

#Remove over quota queue
echo “Account over quota : $ACCOUNT”
pfdel $ACCOUNT
echo “”
done
echo “All over quota queue has been removed successfully”
[/code]

The above script is run together with pfdel script, so don’t forget to download and save pfdel script as well.

ScriptZimbra
Share

Linux

Masim "Vavai" Sugianto
Traveller, Open Source Enthusiast & Book Lover. Works as Independent Worker & Self-Employer.

2 Comments


Achmad Mahara Fauzy
February 18, 2020 at 15:53
Reply

Mas mau tanya misal saya mau grep queue id nya saja dari deferred berdasarkan notif over quota, caranya gimana ya? Mohon bantuannya terima kasih



James B
March 30, 2020 at 20:32
Reply

Hey Vavai

Great to see an Indo FIRE blog! Love the posts, thank you!

Would love to hear if there are any ETFs for Hi Index funds? As a foreigner it’s hard to know what’s available. Discovered Samuel AM, but interested in index funds…a World Index and Indonesian Hi Yield.

Also love to know more about the farm, and whether there are any hi value crops that might do well in Indonesia (although of course I appreciate Indonesia is hugely diverse), as we also have some small land and I too like the idea of developing in conjunction with the local farmers.

Anyway, keep up the good work!

Great to see FIRE in Indonesia!



Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Recent Posts

    • Januari 2021 Portfolio Update
    • December 2020 Portfolio Update
    • After a While
    • Life goes On : Farming
    • Pursuing FIRE in Indonesia : Are You Prepared For A Recession?
    • VirtualBox Error Kernel Driver not Installed (rc=-1908) on Zorin OS 15.2
    • ZorinOS on Intel NUC Hades Canyon Series NUC817HVK
    • Banana Farm
    • Zorin OS 15.2 Ultimate
    • Haraka and LDAP Authentication with Zimbra



© Copyright LetsBlog Theme Demo - Theme by ThemeGoods