diff --git a/scripts/extract.sh b/scripts/extract.sh index 07cd824..e42c447 100755 --- a/scripts/extract.sh +++ b/scripts/extract.sh @@ -86,6 +86,20 @@ if [[ "$DANGEROUS_COUNT" -gt 0 ]]; then done < "$EXCLUDES_FILE" fi +# Also skip the cpanel user's mail spool entirely. WHP doesn't import +# email (mail-import is a panel-side roadmap item, not a sandbox-mode +# step) so extracting + scanning the mailbox tree wastes time and disk: +# on real customer accounts the mail dir often dwarfs everything else +# (10+ GB of historical mbox/maildir). The exclude pattern uses tar's +# fnmatch globs and covers both maildir + spool layouts at any depth +# under homedir/. Logged as an info line so it shows up in the panel +# import log alongside the symlink strips. +{ + echo "cpmove-*/homedir/mail" + echo "cpmove-*/homedir/mail/*" +} >> "$EXCLUDES_FILE" +log "skipping mail tree (cpmove-*/homedir/mail) — WHP does not import cPanel mail" + # --- extract -------------------------------------------------------------- # Detect compression. cpmove can be .tar.gz / .tar.bz2 / .tar.