Sendmail: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
(Created page with "=Compile sendmail= ==Solaris 10== Untar source, then go into the source directory. ===devtools/Site/site.config.m4=== <source lang=m4> dnl ###################################...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


===devtools/Site/site.config.m4===
===devtools/Site/site.config.m4===
<source lang=m4>
<syntaxhighlight lang=m4>
dnl #####################################################################
dnl #####################################################################
dnl ### Changes to disable the default NIS support                    ###
dnl ### Changes to disable the default NIS support                    ###
Line 52: Line 52:
define(`confMBINDIR', `/opt/sendmail-8.16.1/sbin')
define(`confMBINDIR', `/opt/sendmail-8.16.1/sbin')
define(`confUBINDIR', `/opt/sendmail-8.16.1/bin')
define(`confUBINDIR', `/opt/sendmail-8.16.1/bin')
</source>
</syntaxhighlight>
<source lang=bash>
<syntaxhighlight lang=bash>
# sh ./Build -c
# sh ./Build -c
# cd cf/cf
# cd cf/cf
Line 60: Line 60:
# sh ./Build install-cf
# sh ./Build install-cf
# mkdir -p /opt/sendmail-8.16.1/{bin,share/man/cat{1,5,8}} ; ./Build install ;  
# mkdir -p /opt/sendmail-8.16.1/{bin,share/man/cat{1,5,8}} ; ./Build install ;  
</source>
</syntaxhighlight>
 
== Using the original Solaris 10 svc to sart your own sendmail ==
 
If you have set config/local_only=true at the parameters of svc:/network/smtp:sendmail the service will fail with:
Invalid operation mode l
 
This is because the start script will result in calling sendmail with the option "-bl" when config/local_only=true is set.
So put this in your sendmail.mc instead:
  DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
and set config/local_only=false:
<syntaxhighlight lang=bash>
# svccfg -s svc:/network/smtp:sendmail setprop config/local_only=false
# svcadm refresh svc:/network/smtp:sendmail
</syntaxhighlight>
After that senmail might come up :-).

Latest revision as of 17:01, 25 November 2021

Compile sendmail

Solaris 10

Untar source, then go into the source directory.

devtools/Site/site.config.m4

dnl #####################################################################
dnl ### Changes to disable the default NIS support                    ###
dnl #####################################################################
APPENDDEF(`confENVDEF', `-UNIS')

dnl #####################################################################
dnl ### Changes for PH_MAP support.                                   ###
dnl #####################################################################
APPENDDEF(`confMAPDEF',`-DPH_MAP')
APPENDDEF(`confLIBS', `-lphclient')
APPENDDEF(`confINCDIRS', `-I/opt/nph/include')
APPENDDEF(`confLIBDIRS', `-L/opt/nph/lib')


dnl #####################################################################
dnl ### Changes for STARTTLS support                                  ###
dnl #####################################################################
APPENDDEF(`confENVDEF',`-DSTARTTLS')
APPENDDEF(`confLIBS', `-lssl -lcrypto')
APPENDDEF(`confLIBDIRS', `-L/opt/openssl/lib -R/opt/openssl/lib')
APPENDDEF(`confINCDIRS', `-I/opt/openssl/include')


dnl #####################################################################
dnl ### GCC settings                                                  ###
dnl #####################################################################
define(`confCC', `gcc')
define(`confOPTIMIZE', `-O3')
define(`confCCOPTS', `-m64 -B/usr/ccs/bin/amd64') 
define(`confLDOPTS', `-m64 -static-libgcc -lgcc_s_amd64')
APPENDDEF(`confENVDEF', `-DSM_CONF_STDBOOL_H=0')
APPENDDEF(`confLIBDIRS', `-L/lib/64 -R/lib/64 -L/usr/sfw/lib/amd64 -R/usr/sfw/lib/amd64')


dnl #####################################################################
dnl ### Use the more modern shell                                     ###
dnl #####################################################################
define(`confSHELL', `/usr/bin/bash')

dnl #####################################################################
dnl ### Installdirs                                                   ###
dnl #####################################################################
define(`confMANROOT', `/opt/sendmail-8.16.1/share/man/cat')
define(`confMANROOTMAN', `/opt/sendmail-8.16.1/share/man/man')

define(`confMBINDIR', `/opt/sendmail-8.16.1/sbin')
define(`confUBINDIR', `/opt/sendmail-8.16.1/bin')
# sh ./Build -c
# cd cf/cf
# cp generic-solaris.mc sendmail.mc
# sh ./Build sendmail.cf
# sh ./Build install-cf
# mkdir -p /opt/sendmail-8.16.1/{bin,share/man/cat{1,5,8}} ; ./Build install ;

Using the original Solaris 10 svc to sart your own sendmail

If you have set config/local_only=true at the parameters of svc:/network/smtp:sendmail the service will fail with:

Invalid operation mode l

This is because the start script will result in calling sendmail with the option "-bl" when config/local_only=true is set. So put this in your sendmail.mc instead:

 DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

and set config/local_only=false:

# svccfg -s svc:/network/smtp:sendmail setprop config/local_only=false
# svcadm refresh svc:/network/smtp:sendmail

After that senmail might come up :-).