mailpit: refactor to allow ui to be overriden
can't use versionCheckHook because it cannot accept more than one
argument for versionCheckProgramArg
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
(cherry picked from commit 0aa507272eba764b2af3e54ca594d2b070da6956)