don't expect destination system to be GNU
The current maildir handler does a lot of stuff on the remote stuff, and consequently assumes a lot of things about the remote system.
The first problem is that it assumes the remote shell to be bash, especially with constructs like this:
for (( i=\$oldest; i > 0; i-- )); do
This is bash-only. This is not a big deal, but should be documented ("The remote shell should be set to bash.")
The second problem is the assumption that GNU coreutils are deployed on the remote server and that, for example, "cp" is the GNU command (and not the standard POSIX one). So for example, we assume the -a flag to cp is valid. The following patch fixes the cp and mkdir calls, along with two little bashisms:
https://svn.koumbit.net/svn/koumbit/trunk/patches/maildir-posix.patch
Without this patch, the maildir handler is unusable on a remote [[FreeBSD]] target.
(from redmine: created on 2007-10-11, closed on 2007-11-24)