Sunday, September 20, 2009

SENDMAIL Notes 7: Sendmail Macros and Basic Configurations

M4 configuration in Sendmail
    M4 is a Macro program which allows to define key value pairs i.e names with values, such as configuration options with values and responsible for expanding the values to syntax that sendmail that recognizes.
eg:- readable config file) file is the input taken by M4 to create readable) file.

Generation Of Sendmail Configuration Files:
    If u are installing the sendmail from the source code all the configuration examples and M4 files that needed while converting the "*.mc" file will be present inside the directory /sendmail-8.14.2/cf. and if you are using the rpm based binaries all the configurations example and M4 files that needed while converting the "*.mc" file will be present inside /usr/share/sendmail-cf
The following is the basic configurations that needed by sendmail in file to start with

VERSIONID(`$Id:,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')

/sendmail-8.14.2/cf or /usr/share/sendmail-cf directory:

    m4/:  directory contains the files that is used for compiling M4 with sendmail config file while running the Build script from the sub-directory cf/ (or #m4 >
    README.txt: file contains all the derivatives that can be understood ( M4 preprocessor )by sendmail inside this directory.
    cf/:  In /sendmail-8.14.2/cf or /usr/share/sendmail-cf "cf/" is the sub-directory which contains the M4 configuration files. & are the two config files that is used for generation of file. These configuration file is enough to create a minimum level of sendmail server on Linux distros. file is used by MTA and file is used by MSP.

Basic Derivatives and struchure of
dnl = delete through new line
    This tells the M4 deamon to delete any superfluous or excessive new lines after creation of subsequent derivatives for mc files to cf file.

VERSIONID(`$Id:,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')

    Using this derivative M4 creates the version information of the sendmail as well the OS.


    It says to the m4 program to navigate to the ostype directory and find the file called linux.m4 and include the contents while generating the file.M4 expands this session and produces the linux.m4 contains the basic path to sendmail binaries, other utilities like procmail-the local mailer and version of OS


    sendmail-8.14.2/cf/domain is the directory which contains the generic.m4 file.This file is included by M4 while the generation of the "*.cf" file. The domain folder contains the basic configurations of domain examples. The generic.m4 file is used, if we have any domain routing needs such as how to handle the msgs based on a domian or a sub-domain, masqurading etc. It contains the derivatives for
    .forward file path
    maximum mail Header Length.
    use of cw file etc.

MAILER(local)dnl   &

    sendmail-8.14.2/cf/mailer is the directory which contains the M4 for local,smtp as well as procmail.
    Here every mailer has their own defnitions. inlcudes the path of program and the rules.
    local mailer permits the redirection of the msgs in to programs.


`./Build install-cf`

inside the cf directory to create the configuration file is equal to
In source:

[root@centos cf]# pwd
[root@centos cf]# m4  ../m4/cf.m4

In RPM based:

#m4 >

No comments:

Post a Comment

tag ur valuable ideas below