Adding
            Users and Groups
          
          
            Before you compile the program, you need to create users and
            groups that will be expected to be in place during the
            installation. Add the users and groups with the following
            commands issued by the root user:
          
          groupadd -g 32 postfix &&
groupadd -g 33 postdrop &&
useradd -c "Postfix Daemon User" -d /var/spool/postfix -g postfix \
        -s /bin/false -u 32 postfix &&
chown -v postfix:postfix /var/mail
         
        
          
          
            Configuring the Build
          
          
            The README files are formatted to be read with a pager like
            Less or More. If you want to use a text editor, make
            them legible with the following sed:
          
          sed -i 's/.\x08//g' README_FILES/*
          
            The Makefile looks at the running
            kernel to decide how to set various things. It does not recognize
            Linux-6 and fails to make the definitions. After that is fixed,
            the build references the newly defined version in a header, which
            also breaks the build. Fix both of these with the following
            commands:
          
          sed -i 's/Linux..345/&6/' makedefs &&
sed -i 's/LINUX2/LINUX6/' src/util/sys_defs.h
          
            The Postfix source tree does not
            contain a configure script, rather
            the makefile in the top-level directory contains a makefiles target that regenerates all the other
            makefiles in the build tree. If you wish to use additional
            software such as a database back-end for virtual users, or
            TLS/SSL authentication, you will need to regenerate the makefiles
            using one or more of the appropriate CCARGS and AUXLIBS
            settings listed below.
          
          
            
            
              Note
            
            
              For all variants of the CCARGS you should ensure that -DNO_NIS
              is specified so that the build does not attempt to access an
              rpcsvc header which does not exist in BLFS.
            
           
          
            For more details read the readme files.
          
          
            
            
              To use Cyrus-SASL with
              Postfix, use the following
              arguments:
            
            CCARGS='-DNO_NIS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl'
AUXLIBS='-lsasl2'
           
          
            
            
              To use OpenLDAP with
              Postfix, use the following
              arguments:
            
            CCARGS='-DNO_NIS -DHAS_LDAP'
AUXLIBS='-lldap -llber'
           
          
            
            
              To use Sqlite with
              Postfix, use the following
              arguments:
            
            CCARGS='-DNO_NIS -DHAS_SQLITE'
AUXLIBS='-lsqlite3 -lpthread'
           
          
            
            
              To use MySQL with Postfix, use the following arguments:
            
            CCARGS='-DNO_NIS -DHAS_MYSQL -I/usr/include/mysql'
AUXLIBS='-lmysqlclient -lz -lm'
           
          
            
            
              To use PostgreSQL with
              Postfix, use the following
              arguments:
            
            CCARGS='-DNO_NIS -DHAS_PGSQL -I/usr/include/postgresql'
AUXLIBS='-lpq -lz -lm'
           
          
            
            
              To use CDB or TinyCDB with Postfix, use the following arguments:
            
            CCARGS='-DNO_NIS -DHAS_CDB'
AUXLIBS='</path/to/CDB>/libcdb.a'
           
          
            
            
              To use OpenSSL with
              Postfix, use the following
              arguments:
            
            CCARGS='-DNO_NIS -DUSE_TLS -I/usr/include/openssl/'
AUXLIBS='-lssl -lcrypto'
           
         
        
          
          
            Installing Postfix
          
          
            Adjust the following according to your needs. For example, if you
            have Cyrus SASL, install
            Postfix by running the following
            commands:
          
          make CCARGS="-DNO_NIS -DUSE_TLS -I/usr/include/openssl/            \
             -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" \
     AUXLIBS="-lssl -lcrypto -lsasl2"                              \
     makefiles &&
make
          
            This package does not come with a useful test suite.
          
          
            Now, as the root user:
          
          sh postfix-install -non-interactive \
   daemon_directory=/usr/lib/postfix \
   manpage_directory=/usr/share/man \
   html_directory=/usr/share/doc/postfix-3.7.4/html \
   readme_directory=/usr/share/doc/postfix-3.7.4/readme