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