X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=mailclean;h=04c8f9da39236d02b414930c507c88bdbe34e286;hp=31a431ab0b3fdd3c8f42cb404b8b214b2523f6b4;hb=HEAD;hpb=83a72c65a1a20398c78e41147faa8195adda710c diff --git a/mailclean b/mailclean index 31a431a..8572a6c 100755 --- a/mailclean +++ b/mailclean @@ -1,7 +1,28 @@ #!/bin/bash +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear source /a/bin/bash_unpublished/source-state if [[ $HOSTNAME != "$MAIL_HOST" ]]; then @@ -65,6 +86,12 @@ archive() { } cd /m/md -archive 800 ./!(*archive|Drafts|Sent|INBOX)/*(cur|new) ./l/!(*archive)/*(cur|new) +archive 800 ./!(*archive|board|Drafts|Sent|INBOX)/*(cur|new) ./l/!(*archive)/*(cur|new) archive 60 ./{sysadmin,rtcc,fsfcc,fsfmembers}/{cur,new} archive 30 ./Junk/{cur,new} + +# This is a generally useless file which will grow to 1gb and eat up memory. +# https://doc.dovecot.org/admin_manual/known_issues/large_cache/ +# I could probably disable the cache for this folder, but that would +# also mean I'm testing less of the full functionality. +rm -f /m/md/l/testignore/dovecot.index.cache