]> git.pld-linux.org Git - SPECS.git/blob - smtp-gated.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / smtp-gated.spec
1 Summary:        Spam/malware transparent SMTP proxy blocker
2 Summary(pl.UTF-8):      Transparentne proxy SMTP blokujące spam/wirusy
3 Name:           smtp-gated
4 Version:        1.4.17
5 Release:        3
6 License:        GPL v2
7 Group:          Networking/Daemons/SMTP
8 Source0:        http://smtp-proxy.klolik.org/files/%{name}-%{version}.tar.gz
9 # Source0-md5:  1026f1cc926d4448a1e47e805c78e085
10 Source1:        %{name}.init
11 Source2:        %{name}.conf
12 Source3:        %{name}.tmpfiles
13 URL:            http://smtp-proxy.klolik.org/
14 BuildRequires:  autoconf
15 BuildRequires:  automake
16 BuildRequires:  libspf2-devel
17 Requires(post,preun):   /sbin/chkconfig
18 Requires(postun):       /usr/sbin/userdel
19 Requires(pre):  /bin/id
20 Requires(pre):  /usr/sbin/useradd
21 Requires:       clamav
22 #Requires:      kernel(netfilter)
23 Provides:       user(smtpgw)
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 This software block SMTP sessions used by e-mail worms and viruses on
28 the NA(P)T router. It depends on netfilter framework of Linux.
29
30 It acts like proxy, intercepting outgoing SMTP connections and
31 scanning session data on-the-fly. When messages is infected, the SMTP
32 session is terminated. It's to be used (mostly) by ISPs, so they can
33 eliminate infected hosts from their network, and (preferably) educate
34 their users.
35
36 It's similar to clamsmtp and assp.
37
38 %description -l pl.UTF-8
39 To oprogramowanie blokuje sesje SMTP używane przez robaki i wirusy na
40 poziomie routerów z NA(P)T. Jest zależne od warstwy netfiltra
41 linuksowego kernela.
42
43 Działa jak proxy, przechwytując wychodzący ruch SMTP i skanując dane w
44 locie. Gdy wiadomość jest zainfekowana, sesja zostaje przerwana.
45 Oprogramowanie jest przeznaczone dla ISP, mogą nim wyeliminować
46 zainfekowane komputery ze swoich sieci.
47
48 Pełni podobną funkcję co clamsmtp i assp.
49
50 %prep
51 %setup -q
52
53 %build
54 %{__aclocal}
55 %{__autoconf}
56 %{__autoheader}
57 %{__automake}
58 %configure \
59         --with-lang=pl \
60         --enable-nat \
61         --enable-silent-econnreset \
62         %{?debug:--enable-debugger}
63 %{__make}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},/etc/{rc.d/init.d,sysconfig}} \
68         $RPM_BUILD_ROOT{%{_examplesdir}/%{name}-%{version},/var/spool/%{name}/{lock,msg}} \
69         $RPM_BUILD_ROOT{/var/run/%{name},/usr/lib/tmpfiles.d}
70
71 install src/smtp-gated $RPM_BUILD_ROOT%{_sbindir}
72 install doc/smtp-gated.8 $RPM_BUILD_ROOT%{_mandir}/man8
73 install doc/smtp-gated.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5
74
75 install contrib/{fixed.conf,nat{,-advanced}.conf} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/smtp-gated
78 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
79 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
80
81 :> $RPM_BUILD_ROOT/etc/sysconfig/%{name}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %pre
87 %useradd -u 147 -r -d %{_var}/spool/%{name} -s /bin/false -c "SMTP gateway" -g clamav smtpgw
88
89 %postun
90 if [ "$1" = "0" ]; then
91         %userremove smtpgw
92 fi
93
94 %post
95 /sbin/chkconfig --add %{name}
96 if [ -f /var/lock/subsys/%{name} ]; then
97         /etc/rc.d/init.d/%{name} restart >&2
98 else
99         echo "Type \"/etc/rc.d/init.d/%{name} start\" to start %{name} server"
100 fi
101
102 %preun
103 if [ "$1" = "0" ]; then
104         if [ -f /var/lock/subsys/%{name} ]; then
105                 /etc/rc.d/init.d/%{name} stop >&2
106         fi
107         /sbin/chkconfig --del %{name}
108 fi
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS ChangeLog README README.PL
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
114 %attr(640,root,clamav) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
115 %attr(754,root,root) /etc/rc.d/init.d/%{name}
116 %attr(755,root,root) %{_sbindir}/smtp-gated
117 %{_mandir}/man5/*
118 %{_mandir}/man8/*
119 %{_examplesdir}/%{name}-%{version}
120 /usr/lib/tmpfiles.d/%{name}.conf
121 %attr(750,smtpgw,clamav) /var/run/%{name}
122 %attr(750,smtpgw,clamav) /var/spool/%{name}
This page took 0.269227 seconds and 3 git commands to generate.