From fd23efb7542edfc73114e0eb34d54c0da7c5cd4c Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Thu, 3 Oct 2019 14:06:08 +0200 Subject: [PATCH] Update 'config/postfix/clear-queue.sh' --- config/postfix/clear-queue.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config/postfix/clear-queue.sh b/config/postfix/clear-queue.sh index 9d8e5f2..3be793f 100644 --- a/config/postfix/clear-queue.sh +++ b/config/postfix/clear-queue.sh @@ -1,6 +1,13 @@ #!/bin/bash -echo "#Clear mail queue every night" >> /etc/crontab -echo "0 0 * * * /opt/clear-queue.sh" >> /etc/crontab -echo "#!/bin/sh" -echo "postfix -f" \ No newline at end of file +echo "#Purge mail queue every night" >> /etc/crontab +echo "0 0 * * * root /opt/clear-queue.sh" >> /etc/crontab +echo "#!/bin/sh" >> /opt/purge-queue.sh +echo "postfix -f" >> /opt/purge-queue.sh +chmod +x /opt/purge-queue.sh + +echo "#Clear mail queue weekly" >> /etc/crontab +echo "@weekly root /opt/clear-queue.sh" >> /etc/crontab +echo "#!/bin/sh" >> /opt/clear-queue.sh +echo "postsuper -d ALL" >> /opt/clear-queue.sh +chmod +x /opt/clear-queue.sh \ No newline at end of file