]> git.pld-linux.org Git - packages/dcc-dccd.git/blob - dcc-dccd.spec
- almost raw
[packages/dcc-dccd.git] / dcc-dccd.spec
1 Summary:        Distributed Checksum Clearinghouse, anti-spam tool
2 Summary(pl):    Narzêdzie anty-spamowe bazuj±ce na sumach kontrolnych (DCC)
3 Name:           dcc-dccd
4 Version:        1.1.13
5 Release:        1
6 License:        BSD-like
7 Group:          Networking
8 Source0:        http://www.dcc-servers.net/dcc/source/%{name}-%{version}.tar.Z
9 URL:            http://www.dcc-servers.net/
10 Prereq:         /sbin/chkconfig
11 Prereq:         /usr/sbin/useradd
12 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description
15 Distributed Checksum Clearinghouse or DCC is a cooperative,
16 distributed system intended to detect "bulk" mail or mail sent to many
17 people. It allows individuals receiving a single mail message to
18 determine that many other people have been sent essentially identical
19 copies of the message and so reject the message. It can identify some
20 unsolicited bulk mail using "spam traps" and other detectors, but that
21 is not its focus.
22
23 The DCC can be viewed as a tool for end users to enforce their right
24 to "opt-in" to streams of bulk mail by refusing all bulk mail except
25 from sources in a "white list." White lists are generally the
26 responsibility of DCC clients, since only they know which bulk mail
27 they solicited.
28
29 NB to use DCC to reject SPAM you need to configure /var/dcc/dcc_conf
30 and either use procmail or sendmail to feed the messages to DCC
31
32 %package cgi
33 Summary:        cgi-scripts for managing mail delivery on a DCC enabled server
34 Group:          Networking/Mail
35 ######          Unknown group!
36 Requires:       %{name} >= 1.1.2
37
38 %description cgi
39 Example set of cgi-scripts to allow users to point-and-click manage
40 their own DCC whitelists and thus what is delivered to them. Allows
41 overriding of site level lists. The scripts give controlled access to
42 the whitelists which are otherwise in protected directory space (owned
43 by dcc).
44
45 NB these scripts need configured after installation
46
47 %prep
48 %setup -q
49
50 %build
51 %configure2_13 \
52         --with-uid=99 \
53         --with-cgibin=/home/httpd/html/cgi-bin \
54         --with-rundir=%{_var}/run \
55         --with-db-memory=32
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60
61 %{makeinstall} \
62         MANOWN=$(id -u) \
63         MANGRP=$(id -g) \
64         BINOWN=$(id -u) \
65         BINGRP=$(id -u) \
66         MANDIR=$RPM_BUILD_ROOT%{_mandir} \
67         BINDIR=$RPM_BUILD_ROOT%{_bindir}
68
69
70         DCC_PROTO_HOMEDIR=$RPM_BUILD%{_var}/lib/dcc
71         DCC_CGIBINDIR=$RPM_BUILD_ROOT/var/dcc/cgi-bin export DCC_CGIBINDIR
72 DCC_SUID=$BINOWN DCC_OWN=$BINOWN DCC_GRP=$BINGRP export DCC_SUID DCC_OWN DCC_GRP
73 install -d $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/feature $DCC_CGIBINDIR
74 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{init.d,cron.daily} $RPM_BUILD_ROOT/{var/{run/dcc,dcc/{log,userdirs/{local,esmtp,cyrus,procmail}}},usr/bin}
75 %makeinstall
76 cp misc/dcc.m4 misc/dccdnsbl.m4 $RPM_BUILD_ROOT/usr/share/sendmail-cf/feature
77 mv $RPM_BUILD_ROOT/usr/sbin/cron-dccd $RPM_BUILD_ROOT/etc/cron.daily/dccd
78
79 # There already is a logger program which takes the required arguments on Linux
80
81 rm -f $RPM_BUILD_ROOT/usr/sbin/logger
82
83 # We are putting these in the docs directory
84 rm -f $RPM_BUILD_ROOT/usr/sbin/hackmc
85 rm -f $RPM_BUILD_ROOT/usr/sbin/na-spam
86 rm -f $RPM_BUILD_ROOT/usr/sbin/ng-spam
87
88 mv $RPM_BUILD_ROOT/usr/sbin/rcDCC $RPM_BUILD_ROOT/etc/init.d/dccd
89 chmod 755 $RPM_BUILD_ROOT/etc/init.d/dccd
90
91 # Set some initial logging, but no rejections
92 perl -p -i -e "s/BRAND=\$/BRAND=RPMDEFAULT/ ; s/DCCM_LOG_AT=\$/\$&10/ ; " \
93         $RPM_BUILD_ROOT/var/dcc/dcc_conf
94
95 umask 077
96 cat > $RPM_BUILD_ROOT/var/dcc/flod <<EOF
97 # hostname,port     rem-id [passwd-id] [out-opts] [in-opts]
98
99 # this will not work
100 # nonesuch.example.com,-        32767 100
101 EOF
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %pre
107 /usr/sbin/useradd -d /var/dcc -r dcc >/dev/null 2>&1 || :
108
109 %postun
110 if [ $1 = 0 ]; then
111         /usr/sbin/userdel -r dcc > /dev/null 2>&1 || :
112 fi
113
114 %post
115 /sbin/chkconfig --add dccd || :
116 /sbin/chkconfig --level 016 dccd off || :
117 /usr/bin/cdcc info > /var/lib/dcc/map.txt || :
118
119 %post cgi
120 echo The scripts need configured and added into your web configuration.
121 echo see /var/dcc/cgi-bin/README
122
123
124 %preun
125 if [ $1 = 0 ]; then
126         #
127         # This is remove rather than update
128         #
129         /sbin/chkconfig --del dccd || :
130         /etc/init.d/dccd stop || :
131 fi
132
133 %files
134 %defattr(644,root,root,755)
135
136 %dir    /var/dcc
137 %dir    /var/dcc/log
138 %dir    /var/dcc/userdirs/local
139 %dir    /var/dcc/userdirs/cyrus
140 %dir    /var/dcc/userdirs/procmail
141 %dir    /var/dcc/userdirs/esmtp
142 %dir    /var/run/dcc
143 %doc CHANGES FAQ.html FAQ.txt INSTALL.html INSTALL.txt LICENSE cdcc.html dbclean.html dblist.html dccd.html dcc.html dccm.html dccproc.html dccsight.html homedir/flod homedir/ids homedir/map.txt homedir/README misc/dcc.m4 misc/dccdnsbl.m4 misc/hackmc misc/na-spam misc/ng-spam
144 %config(noreplace)      /var/dcc/dcc_conf
145 %config(noreplace)      /var/dcc/whiteclnt
146 %config(noreplace)      /var/dcc/whitecommon
147 %config(noreplace)      /var/dcc/whitelist
148 %config(noreplace)      /var/dcc/ids
149 %config(noreplace)      /var/dcc/flod
150 %config(noreplace)      /var/dcc/dcc_db
151 %config(noreplace)      /var/dcc/dcc_db.hash
152 %config(noreplace)      /var/dcc/map
153 /var/dcc/map.txt
154 %{_sysconfdir}/init.d/dccd
155 /etc/cron.daily/dccd
156 %attr(755,root,root) %{_bindir}/cdcc
157 %attr(755,root,root) %{_bindir}/dccproc
158 %attr(755,root,root) %{_sbindir}/dbclean
159 %attr(755,root,root) %{_sbindir}/dblist
160 %attr(755,root,root) %{_sbindir}/dccd
161 %attr(755,root,root) %{_sbindir}/dccm
162 %attr(755,root,root) %{_sbindir}/dccsight
163 %attr(755,root,root) %{_sbindir}/refeed
164 %attr(755,root,root) %{_sbindir}/start-dccd
165 %attr(755,root,root) %{_sbindir}/start-dccm
166 %attr(755,root,root) %{_sbindir}/stop-dccd
167 %attr(755,root,root) %{_sbindir}/wlist
168 %{_datadir}/sendmail-cf/feature/dcc.m4
169 %{_datadir}/sendmail-cf/feature/dccdnsbl.m4
170
171 %{_mandir}/man8/*
172
173 %files cgi
174 %defattr(644,root,root,755)
175 %dir    /var/dcc/cgi-bin
176 /var/dcc/cgi-bin/chgpasswd
177 /var/dcc/cgi-bin/common
178 /var/dcc/cgi-bin/edit-whiteclnt
179 /var/dcc/cgi-bin/http2https
180 /var/dcc/cgi-bin/list-log
181 /var/dcc/cgi-bin/list-msg
182 /var/dcc/cgi-bin/README
183 /var/dcc/cgi-bin/webuser-notify
This page took 0.062272 seconds and 3 git commands to generate.