On 29 May 2020, at 23:49, Admin Beckspaced <admin@beckspaced.com> wrote:
I also have maildir as mailbox format and use the following script to do daily backups
A couple of notes on this quite useful script:
My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to:
DIR_TEMP=$($MKTEMP_COMMAND -d $TMP_FOLDER -t $SCRIPT_NAME)
Which gives a temp folder along the lines of
/tmp/dovecot_backup.IiZ00GyZ
I also changed the various date strings to date -Iseconds and date -R for the mail handling since the format in the script is not to spec, using
Fri, 29 May 2020 23:49:31 (-0600)
Instead of the
-R, --rfc-email
output date and time in RFC 5322 format. Example: Mon, 14
2006 02:34:56 -0600
-- FRIDAYS ARE NOT "PANTS OPTIONAL" Bart chalkboard Ep. AABF23