The necessary package for telling Debian that you've got a locally built mail-transport-agent installed is "equivs". I don't know whether the hamm version will work right or not... several months back, during either hamm or slink upgrading, my equivs suddenly stopped working; I filed a "bug" report, and the maintainer told me to edit some file and change a version number, at which point everything mysteriously worked again. But don't ask me why -- no explanation was given along with this advice.
The "equivs" package only seems to be available from http://www.debian.org and not from any mirror sites. Or at least that was what seemed to be the case when I was doing all of this.... If "equivs" doesn't work for you, let me know and I can try to dig up exactly what I did. (I'm not at home right now.)