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: GPL v1+ or Artistic
14 Group: Applications/Mail
15 Source0: http://spamassassin.org/released/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: e0cf85b038d85bb83083ee474763ed3c
17 Source1: %{name}.sysconfig
18 Patch0: %{name}-rc-script.patch
19 URL: http://spamassassin.org/
20 BuildRequires: openssl-devel >= 0.9.6k
21 BuildRequires: perl-devel >= 5.6
23 BuildRequires: perl-HTML-Parser >= 3
24 # are these really needed?
25 BuildRequires: perl-MailTools
26 BuildRequires: perl-Mail-Audit
27 BuildRequires: perl-MIME-Base64
28 BuildRequires: perl-MIME-tools
30 BuildRequires: rpm-perlprov >= 4.0.2-104
31 Prereq: /sbin/chkconfig
32 Requires: perl-Mail-SpamAssassin >= %{version}
33 Obsoletes: SpamAssassin
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
39 SpamAssassin provides you with a way to reduce if not completely
40 eliminate Unsolicited Commercial Email (SPAM) from your incoming
41 email. It can be invoked by a MDA such as sendmail or postfix, or can
42 be called from a procmail script, .forward file, etc. It uses a
43 genetic-algorithm evolved scoring system to identify messages which
44 look spammy, then adds headers to the message so they can be filtered
45 by the user's mail reading software. This distribution includes the
46 spamd/spamc components which create a server that considerably speeds
50 SpamAssassin udostêpnia Ci mo¿liwo¶æ zredukowania, je¶li nie
51 kompletnego wyeliminowania Niezamawianej Komercyjnej Poczty
52 (Unsolicited Commercial Email, spamu) z Twojej poczty. Mo¿e byæ
53 wywo³ywany z MDA, np. Sendmaila czy Postfixa, lub z pliku ~/.forward
54 itp. U¿ywa ogólnego algorytmu oceniania w celu identyfikacji
55 wiadomo¶ci, które wygl±daj± na SPAM, po czym dodaje nag³ówki do
56 wiadomo¶ci, umo¿liwiaj±c filtrowanie przez oprogramowanie u¿ytkownika.
57 Ta dystrybucja zawiera programy spamd/spamc, umo¿liwiaj±ce
58 uruchomienie serwera, co znacznie przyspieszy proces przetwarzania
62 Summary: Miscleanous tools for SpamAssassin
63 Summary(pl): Przeró¿ne narzêdzia zwi±zane z SpamAssassin
64 Group: Applications/Mail
65 Obsoletes: SpamAssassin-tools
68 Miscleanous tools from various authors, distributed with SpamAssassin.
69 See /usr/share/doc/spamassassin-tools-*/.
71 %description tools -l pl
72 Przeró¿ne narzêdzia, dystrybuowane razem z SpamAssassin. Zobacz
73 /usr/share/doc/spamassassin-tools-*/.
76 Summary: spamd - daemonized version of spamassassin
77 Summary(pl): spamd - spamassassin w postaci demona
78 Group: Applications/Mail
81 The purpose of this program is to provide a daemonized version of the
82 spamassassin executable. The goal is improving throughput performance
83 for automated mail checking.
85 This is intended to be used alongside "spamc", a fast, low-overhead C
88 %description spamd -l pl
89 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
90 poprawa wydajno¶ci automatycznego sprawdzania poczty.
92 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
93 wydajnym programem klienckim.
96 Summary: spamc - client for spamd
97 Summary(pl): spamc - klient dla spamd
98 Group: Applications/Mail
101 Spamc is the client half of the spamc/spamd pair. It should be used in
102 place of "spamassassin" in scripts to process mail. It will read the
103 mail from STDIN, and spool it to its connection to spamd, then read
104 the result back and print it to STDOUT. Spamc has extremely low
105 overhead in loading, so it should be much faster to load than the
106 whole spamassassin program.
108 %description spamc -l pl
109 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
110 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
111 nastêpnie przekazuje spamd'owi, odczytuje wynik i podaje go na STDOUT.
112 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
113 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
115 %package -n perl-Mail-SpamAssassin
116 Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
117 Summary(pl): Mail::SpamAssassin - biblioteki filtru poczty SpamAssassin
118 Group: Development/Languages/Perl
119 Requires: perl-HTML-Parser >= 3
121 %description -n perl-Mail-SpamAssassin
122 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
123 analysis and several internet-based realtime blacklists. Using its
124 rule base, it uses a wide range of heuristic tests on mail headers and
125 body text to identify ``spam'', also known as unsolicited commercial
126 email. Once identified, the mail can then be optionally tagged as spam
127 for later filtering using the user's own mail user-agent application.
129 %description -n perl-Mail-SpamAssassin -l pl
130 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
131 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
132 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
133 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
134 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
135 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
136 aplikacji do czytania poczty.
139 %setup -q -n %{pdir}-%{pnam}-%{version}
143 echo "postmaster@localhost" | \
144 %{__perl} Makefile.PL \
146 SYSCONFDIR=%{_sysconfdir} \
149 %{__make} OPTIMIZE="%{rpmcflags}"
151 %{?with_tests:%{__make} test}
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
158 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
159 SYSCONFDIR=$RPM_BUILD_ROOT/etc/mail/spamassassin \
160 INSTALLMAN1DIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
161 INSTALLMAN3DIR=$RPM_BUILD_ROOT%{_mandir}/man3
163 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/spamassassin
165 install rules/local.cf $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
167 # shouldn't this script be called `spamd' instead?
168 install spamd/pld-rc-script.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
170 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
173 /sbin/chkconfig --add spamassassin
174 if [ -f /var/lock/subsys/spamassassin ]; then
175 /etc/rc.d/init.d/spamassassin restart 1>&2
177 echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
181 if [ "$1" = "0" ]; then
182 if [ -f /var/lock/subsys/spamassassin ]; then
183 /etc/rc.d/init.d/spamassassin stop 1>&2
185 /sbin/chkconfig --del spamassassin
189 rm -rf $RPM_BUILD_ROOT
192 %defattr(644,root,root,755)
193 %doc BUGS Changes COPYRIGHT INSTALL README TRADEMARK USAGE
194 %doc procmailrc.example
195 %attr(755,root,root) %{_bindir}/sa-learn
196 %attr(755,root,root) %{_bindir}/spamassassin
197 %{_mandir}/man1/sa-learn*
198 %{_mandir}/man1/spamassassin*
201 %defattr(644,root,root,755)
202 %doc sql tools masses contrib
205 %defattr(644,root,root,755)
207 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
208 %attr(600,root,root) %config(noreplace) /etc/sysconfig/spamassassin
209 %attr(755,root,root) %{_bindir}/spamd
210 %{_mandir}/man1/spamd*
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_bindir}/spamc
215 %{_mandir}/man1/spamc*
217 %files -n perl-Mail-SpamAssassin
218 %defattr(644,root,root,755)
219 %doc sample-nonspam.txt sample-spam.txt
220 %dir %{_sysconfdir}/mail/spamassassin
221 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
222 %dir %{_datadir}/spamassassin
223 %config(noreplace) %{_datadir}/spamassassin/*
224 %{perl_sitelib}/Mail/*