postgrey.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ##
  2. ## postgrey.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: postgrey
  27. Summary: Postfix Greylisting Daemon
  28. URL: http://isg.ee.ethz.ch/tools/postgrey/
  29. Vendor: David Schweikert
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Mail
  34. License: GPL
  35. Version: 1.2
  36. Release: 20040521
  37. # list of sources
  38. Source0: http://isg.ee.ethz.ch/tools/postgrey/pub/postgrey-%{version}.tar.gz
  39. Source1: rc.postgrey
  40. Patch0: postgrey.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. BuildPreReq: perl
  47. PreReq: perl, perl-sys, perl-net, perl-db
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Postgrey is a Postfix MTA policy server implementing Greylisting.
  52. Greylisting is related to Whitelisting and Blacklisting. What
  53. happen is that each time a given mailbox receives an email from
  54. an unknown contact (ip), that mail is rejected with a "try again
  55. later"-message. This, in the short run, means that all mail gets
  56. delayed atleast until the sender tries again - but this is where
  57. spam looses out! Most spam is not sent out using RFC compliant MTAs;
  58. the spamming software will not try again later.
  59. %track
  60. prog postgrey = {
  61. version = %{version}
  62. url = http://isg.ee.ethz.ch/tools/postgrey/pub/
  63. regex = postgrey-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q
  67. %patch -p0
  68. %build
  69. # build manual page
  70. pod2man postgrey >postgrey.8
  71. # build empty recipient list
  72. echo "" >postgrey_recipient_access
  73. %install
  74. # create installation hierarchy
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  78. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  79. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  80. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey \
  81. $RPM_BUILD_ROOT%{l_prefix}/var/postgrey
  82. # install program and manual page
  83. %{l_shtool} install -c -m 755 \
  84. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;g' \
  85. postgrey $RPM_BUILD_ROOT%{l_prefix}/sbin/
  86. %{l_shtool} install -c -m 644 \
  87. postgrey.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  88. # install configuration files
  89. %{l_shtool} install -c -m 644 \
  90. postgrey_client_access \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  92. %{l_shtool} install -c -m 644 \
  93. postgrey_recipient_access \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/postgrey/
  95. # install run-command script
  96. %{l_shtool} mkdir -f -p -m 755 \
  97. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  98. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  99. %{SOURCE rc.postgrey} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  100. # determine installation files
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  102. %{l_files_std} \
  103. '%config %{l_prefix}/etc/postgrey/*' \
  104. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/postgrey'
  105. %files -f files
  106. %clean
  107. rm -rf $RPM_BUILD_ROOT