3 %bcond_with tests # perform "make test"
4 %bcond_without prefork # don't apply prefork patch inspired by apache
6 %include /usr/lib/rpm/macros.perl
8 %define pnam SpamAssassin
9 Summary: A spam filter for email which can be invoked from mail delivery agents
10 Summary(pl): Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
14 License: Apache Software License v2
15 Group: Applications/Mail
16 Source0: http://www.apache.org/dist/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
17 # Source0-md5: ba6e1bd95f6f9f3882f73212a11dbe46
18 Source1: %{name}.sysconfig
19 Source2: %{name}-spamd.init
20 Patch0: %{name}-prefork.patch
21 Patch1: %{name}-utf8_mode.patch
22 URL: http://spamassassin.apache.org/
23 BuildRequires: openssl-devel >= 0.9.7d
24 BuildRequires: perl-devel >= 1:5.8.0
25 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
26 BuildRequires: perl-Digest-SHA1 >= 2.10
27 BuildRequires: perl-HTML-Parser >= 3
29 # are these really needed?
30 BuildRequires: perl-MailTools
31 BuildRequires: perl-MIME-Base64
32 BuildRequires: perl-MIME-tools
34 BuildRequires: rpm-perlprov >= 4.1-13
35 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
36 Obsoletes: SpamAssassin
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
42 SpamAssassin provides you with a way to reduce if not completely
43 eliminate Unsolicited Commercial Email (SPAM) from your incoming
44 email. It can be invoked by a MDA such as sendmail or postfix, or can
45 be called from a procmail script, .forward file, etc. It uses a
46 genetic-algorithm evolved scoring system to identify messages which
47 look spammy, then adds headers to the message so they can be filtered
48 by the user's mail reading software. This distribution includes the
49 spamd/spamc components which create a server that considerably speeds
53 SpamAssassin daje mo¿liwo¶æ zredukowania, je¶li nie kompletnego
54 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
55 Commercial Email, spamu) z poczty. Mo¿e byæ wywo³ywany z MDA, np.
56 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. U¿ywa ogólnego
57 algorytmu oceniania w celu identyfikacji wiadomo¶ci, które wygl±daj±
58 na SPAM, po czym dodaje nag³ówki do wiadomo¶ci, umo¿liwiaj±c
59 filtrowanie przez oprogramowanie u¿ytkownika. Ta dystrybucja zawiera
60 programy spamd/spamc, umo¿liwiaj±ce uruchomienie serwera, co znacznie
61 przyspieszy proces przetwarzania poczty.
64 Summary: Miscleanous tools for SpamAssassin
65 Summary(pl): Przeró¿ne narzêdzia zwi±zane z SpamAssassin
66 Group: Applications/Mail
67 Obsoletes: SpamAssassin-tools
70 Miscleanous tools from various authors, distributed with SpamAssassin.
71 See /usr/share/doc/spamassassin-tools-*/.
73 %description tools -l pl
74 Przeró¿ne narzêdzia, dystrybuowane razem ze SpamAssassinem. Wiêcej
75 informacji w /usr/share/doc/spamassassin-tools-*/.
78 Summary: spamd - daemonized version of spamassassin
79 Summary(pl): spamd - spamassassin w postaci demona
80 Group: Applications/Mail
82 Requires(post,preun): /sbin/chkconfig
83 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
86 The purpose of this program is to provide a daemonized version of the
87 spamassassin executable. The goal is improving throughput performance
88 for automated mail checking.
90 This is intended to be used alongside "spamc", a fast, low-overhead C
93 %description spamd -l pl
94 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
95 poprawa wydajno¶ci automatycznego sprawdzania poczty.
97 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
98 wydajnym programem klienckim.
101 Summary: spamc - client for spamd
102 Summary(pl): spamc - klient dla spamd
103 Group: Applications/Mail
106 Spamc is the client half of the spamc/spamd pair. It should be used in
107 place of "spamassassin" in scripts to process mail. It will read the
108 mail from STDIN, and spool it to its connection to spamd, then read
109 the result back and print it to STDOUT. Spamc has extremely low
110 overhead in loading, so it should be much faster to load than the
111 whole spamassassin program.
113 %description spamc -l pl
114 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
115 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
116 nastêpnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
117 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
118 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
120 %package -n perl-Mail-SpamAssassin
121 Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
122 Summary(pl): Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
123 Group: Development/Languages/Perl
124 Requires: perl-HTML-Parser >= 3
125 Requires: perl-Cache-DB_File >= 0.2
127 %description -n perl-Mail-SpamAssassin
128 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
129 analysis and several internet-based realtime blacklists. Using its
130 rule base, it uses a wide range of heuristic tests on mail headers and
131 body text to identify ``spam'', also known as unsolicited commercial
132 email. Once identified, the mail can then be optionally tagged as spam
133 for later filtering using the user's own mail user-agent application.
135 %description -n perl-Mail-SpamAssassin -l pl
136 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
137 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
138 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
139 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
140 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
141 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
142 aplikacji do czytania poczty.
145 %setup -q -n %{pdir}-%{pnam}-%{version}
146 %{?with_prefork:%patch0 -p0}
150 echo "postmaster@localhost" | \
151 %{__perl} Makefile.PL \
154 SYSCONFDIR=%{_sysconfdir} \
160 OPTIMIZE="%{rpmcflags}"
162 %{?with_tests:%{__make} test}
165 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
169 DESTDIR=$RPM_BUILD_ROOT
171 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamassassin
173 # shouldn't this script be called `spamd' instead?
174 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
176 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
179 rm -rf $RPM_BUILD_ROOT
182 /sbin/chkconfig --add spamassassin
183 if [ -f /var/lock/subsys/spamd ]; then
184 /etc/rc.d/init.d/spamassassin restart 1>&2
186 echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
190 if [ "$1" = "0" ]; then
191 if [ -f /var/lock/subsys/spamd ]; then
192 /etc/rc.d/init.d/spamassassin stop 1>&2
194 /sbin/chkconfig --del spamassassin
198 %defattr(644,root,root,755)
199 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
200 %doc procmailrc.example sample*.txt
201 %attr(755,root,root) %{_bindir}/sa-learn
202 %attr(755,root,root) %{_bindir}/spamassassin
203 %{_mandir}/man1/sa-learn*
204 %{_mandir}/man1/spamassassin*
207 %defattr(644,root,root,755)
208 %doc sql tools masses contrib
211 %defattr(644,root,root,755)
213 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
214 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamassassin
215 %attr(755,root,root) %{_bindir}/spamd
216 %{_mandir}/man1/spamd*
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_bindir}/spamc
221 %{_mandir}/man1/spamc*
223 %files -n perl-Mail-SpamAssassin
224 %defattr(644,root,root,755)
225 %doc sample-nonspam.txt sample-spam.txt
226 %dir %{_sysconfdir}/mail/spamassassin
227 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
228 %dir %{_datadir}/spamassassin
229 %config(noreplace) %{_datadir}/spamassassin/*
230 %{perl_vendorlib}/Mail/*