Check the output of
$ pkg_info
It is my guess you had a failure during your first attempted installation, and now have a partial-courier-imap-4.1.1p2 installed.
If so, use
# pkg_delete partial-courier-imap
to remove it.
If you don't have a partial-* package installation, the output of
$ pkg_info -E /usr/local/bin/maildirmake
will tell you which package it belongs to.