There's nothing in the current nmh configure script that sets ac_cv_header_db_h. This dates from a time when nmh's ndbm configure checks chose db.h over ndbm.h. It hasn't been needed since 2005 when the ndbm detection was rewritten.
- todd Index: mail/nmh/Makefile =================================================================== RCS file: /cvs/ports/mail/nmh/Makefile,v retrieving revision 1.42 diff -u -p -u -r1.42 Makefile --- mail/nmh/Makefile 30 Nov 2017 11:14:53 -0000 1.42 +++ mail/nmh/Makefile 1 Feb 2018 18:30:01 -0000 @@ -29,8 +29,7 @@ RUN_DEPENDS= mail/p5-MIME-tools \ FLAVORS= sasl FLAVOR?= -CONFIGURE_ENV= ac_cv_header_db_h=no \ - CPPFLAGS="-I${LOCALBASE}/include" \ +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" USE_GROFF = Yes