1 |
# $Id: qpsmtpd.spec,v 1.22 2009/11/04 15:43:09 filippocarletti Exp $ |
2 |
|
3 |
Name: qpsmtpd |
4 |
Version: 0.83 |
5 |
Release: 0.5%{?dist} |
6 |
Summary: qpsmtpd + qpsmtpd-apache + qpsmtpd-async |
7 |
License: distributable |
8 |
Group: System Environment/Daemons |
9 |
URL: http://smtpd.develooper.com/ |
10 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
11 |
BuildRequires: perl >= 0:5.00503 |
12 |
BuildArchitectures: noarch |
13 |
Requires: perl(Mail::Header), perl(Net::DNS) perl(Net::IP) |
14 |
Requires(pre): coreutils, shadow-utils, perl |
15 |
|
16 |
Source0: %{name}-%{version}.tar.gz |
17 |
Source1: qpsmtpd-forkserver.rc |
18 |
Source2: qpsmtpd-forkserver.sysconfig |
19 |
Source3: qpsmtpd-plugin-file_connection |
20 |
Source4: qpsmtpd-xinetd |
21 |
Source5: in.qpsmtpd |
22 |
Source6: qpsmtpd.conf |
23 |
Source7: README.selinux |
24 |
|
25 |
Patch10: qpsmtpd-0.83-loginit.patch |
26 |
|
27 |
Patch100: qpsmtpd-0.40-badrcptto_allowrelay.patch |
28 |
Patch101: qpsmtpd-0.83-peer_hooks.patch |
29 |
Patch102: qpsmtpd-0.83-clamd_conf.patch |
30 |
Patch103: qpsmtpd-0.83-clamav-headers.patch |
31 |
|
32 |
%description |
33 |
qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core |
34 |
SMTP features, all functionality is implemented in small "extension |
35 |
plugins" using the easy to use object oriented plugin API. |
36 |
|
37 |
qpsmtpd was originally written as a drop-in qmail-smtpd replacement, but |
38 |
now it also includes a smtp forward and a postfix "backend". |
39 |
|
40 |
%package apache |
41 |
Requires: perl(mod_perl2) |
42 |
Summary: mod_perl-2 connection handler for qpsmtpd |
43 |
Group: System Environment/Daemons |
44 |
|
45 |
%package async |
46 |
Summary: qpsmtpd using async I/O in a single process |
47 |
Group: System Environment/Daemons |
48 |
|
49 |
%description apache |
50 |
|
51 |
This module implements a mod_perl/apache 2.0 connection handler |
52 |
that turns Apache into an SMTP server using Qpsmtpd. |
53 |
|
54 |
%description async |
55 |
This package contains the Qpsmtpd::PollServer module, which allows |
56 |
qpsmtd to handle many connections in a single process and the |
57 |
qpsmpd-async which uses it. |
58 |
|
59 |
%prep |
60 |
%setup -q |
61 |
%patch10 -p1 |
62 |
%patch100 -p1 |
63 |
%patch101 -p1 |
64 |
%patch102 -p1 |
65 |
%patch103 -p1 |
66 |
|
67 |
|
68 |
%build |
69 |
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLSITELIB=%{_prefix}/lib/perl5/site_perl |
70 |
make |
71 |
|
72 |
%clean |
73 |
rm -rf $RPM_BUILD_ROOT |
74 |
%install |
75 |
|
76 |
rm -rf $RPM_BUILD_ROOT |
77 |
eval `perl '-V:installarchlib'` |
78 |
mkdir -p $RPM_BUILD_ROOT/$installarchlib |
79 |
if grep -q DESTDIR Makefile |
80 |
then |
81 |
make DESTDIR=$RPM_BUILD_ROOT |
82 |
find blib/lib -name '*.pm.*' -exec rm -f {} \; |
83 |
make DESTDIR=$RPM_BUILD_ROOT install |
84 |
|
85 |
else |
86 |
make PREFIX=$RPM_BUILD_ROOT/usr |
87 |
find blib/lib -name '*.pm.*' -exec rm -f {} \; |
88 |
make PREFIX=$RPM_BUILD_ROOT/usr install |
89 |
fi |
90 |
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} |
91 |
rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins/*.* |
92 |
cp -r plugins ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins |
93 |
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name} |
94 |
rm -f ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/*.* |
95 |
cp -r config.sample/* ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/ |
96 |
echo %{_datadir}/%{name}/plugins > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/plugin_dirs |
97 |
echo %{_localstatedir}/spool/qpsmtpd > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/spool_dir |
98 |
echo logging/file_connection loglevel LOGINFO %{_localstatedir}/log/qpsmtpd/%Y-%m-%d > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/logging |
99 |
mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} |
100 |
cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/qpsmtpd-forkserver |
101 |
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig |
102 |
cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/qpsmtpd-forkserver |
103 |
cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins/logging/file_connection |
104 |
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/spool/qpsmtpd |
105 |
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/qpsmtpd |
106 |
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d |
107 |
cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/smtp |
108 |
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} |
109 |
cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sbindir}/in.smtp |
110 |
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d |
111 |
cp %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d |
112 |
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-apache-%{version} |
113 |
cp %{SOURCE7} $RPM_BUILD_ROOT%{_docdir}/%{name}-apache-%{version} |
114 |
rm -f ${RPM_BUILD_ROOT}%{_bindir}/%{name}-prefork |
115 |
|
116 |
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
117 |
|
118 |
find ${RPM_BUILD_ROOT}%{_prefix} \( -name perllocal.pod -o -name .packlist \) -exec rm {} \; |
119 |
find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ |
120 |
sed "s@^$RPM_BUILD_ROOT@@g" | \ |
121 |
grep -v [Aa]sync | \ |
122 |
grep -v packaging | \ |
123 |
grep -v README.selinux | \ |
124 |
grep -v /Apache | \ |
125 |
grep -v /Danga | \ |
126 |
grep -v Qpsmtpd/ConfigServer.pm | \ |
127 |
grep -v Qpsmtpd/PollServer.pm > %{name}-%{version}-%{release}-filelist |
128 |
if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then |
129 |
echo "ERROR: EMPTY FILE LIST" |
130 |
exit -1 |
131 |
fi |
132 |
|
133 |
%files -f %{name}-%{version}-%{release}-filelist |
134 |
%defattr(-,root,root) |
135 |
%doc CREDITS Changes LICENSE README README.plugins STATUS |
136 |
%{_initrddir}/qpsmtpd-forkserver |
137 |
%config(noreplace) %{_sysconfdir}/qpsmtpd/* |
138 |
%config(noreplace) %{_sysconfdir}/xinetd.d/smtp |
139 |
%config(noreplace) %{_sysconfdir}/sysconfig/qpsmtpd-forkserver |
140 |
%attr(2750,qpsmtpd,clamav) %dir %{_localstatedir}/spool/qpsmtpd |
141 |
%attr(2750,smelog,smelog) %dir %{_localstatedir}/log/qpsmtpd |
142 |
|
143 |
%files apache |
144 |
%defattr(-,root,root) |
145 |
%{_prefix}/lib/perl5/site_perl/Apache/Qpsmtpd.pm |
146 |
%{_mandir}/man3/Apache::Qpsmtpd.3pm.gz |
147 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/* |
148 |
%doc %{_docdir}/%{name}-apache-%{version}/README.selinux |
149 |
|
150 |
%files async |
151 |
%defattr(-,root,root) |
152 |
%{_bindir}/qpsmtpd-async |
153 |
%{_prefix}/lib/perl5/site_perl/Danga/Client.pm |
154 |
%{_prefix}/lib/perl5/site_perl/Danga/TimeoutSocket.pm |
155 |
%{_prefix}/lib/perl5/site_perl/Qpsmtpd/ConfigServer.pm |
156 |
%{_prefix}/lib/perl5/site_perl/Qpsmtpd/Plugin/Async/DNSBLBase.pm |
157 |
%{_prefix}/lib/perl5/site_perl/Qpsmtpd/PollServer.pm |
158 |
%{_mandir}/man1/qpsmtpd-async.1.gz |
159 |
%{_datadir}/%{name}/plugins/async/* |
160 |
|
161 |
%pre |
162 |
if ! id smtpd >/dev/null 2>&1 |
163 |
then |
164 |
# need to create smtpd user. |
165 |
if perl -e 'exit ! defined(getgrnam("postdrop"))' |
166 |
then |
167 |
# if postfix is installed, we will probably use |
168 |
# queue/postfix, which will need this: |
169 |
supp="-G postdrop" |
170 |
fi |
171 |
useradd -r -m $supp smtpd |
172 |
fi |
173 |
|
174 |
%changelog |
175 |
* Tue Nov 3 2009 <slords@lordsfam.net> 0.83-0.5.sme |
176 |
- Update pre requires so scripts don't fail on install [SME: 5558] |
177 |
|
178 |
* Sat Oct 31 2009 <slords@lordsfam.net> 0.83-0.4.sme |
179 |
- Rebase bad_rcptto patch to remove orig file [SME: 5548] |
180 |
- Change logging in tls init to prevent warnings [SME: 5551] |
181 |
|
182 |
* Thu Oct 29 2009 <slords@lordsfam.net> 0.83-0.3.sme |
183 |
- Only run/initialize plugins once [SME: 5533] |
184 |
|
185 |
* Mon Oct 26 2009 <filippo.carletti@gmail.com> 0.83-0.2.sme |
186 |
- Change spool dir permissions and owner to qpsmtpd:clamav |
187 |
- Change log dir permissions and owner to smelog:smelog |
188 |
|
189 |
* Tue Sep 22 2009 <filippo.carletti@gmail.com> 0.83-0.1.sme |
190 |
- add sme specific patches |
191 |
|
192 |
* Fri Sep 18 2009 <rpmbuild@robinbowes.com> 0.83-0.1 |
193 |
- Update to 0.83 |
194 |
|
195 |
* Sun Jul 12 2009 <rpmbuild@robinbowes.com> 0.82-0.1 |
196 |
- Update to latest release |
197 |
- don't add qpsmtpd to start-up by default |
198 |
- add apache config file to qpsmtpd-apache package |
199 |
- remove all patches |
200 |
- use rpm macros for dirs |
201 |
- use a filelist for main package instead of a long list of files |
202 |
|
203 |
* Tue Jul 15 2008 <rpmbuild@robinbowes.com> 0.43-0.7 |
204 |
- Removed SelectServer.pm from .spec file |
205 |
|
206 |
* Tue Mar 18 2008 <rpmbuild@robinbowes.com> 0.43-0.6 |
207 |
- moved config files back to /etc/qpsmtpd following some changes |
208 |
to the qpsmtpd src |
209 |
|
210 |
* Tue Mar 18 2008 <rpmbuild@robinbowes.com> 0.43-0.5 |
211 |
- moved config files to /etc/qpsmtpd/config |
212 |
|
213 |
* Tue Mar 18 2008 <rpmbuild@robinbowes.com> 0.43-0.4 |
214 |
- Moved qpsmtpd-async to /usr/bin |
215 |
- Added qpsmtpd-async man page to async package |
216 |
- Added async smtproute plugin to async package |
217 |
|
218 |
* Wed Mar 12 2008 <rpmbuild@robinbowes.com> 0.43-0.3 |
219 |
- Makefile.PL now updated in svn, so remove hack |
220 |
|
221 |
* Wed Mar 12 2008 <rpmbuild@robinbowes.com> 0.43-0.2 |
222 |
- Added qpsmtpd-prefork to qpsmtpd RPM, inc. hack to work round |
223 |
deficiency in Makefile.PL |
224 |
|
225 |
* Mon Mar 10 2008 <rpmbuild@robinbowes.com> 0.43-0.1 |
226 |
- Updated to work with Makefile to build from svn |
227 |
|
228 |
* Wed Sep 12 2007 <rpmbuild@robinbowes.com> 0.40-2.0 |
229 |
- Updated to build trunk-r790 |
230 |
|
231 |
* Tue Jun 12 2007 <hjp@hjp.at> 0.40-1.0 |
232 |
- updated to 0.40 - no code change. |
233 |
|
234 |
* Thu Jun 07 2007 <hjp@hjp.at> 0.40-0.2 |
235 |
- unset environment variables which are normally tainted in perl. |
236 |
- updated to 0.40rc1 |
237 |
- added dependency on Net::IP (needed by some plugins) |
238 |
|
239 |
* Sat May 05 2007 <hjp@hjp.at> 0.33-0.5 |
240 |
- moved environment cleanup into start() function, otherwise |
241 |
LANG just gets reinitialized. |
242 |
|
243 |
* Sat May 05 2007 <hjp@hjp.at> 0.33-0.4 |
244 |
- split qpsmtpd-async into a separate package to avoid dependency |
245 |
on ParaDNS. |
246 |
|
247 |
* Sat May 05 2007 <hjp@hjp.at> 0.33-0.3 |
248 |
- also unset LANG, LC_ALL and LC_TIME in startup script to prevent |
249 |
locale specific Received headers (bug reported by Dominik Meyer) |
250 |
|
251 |
* Sun Feb 25 2007 <hjp@hjp.at> 0.33-0.2 |
252 |
- 0.3x branch has been merged back to trunk. |
253 |
Got current snapshot (r715) from trunk. |
254 |
|
255 |
* Sun Feb 25 2007 <hjp@hjp.at> 0.33-0.1 |
256 |
- Start forkserver via "daemon" (Gavin Carr) |
257 |
- Fixed 'service qpsmtpd-forkserver status' (Gavin Carr) |
258 |
- Changed policy for config files to noreplace (Gavin Carr) |
259 |
|
260 |
* Sun Nov 05 2006 <hjp@hjp.at> 0.33-0.0 |
261 |
- Upgraded to current snapshot from 0.3x branch (which should become |
262 |
0.33 soon-ish) |
263 |
- included xinetd-support again. |
264 |
|
265 |
* Sat Mar 18 2006 <hjp@hjp.at> 0.32-2 |
266 |
- fix dnsbl to check whether answer fits query. |
267 |
- randomize Net::DNS ids for qpsmtpd-forkserver child processes. |
268 |
|
269 |
* Wed Mar 08 2006 <hjp@hjp.at> 0.32-1 |
270 |
- New upstream 0.32 |
271 |
- rc-file unsets PERL_UNICODE (bug #38397) |
272 |
|
273 |
* Sat Jan 28 2006 <hjp@hjp.at> 0.31.1-3 |
274 |
- Use ${SOURCE*} macros to refer to source files |
275 |
- Avoid invoking rpm and other cleanup in %pre section |
276 |
- Invoke chkconfig in %post. |
277 |
- (Thanks to Josko Plazonic for the reporting these problems and |
278 |
suggesting fixes) |
279 |
|
280 |
* Tue Nov 30 2005 <hjp@hjp.at> 0.31.1-2 |
281 |
- Revision 170 of plugins/loggin/file_connection: |
282 |
Return DECLINED from open_log. |
283 |
Open log in write_log if it isn't already open. |
284 |
|
285 |
* Tue Nov 29 2005 <hjp@hjp.at> 0.31.1-1 |
286 |
- Commented out queue plugins from sample config |
287 |
- Added dependencies |
288 |
- Create smtpd user if it doesn't exist |
289 |
- Added /var/log/qpsmtpd and /var/spool/qpsmtpd |
290 |
|
291 |
* Sat Nov 26 2005 <hjp@hjp.at> |
292 |
- Added file_connection plugin |
293 |
- Startup file for qpsmtpd-forkserver now uses --detach and assumes that |
294 |
a suitable logging module is configured (file_connection by default) |
295 |
|
296 |
* Wed Nov 23 2005 <hjp@hjp.at> |
297 |
- Forkserver drops privileges before loading plugins now. |
298 |
|
299 |
* Sun Nov 20 2005 <hjp@hjp.at> |
300 |
- New upstream 0.31.1 |
301 |
|
302 |
* Mon Nov 14 2005 <hjp@hjp.at> 0.31-8 |
303 |
- New upstream 0.31rc3. |
304 |
- pre-connection patch slightly simplified since upstream fixed one of |
305 |
the bugs. |
306 |
|
307 |
* Tue Aug 23 2005 <hjp@hjp.at> |
308 |
- forced INSTALLSITELIB=/usr/lib/perl5/site_perl as suggested by |
309 |
Charlie Brady. |
310 |
|
311 |
* Sat Aug 20 2005 <hjp@hjp.at> 0.31-7 |
312 |
- RC2 from upstream. |
313 |
- Removed patches which aren't applied from spec file. |
314 |
|
315 |
* Fri Jul 22 2005 <hjp@hjp.at> 0.31-6 |
316 |
- New upstream snapshot from 0.31 branch: svn revision 509. |
317 |
|
318 |
* Sun Jul 17 2005 <hjp@hjp.at> 0.31-5 |
319 |
- include only /etc/init.d/qpsmtpd-forkserver, not /etc/init.d |
320 |
it conflicts with old initscripts packages. |
321 |
|
322 |
* Sun Jul 17 2005 <hjp@hjp.at> 0.31-4 |
323 |
- removed tabs from forkserver |
324 |
|
325 |
* Sun Jul 17 2005 <hjp@hjp.at> 0.31-3 |
326 |
- added startup script for forkserver |
327 |
- changed BuildArchitectures to noarch. |
328 |
|
329 |
* Sat Jul 16 2005 <hjp@hjp.at> 0.31-2 |
330 |
- pre-connection hook is now actually called, not just defined. |
331 |
|
332 |
* Fri Jul 15 2005 <hjp@hjp.at> 0.31-1 |
333 |
- merged with 0.31. Most of my patches are now in the official release. |
334 |
- merged Gavin's per-user-config patch with my dirs patch, since the |
335 |
latter needs a way to turn off logging. |
336 |
- added /etc/qpsmtpd/plugin_dir to package. |
337 |
|
338 |
* Mon Jun 13 2005 <hjp@hjp.at> 0.29-6 |
339 |
- fixed removal of patch backup files |
340 |
- fixed option --pid-file |
341 |
|
342 |
* Sun Jun 12 2005 <hjp@hjp.at> |
343 |
- avoid installing patch backup files |
344 |
- split Apache::Qpsmtpd into separate package to avoid dependency hell. |
345 |
- fixed URL |
346 |
- changed group to Daemons. |
347 |
- Fixed installation for newer versions of ExtUtils::MakeMaker |
348 |
|
349 |
* Wed Jun 1 2005 <hjp@hjp.at> 0.29-5 |
350 |
- Really don't reap children in signal handler. |
351 |
|
352 |
* Tue May 31 2005 <hjp@hjp.at> 0.29-4 |
353 |
- Return 421 for DENYSOFT_DISCONNECT |
354 |
- Don't reap children in signal handler. |
355 |
|
356 |
* Thu May 19 2005 <hjp@hjp.at> 0.29-3 |
357 |
- removed code to accept paths without <>. |
358 |
|
359 |
* Thu May 19 2005 <hjp@hjp.at> 0.29-2 |
360 |
- added QPSMTPD_CONFIG env variable and plugin_dir config. |
361 |
- added supplemental groups and support for pid file |
362 |
- added shared_connect hook |
363 |
- changed log level for SMTP dialog from DEBUG to INFO |
364 |
|
365 |
* Thu Apr 21 2005 hjp@hjp.at |
366 |
- added plugins, /etc and docs. |
367 |
|
368 |
* Mon Apr 18 2005 hjp@hjp.at |
369 |
- Specfile autogenerated |
370 |
|