Sendmail: Difference between revisions
m (Text replacement - "</source" to "</syntaxhighlight") |
|||
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') | ||
</ | </syntaxhighlight> | ||
<source lang=bash> | <source lang=bash> | ||
# sh ./Build -c | # sh ./Build -c | ||
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 ; | ||
</ | </syntaxhighlight> | ||
== Using the original Solaris 10 svc to sart your own sendmail == | == Using the original Solaris 10 svc to sart your own sendmail == | ||
Line 74: | Line 74: | ||
# svccfg -s svc:/network/smtp:sendmail setprop config/local_only=false | # svccfg -s svc:/network/smtp:sendmail setprop config/local_only=false | ||
# svcadm refresh svc:/network/smtp:sendmail | # svcadm refresh svc:/network/smtp:sendmail | ||
</ | </syntaxhighlight> | ||
After that senmail might come up :-). | After that senmail might come up :-). |
Revision as of 15:22, 25 November 2021
Compile sendmail
Solaris 10
Untar source, then go into the source directory.
devtools/Site/site.config.m4
<source lang=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') </syntaxhighlight> <source lang=bash>
- 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 ;
</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: <source 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 :-).