I almost tore my hair out today: I was trying to remember how to build sendmail with the MAP_REGEX option enabled. I knew I had done it in the past, but unfortunately, I didn't remember how, and the default sendmail distribution compiled on my Slackware 8.1 system with this option disabled.

Took the better part of half an hour to find out something I knew once but forgot. You need to create the following file in your sendmail source tree:


This file should contain the following line:


After this, you can rebuild sendmail the usual way. I usually do it as an ordinary (non-root) user, by issuing the ./Build command from the sendmail source directory (use ./Build -c if you have built sendmail already and want to rebuild.) If all goes well, and sendmail compiles correctly, I can then install the new code (as root this time of course) by typing ./Build install.