Um dos problemas mais comuns que vários administradores encontram ao compilar o programa sendmail é o passo em que a documentação é criada.

    A compilação do sendmail exige a existência do pacote groff que por sua vez, para ser compilado, exige o pacote C++. Ou seja, por causa de algo dispensável (a documentação do sendmail pode ser obtida de diversas formas diferentes em dezenas de sites na Internet), a compilação do próprio sendmail não se conclui.

    O que pouca gente sabe é que é possível criar um arquivo contendo os parâmetros específicos para uma determinada instalação, onde você pode especificar como você quer que o sendmail seja compilado.

    Para isto, basta criar um arquivo chamado site.config.m4. Este arquivo deve ficar em BuildTools/Site. Tudo isto, é claro, debaixo da árvore de diretórios do sendmail. Considerando-se a versão atual do sendmail, 8.9.3 (em 12 de junho de 1999), o caminho completo ficaria:

    /usr/local/src/sendmail-8.9.3/BuildTools/Site/site.config.m4
    O /usr/local/src/ fica por minha conta. Eu tenho por hábito colocar os fontes de todos os softwares instalados nos sistemas que administro debaixo do diretório /usr/local/src.

    O arquivo site.config.m4, não existe. É necessário que seja criado. Para resolver este problema específico, da compilação do sendmail onde não exista o groff, deverá conter:

    define(`confNROFF', `nroff')
    define(`confMANDOC', `-man')
    Estas duas diretivas definem que o programa formatador de páginas seja o programa nroff, que irá receber a flag "-man". Preste bastante atenção no tipo das aspas. Isto é muito importante!

    Em seguida, ao compilar o programa sendmail, você deve sinalizar ao script de compilação que o arquivo site.config.m4 deve ser incluído:

    # cd /usr/local/src/sendmail-8.9.1/src
    # ./Build -f ../BuildTools/Site/site.config.m4
    E pronto, o sendmail será compilado sem problemas.

    Estou incluindo aqui o arquivo README que fica no diretório sendmail-8.9.1/BuildTools. A configuração do sendmail é bastante flexível e permite que especifiquemos diversas opçoes diferentes. Este arquivo aborda esta questão em detalhes.

    Se você quiser pegar a última versão do sendmail, pode obtê-la a partir do mirror mantido no servidor ftp da Unicamp, no endereço http://ftp.unicamp.br/pub/mail/sendmail

    Arquivo /sendmail-8.9.1/BuildTools/README

    This directory contains tools.  Do not attempt to actually build
    anything in this directory.

    The Build script allows you to specify a site configuration file by using
    the -f flag:

            Build -f siteconfig.m4

    You can put such site configuration files in the Site sub-directory;
    see Site/README for details.

    While building a site configuration file, you can add to a definition
    using the APPENDDEF() and PREPENDDEF() macros.  For example:

            APPENDDEF(`confINCDIRS', `-I/usr/local/bind/include')

    will add -I/usr/local/bind/include to the already existing confINCDIRS.
    Note: There must be no trailing spaces after the last quote mark and
    before the closing parenthesis.  Also you may need to properly quote
    m4 reserved words as specified by your vendor's m4 command.

    By default, sendmail will search your system for include and library
    directories as well as certain libraries (libdb.* for Berkeley DB and
    libbind.a or libresolv.* for name resolution).  You can turn off this
    configuration step by specifying the -S flag with the Build command.

    The OS subtree contains definitions for variations on a standard
    model for system installation.  The M4 variables that can be defined
    and their defaults before referencing the appropriate OS definitons
    are:

    confBEFORE          [empty]             Files to create before sendmail is
                                            compiled.  The methods must be defined
                                            in the Makefile using PUSHDIVERT(3).
    confBUILDBIN        ../../BuildTools/bin
                                            The location of the build support
                                            binaries, relative to the obj.*
                                            directory.
    confCC              cc                  The C compiler to use.
    confOPTIMIZE        -O                  Flags passed to CC as ${O}.
    confDEPEND_TYPE     generic             How to build dependencies.  This should
                                            be the name of a file in
                                            BuildTools/M4/depend
    confEBINDIR         /usr/libexec        The location for binaries executed
                                            from other binaries, e.g., mail.local
                                            or smrsh.
    confENVDEF          [empty]             -D flags passed to cc.
    confHFDIR           /usr/share/misc     Location of the sendmail help file.
    confINCDIRS         [empty]             -I flags passed to cc.
    confINSTALL         install             The BSD-compatible install program.
                                            Use ${BUILDBIN}/install.sh if none
                                            is available on your system.
    confLDOPTS          [empty]             Linker options passed to ld.
    confLIBDIRS         [empty]             -L flags passed to ld.
    confLIBS            [varies]            -l flags passed to ld.
    confLIBSEARCH       db bind resolv 44bsd
                                            Search for these libraries for
                                            linking with programs.
    confLINKS           ${UBINDIR}/newaliases ${UBINDIR}/mailq \
                        ${UBINDIR}/hoststat ${UBINDIR}/purgestat
                                            Names of links to sendmail.
    confMANROOT         /usr/share/man/cat  The root of the man subtree.
    confMAN1            confMANROOT 1       The location of man1 files.
    confMAN1EXT         1                   The extension on files in confMAN1.
    confMAN1SRC         0                   The source for man pages installed
                                            in confMAN1.
    confMAN5            confMANROOT 5       The location of man5 files.
    confMAN5EXT         5                   The extension on files in confMAN5.
    confMAN5SRC         0                   The source for man pages installed
                                            in confMAN5.
    confMAN8            confMANROOT 8       The location of man8 files.
    confMAN8EXT         8                   The extension on files in confMAN8.
    confMAN8SRC         0                   The source for man pages installed
                                            in confMAN8.
    confMANDOC          -mandoc             The macros used to format man pages.
    confMANOWN          bin                 The owner of installed man pages.
    confMANGRP          bin                 The group of installed man pages.
    confMANMODE         444                 The mode of installed man pages.
    confMAPDEF          [varies]            The map definitions, e.g.,
                                            -DNDBM -DNEWDB.  -DNEWDB is always
                                            added if a libdb.a can be found.
    confNO_MAN_INSTALL  [undefined]         If defined, don't install the man
                                            pages by default.
    confMBINDIR         /usr/sbin           The location of the MTA (sendmail)
                                            binary.
    confNROFF           groff -Tascii       The command to format man pages.
    confOBJADD          [empty]             Objects that should be included in
                                            when linking sendmail and the
                                            associated utilities.
    confSBINDIR         /usr/sbin           The location of root-oriented
                                            commands, such as makemap.
    confSBINOWN         root                The owner for setuid binaries.
    confSBINGRP         kmem                The group for setuid binaries.
    confSBINMODE        4555                The mode for setuid binaries.
    confSHELL           /bin/sh             The shell to use inside make.
    confSMOBJADD        [empty]             Objects that should be included in
                                            when linking sendmail.
    confSRCDIR          ../../src           The sendmail source directory
                                            relative to support program obj.*
                                            directories.
    confSTDIR           /var/log            The directory in which to store the
                                            sendmail status file.
    confUBINDIR         /usr/bin            The directory for user-executable
                                            binaries.
    confUBINOWN         bin                 The owner for user-executable binaries.
    confUBINGRP         bin                 The group for user-executable binaries.
    confUBINMODE        555                 The mode for user-executable binaries.
     

    @(#)README      8.22 (Berkeley) 6/30/98
     
     


| Anterior | | Próxima | | Sumário | | Notas |

SENDMAIL
Página 20