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