The Sendmail package contains a Mail Transport Agent (MTA).
Download (HTTP): http://www.sendmail.org/ftp/sendmail.8.13.6.tar.gz
Download (FTP): ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.13.6.tar.gz
Download MD5 sum: 484cca51f74b5e562b3cf119ceb2f900
Download size: 1.9 MB
Estimated disk space required: 19.8 MB
Estimated build time: 0.5 SBU
OpenSSL-0.9.8d, OpenLDAP-2.3.27, TCP Wrapper-7.6, Cyrus SASL-2.1.21, nph, and AFPL Ghostscript-8.53 or ESP Ghostscript-8.15.2 (for creating PDF documentation)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sendmail
Before building Sendmail, create the required user, group and directory with the following commands issued as the root user:
groupadd -g 26 smmsp && useradd -c "Sendmail Daemon" -g smmsp -d /dev/null \ -s /bin/false -u 26 smmsp && chmod -v 1777 /var/mail && install -v -m700 -d /var/spool/mqueue
Note: See the source tree sendmail/README file for information on linking optional packages into the build. Use the example below, which adds support for tcpwrappers, SASL, StartTLS (OpenSSL) and OpenLDAP, as a starting point. Of course, modify it to suit your particular needs.
cat >> devtools/Site/site.config.m4 << "EOF" APPENDDEF(`confENVDEF',`-DSTARTTLS -DTCPWRAPPERS -DSASL -DLDAPMAP') APPENDDEF(`confLIBS', `-lssl -lcrypto -lwrap -lsasl2 -lldap -llber') APPENDDEF(`confINCDIRS', `-I/usr/include/sasl') EOF
Install Sendmail with the following commands:
cat >> devtools/Site/site.config.m4 << "EOF" define(`confMANGRP',`root') define(`confMANOWN',`root') define(`confSBINGRP',`root') define(`confUBINGRP',`root') define(`confUBINOWN',`root') EOF cd sendmail && sh Build && cd ../cf/cf && cp generic-linux.mc sendmail.mc && sh Build sendmail.cf
Now, as the root user:
install -v -d -m755 /etc/mail && sh Build install-cf && cd ../.. && sh Build install && install -v -m644 cf/cf/{submit,sendmail}.mc /etc/mail && cp -v -R cf/* /etc/mail && install -v -m755 -d /usr/share/doc/sendmail-8.13.6/{cf,sendmail} && install -v -m644 \ CACerts FAQ KNOWNBUGS LICENSE PGPKEYS README RELEASE_NOTES \ /usr/share/doc/sendmail-8.13.6 && install -v -m644 sendmail/{README,SECURITY,TRACEFLAGS,TUNING} \ /usr/share/doc/sendmail-8.13.6/sendmail && install -v -m644 cf/README /usr/share/doc/sendmail-8.13.6/cf && for manpage in sendmail editmap mailstats makemap praliases smrsh do install -v -m444 $manpage/$manpage.8 /usr/share/man/man8 done && install -v -m444 sendmail/aliases.5 /usr/share/man/man5 && install -v -m444 sendmail/mailq.1 /usr/share/man/man1 && install -v -m444 sendmail/newaliases.1 /usr/share/man/man1 && install -v -m444 vacation/vacation.1 /usr/share/man/man1
Install the Sendmail Installation and Operations Guide with the following commands:
cd doc/op && sed -i 's/groff/GROFF_NO_SGR=1 groff/' Makefile && make op.txt op.pdf
Now, as the root user:
install -v -d -m755 /usr/share/doc/sendmail-8.13.6 && install -v -m644 op.ps op.txt op.pdf /usr/share/doc/sendmail-8.13.6 && cd ../..
Note: remove op.pdf from the make and install commands if you don't have Ghostscript installed.
cat > devtools/Site/site.config.m4 << "EOF": This creates a configuration file changing some of the default settings.
sh Build; sh Build sendmail.cf; sh Build install-cf; sh Build install: Sendmail uses an m4 based build script to create the various Makefiles. These commands build and install the package.
for manpage in...;do...;done; install ...: The man pages are installed already formatted and man displays them somewhat garbled. These commands replace the formatted pages with pages man can display properly.
Create the /etc/mail/local-host-names and /etc/mail/aliases files using the following commands as the root user:
echo $(hostname) > /etc/mail/local-host-names cat > /etc/mail/aliases << "EOF" postmaster: root MAILER-DAEMON: root EOF newaliases -v
Sendmail's primary configuration file, /etc/mail/sendmail.cf, is complex and not meant to be directly edited. The recommended method for changing it is to modify /etc/mail/sendmail.mc and various m4 files, then run the m4 macro processor from within /etc/mail as follows:
m4 m4/cf.m4 sendmail.mc > sendmail.cf
A full explanation of the files to modify, and the available parameters can be found in /etc/mail/README.
To automate the running of Sendmail at startup, install the /etc/rc.d/init.d/sendmail init script included in the blfs-bootscripts-20060910 package.
make install-sendmail
The -qNm option to sendmail, where N is number of minutes, controls how often Sendmail will process the mail queue. A default of 5 minutes is used in the init script. Individual workstation users may want to set this as low as 1 minute, large installations handling more mail may want to set it higher.
Last updated on 2006-06-21 11:26:07 -0500