Skip to content

Instantly share code, notes, and snippets.

@andreoss
Created July 6, 2023 19:20
Show Gist options
  • Save andreoss/cf963f63f204ae5f93122a29cd29a1fe to your computer and use it in GitHub Desktop.
Save andreoss/cf963f63f204ae5f93122a29cd29a1fe to your computer and use it in GitHub Desktop.
Fix duplicate UID errors after migrating Maildir to new machine
# Duplicate UID Errors
export OLD=old-hostname NEW=new-hostname
find ~/Maildir -name "*.${OLD}*" -type f -exec bash -c 'X={}; Y=${X/$OLD/$NEW}; [ "$X" != "$Y" ] && mv --verbose "$X" "$Y"' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment