Administration
  Home arrow Administration arrow Page 7 - Getting Started with Sendmail
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Getting Started with Sendmail
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 17
    2005-07-07

    Table of Contents:
  • Getting Started with Sendmail
  • The cf directory structure
  • The cf/m4 directory
  • 1.1 Downloading the Latest Release
  • 1.2 Installing sendmail
  • 1.3 Compiling sendmail to Use LDAP
  • 1.4 Adding the regex Map Type to sendmail
  • 1.5 Compiling sendmail with SASL Support
  • 1.6 Compiling sendmail with STARTTLS Support
  • 1.7 Compiling in STARTTLS File Paths
  • 1.8 Building a sendmail Configuration
  • 1.9 Testing a New Configuration
  • 1.10 Logging sendmail

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Getting Started with Sendmail - 1.4 Adding the regex Map Type to sendmail
    (Page 7 of 13 )

    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.

    Solution

    To 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
      # cat  >>  site.config.m4
      APPENDDEF(`confMAPDEF', `-DMAP_REGEX')
     Ctrl-D
     # cd /usr/local/src/sendmail-8.12.9
     # ./Build -c

    After recompiling sendmail, reinstall it:

     # ./Build install

    Discussion

    Attempting 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
     
    sendmail.cf: line 115: readcf: map dottedquad: class regex not available
      ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
      Enter <ruleset> <address>
      >/quit

    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
      Version 8.12.9
      Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MIME7TO8 MIME8TO7 NEWDB
                     NAMED_BIND NETINET NETUNIX PIPELINING SCANF USERDB XDEBUG
    ============ SYSTEM IDENTITY (after readcf) ============ 
          (short domain name) $w = chef
      (canonical domain name) $j = chef.wrotethebook.com  
             (subdomain name) $m = wrotethebook.com
                  (node name) $k = chef ========================================================
     
    ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) 
      Enter <ruleset> <address>
      >
    /quit

    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 Also

    Recipes 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.

    More Administration Articles
    More By O'Reilly Media


       · quite a good article!
       · Really Nice Article
     

    Buy this book now. This article was excerpted from chapter one of The Sendmail Cookbook, written by Craig Hunt (O'Reilly Media, 2004; ISBN: 0596004710). Check it out at your favorite bookstore. Buy this book now.

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway