Displaying 2 results from an estimated 2 matches for "attdir".
2015 Mar 03
3
Rebuilding SIS attachment links from log
This seems simple enough...I'm just not script wizard. If someone can
throw together a starting point I can test and tweak it from there. It
seems to me:
1. Read /var/mail/mail.err or specified logfile
2. For each "failed:
read(/var/mail/attachments/aa/bb/attachmentHash-userHash" line,
a. Confirm /var/mail/attachments/aa/bb/hashes/attachmentHash exists
i. If
2015 Mar 04
0
Rebuilding SIS attachment links from log
I use this script for review. For a correct result Dovecot should not run.
#!/bin/bash
attdir="/var/files/attachments"
maildir="/var/mail"
cd "$attdir" || exit 1
find -type f -printf "%P\n" | grep -v "hashes" | sort -u
>"$maildir/attachments.s"
cd "$maildir" || exit 2
rm "$maildir/files.ok" "$maildir/...