Site Administration Page 7 - Getting Started with Sendmail |
Problem Support for the regex map type must be compiled into sendmail if the error message “class regex not available” is displayed when sendmail is run. SolutionTo add support for the regular expression map type, add MAP_REGEX to the confMAPDEF compiler variable in the site.config.m4 file and then recompile sendmail. Here is an example: # cd /usr/local/src/sendmail-8.12.9/devtools/Site After recompiling sendmail, reinstall it: # ./Build install DiscussionAttempting to run a configuration that specifies a regex map type on a sendmail system without regex support compiled in produces an error, as this test shows: #sendmail -bt The first line after the sendmail -bt command is an error message. It tells us that line 115 in the sendmail.cf file contains a K command that defines a map using the regex map type, which results in an error because regex is not supported on this system. The fix for this requires defining a local compiler variable in the site.config.m4 file in the devtools/Site directory. The APPENDDEF command used in the Solution section appends the -DMAP_REGEX command-line argument to any values that already exist in the confMAPDEF variable. The Build command that is used to recompile sendmail uses the -c flag to ensure that Build incorporates the new data from the site.config.m4 file. After compiling sendmail, run it with the -bt and the -d0.1 command-line arguments to check the compiler options: #sendmail -bt -d0.1 The “Compiled with:” line output by the -d0.1 argument displays the compiler options. This line should contain MAP_REGEX. If it does, configurations using the regex map type should now run successfully. See AlsoRecipes 1.2, 1.3, 1.5, 1.6, and 1.7 provide other examples of compiling sendmail. Recipe 6.10 uses the regex map type. The sendmail book covers compiling sendmail in section 2.2.
blog comments powered by Disqus |