OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../sendmail/sendmail.conf
  5. # Copyright (C) 2012 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. sm_appenddef() {
  17. printf "APPENDDEF(\`${1}\', \`${2}\')\n" >> ../devtools/Site/site.config.m4
  18. }
  19. sm_main() {
  20. #
  21. # Copy configs
  22. #
  23. echo "Copy sendmail config files ..."
  24. cd $confdir
  25. rm -rf $root/etc/mail; mkdir -p $root/etc/mail
  26. cp Makefile aliases local-host-names $root/etc/mail/
  27. ln -sf mail/sendmail.cf $root/etc/sendmail.cf
  28. echo "Copy sendmail cf files ..."
  29. cd $builddir/$xsrcdir/cf; cp -r * /etc/mail
  30. cp cf/generic-linux.mc /etc/mail/sendmail.mc
  31. #
  32. # Compile and install
  33. #
  34. cp $confdir/site.config.m4 ../devtools/Site/
  35. # IPv6 support by default
  36. sm_appenddef "confENVDEF" "-DNETINET6=1"
  37. # SASL2 (smtp authentication)
  38. if pkginstalled -f cyrus-sasl2; then
  39. sm_appenddef "confENVDEF" "-DSASL=2"
  40. sm_appenddef "confLIBS" "-lsasl2"
  41. sm_appenddef "confLIBDIR" "-L$( pkgprefix -r libdir cyrus-sasl2 )"
  42. sm_appenddef "confINCDIR" "-L$( pkgprefix -r includedir cyrus-sasl2 )"
  43. fi
  44. # STARTTLS (smtp + tls/ssl)
  45. if pkginstalled -f openssl; then
  46. sm_appenddef "confENVDEF" "-DSTARTTLS"
  47. sm_appenddef "confLIBS" "-lssl -lcrypto"
  48. sm_appenddef "confLIBDIR" "-L$( pkgprefix -r libdir openssl )"
  49. sm_appenddef "confINCDIR" "-L$( pkgprefix -r includedir openssl )"
  50. fi
  51. # LDAP support
  52. if pkginstalled -f openldap; then
  53. sm_appenddef "confENVDEF" "-DLDAPMAP"
  54. # enable support for ldap referrals
  55. sm_appenddef "confENVDEF" "-DLDAP_REFERRALS"
  56. sm_appenddef "confLIBS" "-lldap -llber"
  57. sm_appenddef "confLIBDIR" "-L$( pkgprefix -r libdir openldap )"
  58. sm_appenddef "confINCDIR" "-L$( pkgprefix -r includedir openldap )"
  59. fi
  60. cd ..; ./Build; ./Build install
  61. install_setmailer sendmail
  62. }
  63. custmain="sm_main"