feat: added the script that was used to get stuff abck online after Nixos Mailserver migration 3
This commit is contained in:
parent
513d0958f3
commit
ff82802e16
1 changed files with 16 additions and 0 deletions
16
mail/migration3_cleanup.sh
Normal file
16
mail/migration3_cleanup.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# After running Migration 3 (https://nixos-mailserver.readthedocs.io/en/latest/migrations.html#dovecot-mail-directory-migration)
|
||||||
|
# For some reason dovecot was putting items into /var/vmail/ldap/$USERNAME@skynet.ie instead of /var/vmail/skynet.ie/$USERNAME
|
||||||
|
# Whats more it was expecting to see items there so email clients were erroring out (seeing empty inboxes).
|
||||||
|
# This could be due to the extra commits we have on top of the main nixos mailserver
|
||||||
|
# This might be the case since migration 2 mentions teh /var/vmail/ldap folder as not being desired
|
||||||
|
|
||||||
|
for f in *; do
|
||||||
|
if [ -d "$f" ]; then
|
||||||
|
echo "$f"
|
||||||
|
mkdir -p "/var/vmail/ldap/$f@skynet.ie/"
|
||||||
|
# hardlink "copy", can delete the original folder afterwards
|
||||||
|
cp -rlp /var/vmail/skynet.ie/$f/* "/var/vmail/ldap/$f@skynet.ie"
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue