-#### Use ap to get the username. That will either be what's in the
-#### Local-Mailbox profile component, which we don't use in the test
-#### suite, or the user's login name. ap will escape (quote) it if
-#### needed.
-user=`run_prog ${MH_LIBEXEC_DIR}/ap -format '%(me)' 0`
+#### Remove existing Local-Mailbox: profile component, if any.
+grep -v 'Local-Mailbox: ' "$MH" > "$MH".new
+mv -f "$MH".new "$MH"
+
+user=`id -nu`