Installing Sendmail on Linux
A lot of people have a hard time installing sendmail. I will here give you some hints of how to do this.
1. Create devtools/Site/site.config.m4
This file tells where to install your files.
Optimizing options
In my case I wanted sendmail installed in /opt/sendmail
site.config.m4:
define(`confINCLUDEDIR',`/opt/sendmail/include')
define(`confLIBDIR',`/opt/sendmail/lib')
define(`confMANROOT',`/opt/sendmail/man/man')
define(`confMANROOTMAN',`/opt/sendmail/man/man')
define(`confMBINDIR',`/opt/sendmail/sbin')
define(`confSBINDIR',`/opt/sendmail/sbin')
define(`confSHAREDLIBDIR',`/opt/sendmail/lib')
define(`confUBINDIR',`/opt/sendmail/bin')
define(`confOPTIMIZE',`-march=i686 -O3')
2. Run "sh Build" in root of source
3. Create cf/cf/sendmail.mc (from existing .mc eg generic.linux.mc)
My version includes:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`virtusertable')dnl
FEATURE(`use_ct_file')dnl # Use Trusted Users /etc/mail/trusted-users
FEATURE(`local_procmail',`/usr/local/bin/procmail') # Specify path to procmail (no mail prog is present on this system)
FEATURE(`use_cw_file')dnl # This is for local hostnames /etc/mail/local-host-names
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(fax)dnl # I am trying to setup a mail-fax-gateway here
MAILER(uucp)dnl # Unix to Unix copy (Eg. Sending stuff as a secondary MX)
MAILER(procmail)dnl # Yes procmail-rules may be used
However this would be sufficent:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`virtusertable')dnl
MAILER(local)dnl
MAILER(smtp)dnl
(Dont forget to have an /etc/mail - directory to put these files in)
4. In directory cf/cf run make install-cf
5. Make sure you have a group name smmsp (gid 25 preferrably)
6. Assert directories exist
/opt/sendmail
/opt/sendmail/sbin
/opt/sendmail/bin
/opt/sendmail/man/man{1,5,8}
7. Install
srcroot> make Build install
8. Make symbolic links for the binaries so they appear in the path
ln -s /opt/sendmail/bin/* /usr/local/bin
ln -s /opt/sendmail/sbin/* /usr/local/sbin
9. Add /opt/sendmail/man to your manpath
10. Create / Copy the required files to /etc/mail
(You will get an error message if you do not do this right)
Author Per-Olof Pettersson