Just a note to remind myself of the ports needed to build mutt from the mercurial repository on FreeBSD (because I recently had to figure that out again).
# portmaster --force-config devel/mercurial devel/automake \
devel/gettext textproc/docbook-xml textproc/docbook-xsl \
textproc/libxslt databases/tokyocabinet www/lynx \
security/cyrus-sasl2
There are other combinations which might do the job, but IWFM.