--- rpms/qpsmtpd/sme8/qpsmtpd.spec 2007/06/12 20:46:55 1.1 +++ rpms/qpsmtpd/sme8/qpsmtpd.spec 2010/04/14 15:29:58 1.27 @@ -1,36 +1,32 @@ +# $Id: qpsmtpd.spec,v 1.26 2010/03/05 20:07:37 slords Exp $ + Name: qpsmtpd -Version: 0.32 -Release: 13%{?dist} -Summary: qpsmtpd -License: distributable +Version: 0.84 +Release: 0.1%{?dist} +Summary: qpsmtpd + qpsmtpd-apache + qpsmtpd-async +License: MIT Group: System Environment/Daemons URL: http://smtpd.develooper.com/ -BuildRoot: %{_tmppath}/%{name}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: perl >= 0:5.00503 -BuildArchitectures: noarch +BuildArch: noarch +Requires: perl(Mail::Header), perl(Net::DNS) perl(Net::IP) +Requires(pre): coreutils, shadow-utils, perl -Source0: qpsmtpd-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz Source1: qpsmtpd-forkserver.rc Source2: qpsmtpd-forkserver.sysconfig - -Source100: http://nowhere.dk/~alj/qpsmtpd/smtp-forward-new - -Patch1: qpsmtpd-0.31-config.patch -Patch5: qpsmtpd-0.29-smtp-loginfo.patch -Patch6: qpsmtpd-0.29-no_brackets.patch -Patch100: qpsmtpd-0.32-check_badrcptto.patch -Patch101: qpsmtpd-0.32-DENYSOFTIfNoClamdPing.patch -Patch102: qpsmtpd-0.31-rhsbl.patch -Patch103: qpsmtpd-0.31-badhelo_DISCONNECT.patch -Patch104: qpsmtpd-0.31-no_response_munging.patch -Patch105: qpsmtpd-0.31-smtp_forward_response.patch -Patch106: qpsmtpd-0.31-auth_validation.patch -Patch107: qpsmtpd-0.31-auth_validation.patch2 -Patch108: qpsmtpd-0.32-peerhooks.patch -#Patch109: qpsmtpd-0.32-net_dns.patch -Patch110: qpsmtpd-0.32-net_dns.patch2 -Patch111: qpsmtpd-0.32-clamheader.patch -Patch112: qpsmtpd-0.32-denysoft.patch +Source3: qpsmtpd-plugin-file_connection +Source4: qpsmtpd-xinetd +Source5: in.qpsmtpd +Source6: qpsmtpd.conf +Source7: README.selinux + +Patch10: qpsmtpd-0.83-loginit.patch + +Patch100: qpsmtpd-0.40-badrcptto_allowrelay.patch +Patch101: qpsmtpd-0.83-peer_hooks.patch +Patch102: qpsmtpd-0.83-clamav-headers.patch %description qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core @@ -41,39 +37,36 @@ qpsmtpd was originally written as a drop now it also includes a smtp forward and a postfix "backend". %package apache +Requires: perl(mod_perl2) Summary: mod_perl-2 connection handler for qpsmtpd Group: System Environment/Daemons +%package async +Summary: qpsmtpd using async I/O in a single process +Group: System Environment/Daemons + %description apache This module implements a mod_perl/apache 2.0 connection handler that turns Apache into an SMTP server using Qpsmtpd. +%description async +This package contains the Qpsmtpd::PollServer module, which allows +qpsmtd to handle many connections in a single process and the +qpsmpd-async which uses it. + %prep -%setup -q -n qpsmtpd-%{version} -%patch1 -p0 -b .config -%patch5 -p0 -b .smtp-loginfo -%patch6 -p0 -b .no_brackets +%setup -q +%patch10 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 -%patch103 -p1 -cp %{SOURCE100} plugins/queue/smtp-forward -%patch104 -p1 -%patch105 -p1 -#%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -#%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 + %build -CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL +CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLSITELIB=%{_prefix}/lib/perl5/site_perl make - %clean rm -rf $RPM_BUILD_ROOT %install @@ -83,135 +76,233 @@ eval `perl '-V:installarchlib'` mkdir -p $RPM_BUILD_ROOT/$installarchlib if grep -q DESTDIR Makefile then - make DESTDIR=$RPM_BUILD_ROOT - find blib/lib -name '*.pm.*' -exec rm -f {} \; - make DESTDIR=$RPM_BUILD_ROOT install + make DESTDIR=$RPM_BUILD_ROOT + find blib/lib -name '*.pm.*' -exec rm -f {} \; + make DESTDIR=$RPM_BUILD_ROOT install else - make PREFIX=$RPM_BUILD_ROOT/usr - find blib/lib -name '*.pm.*' -exec rm -f {} \; - make PREFIX=$RPM_BUILD_ROOT/usr install + make PREFIX=$RPM_BUILD_ROOT/usr + find blib/lib -name '*.pm.*' -exec rm -f {} \; + make PREFIX=$RPM_BUILD_ROOT/usr install fi -mkdir -p $RPM_BUILD_ROOT/usr/share/qpsmtpd -cp -r plugins $RPM_BUILD_ROOT/usr/share/qpsmtpd/plugins -mkdir -p $RPM_BUILD_ROOT/etc -cp -r config.sample $RPM_BUILD_ROOT/etc/qpsmtpd -echo /usr/share/qpsmtpd/plugins > $RPM_BUILD_ROOT/etc/qpsmtpd/plugin_dir -mkdir -p $RPM_BUILD_ROOT/etc/init.d/ -cp %{_sourcedir}/qpsmtpd-forkserver.rc $RPM_BUILD_ROOT/etc/init.d/qpsmtpd-forkserver -mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/ -cp %{_sourcedir}/qpsmtpd-forkserver.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/qpsmtpd-forkserver - +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} +rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins/*.* +cp -r plugins ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name} +rm -f ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/*.* +cp -r config.sample/* ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/ +echo %{_datadir}/%{name}/plugins > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/plugin_dirs +echo %{_localstatedir}/spool/qpsmtpd > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/spool_dir +echo logging/file_connection loglevel LOGINFO %{_localstatedir}/log/qpsmtpd/%Y-%m-%d > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/logging +mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} +cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/qpsmtpd-forkserver +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/qpsmtpd-forkserver +cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins/logging/file_connection +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/spool/qpsmtpd +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/qpsmtpd +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d +cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/smtp +mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} +cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sbindir}/in.smtp +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +cp %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-apache-%{version} +cp %{SOURCE7} $RPM_BUILD_ROOT%{_docdir}/%{name}-apache-%{version} [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress -find $RPM_BUILD_ROOT/usr \( -name perllocal.pod -o -name .packlist \) -exec rm {} \; -find $RPM_BUILD_ROOT/usr -type f -print | \ - sed "s@^$RPM_BUILD_ROOT@@g" | \ - grep -v /Apache > qpsmtpd-%{version}-filelist -if [ "$(cat qpsmtpd-%{version}-filelist)X" = "X" ] ; then +find ${RPM_BUILD_ROOT}%{_prefix} \( -name perllocal.pod -o -name .packlist \) -exec rm {} \; +find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ + sed "s@^$RPM_BUILD_ROOT@@g" | \ + grep -v [Aa]sync | \ + grep -v packaging | \ + grep -v README.selinux | \ + grep -v /Apache | \ + grep -v /Danga | \ + grep -v Qpsmtpd/ConfigServer.pm | \ + grep -v Qpsmtpd/PollServer.pm > %{name}-%{version}-%{release}-filelist +if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi -find $RPM_BUILD_ROOT/usr -type f -path '*/Apache*' -print | \ - sed "s@^$RPM_BUILD_ROOT@@g" > qpsmtpd-apache-%{version}-filelist -%files -f qpsmtpd-%{version}-filelist +%files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %doc CREDITS Changes LICENSE README README.plugins STATUS -/etc/init.d/qpsmtpd-forkserver -%config /etc/qpsmtpd -%config /etc/sysconfig/qpsmtpd-forkserver +%{_initrddir}/qpsmtpd-forkserver +%config(noreplace) %{_sysconfdir}/qpsmtpd/* +%config(noreplace) %{_sysconfdir}/xinetd.d/smtp +%config(noreplace) %{_sysconfdir}/sysconfig/qpsmtpd-forkserver -%files apache -f qpsmtpd-apache-%{version}-filelist +%files apache %defattr(-,root,root) +%{_prefix}/lib/perl5/site_perl/Apache/Qpsmtpd.pm +%{_mandir}/man3/Apache::Qpsmtpd.3pm.gz +%config(noreplace) %{_sysconfdir}/httpd/conf.d/* +%doc %{_docdir}/%{name}-apache-%{version}/README.selinux -%changelog -* Sun Apr 29 2007 Shad L. Lords -- Clean up spec so package can be built by koji/plague - -* Mon Apr 09 2007 Shad L. Lords 0.32-13 -- Backport clamav denysoft patch from 0.33-4 [SME: 176] - -* Wed Mar 07 2007 Shad L. Lords 0.32-12 -- Add X-Virus-Checked header for clamav scanner [SME: 2498] - -* Fri Feb 16 2007 Charlie Brady 0.32-11 -- Workaround (take II) for (lack of) randomisation bug in Net::DNS. [SME: 2466] - -* Wed Feb 14 2007 Shad L. Lords 0.32-10 -- change Package to package in patch [SME: 2466] - -* Wed Feb 14 2007 Shad L. Lords 0.32-9 -- Update requires so package will install after last change [SME: 2466] - -* Tue Feb 13 2007 Charlie Brady 0.32-8 -- Add workaround for (lack of) randomisation bug in Net::DNS. [SME: 2466] - -* Tue Jan 23 2007 Shad L. Lords 0.32-7 -- Undo munge fix. Fixes dkim but break separator. - -* Tue Jan 23 2007 Shad L. Lords 0.32-6 -- Fix spamassassin plugin so it doesn't munge message - -* Thu Jan 11 2007 Shad L. Lords 0.32-5 -- Fix last patch to not produce warnings on start of connection. - -* Thu Jan 11 2007 Shad L. Lords 0.32-4 -- Add hooks so peers plugin works correctly [SME: 2091] - -* Thu Dec 28 2006 Shad L. Lords 0.32-3 -- Fix patch to remove check_badrcptto.orig file [SME: 2080] - -* Thu Dec 07 2006 Shad L. Lords -- Update to new release naming. No functional changes. -- Make Packager generic - -* Mon Aug 28 2006 Charlie Brady 0.32-1sme01 -- Update to 0.32 base distribution. [SME: 1102] - -* Fri Aug 18 2006 Gordon Rowell 0.31.1-1sme09 -- Revert last change as we don't need to use the smtp-forward plugin - [SME: 710] - -* Fri Aug 18 2006 Gordon Rowell 0.31.1-1sme08 -- Make smtp-forward plugin DECLINE if the connection is originated by a - relayclient. This avoids looping the mail back to the internal mail - server where the mail server is acting as both an inbound and outbound - mail gateway. This plugin should be followed by a call to the standard - queue plugin to ensure that mail is queued in this case. [SME: 710] - -* Mon Mar 27 2006 Charlie Brady 0.31.1-1sme07 -- Fix cvm auth validation. [SME: 1138] - -* Sun Mar 26 2006 Charlie Brady 0.31.1-1sme06 -- Apply more stringent validation to authentication attempts. [SME: 1138] - -* Thu Mar 2 2006 Charlie Brady 0.31.1-1sme05 -- Deal more correctly with post data SMTP responses in smtp-forward - plugin. [SME: 929] - -* Sun Feb 12 2006 Charlie Brady 0.31.1-1sme04 -- Apply bugfix to updated smtp-forward plugin. [SME: 710] - -* Sun Feb 12 2006 Charlie Brady 0.31.1-1sme03 -- Use updated smtp-forward plugin. [SME: 710] - -* Sun Feb 5 2006 Charlie Brady 0.31.1-1sme02 -- Disconnect in check_spamhelo plugin. [SME: 658] - -* Thu Feb 2 2006 Charlie Brady 0.31.1-1sme01 -- Upgrade to 0.31.1 tarball. Remove obsolete pre-connection patch. - [SME: 643] - -* Tue Jan 31 2006 Shad L. Lords 0.31-7sme03 -- Fix to allow TXT records for rhsbl lookups [perl #38347] [SME: 596] +%files async +%defattr(-,root,root) +%{_bindir}/qpsmtpd-async +%{_prefix}/lib/perl5/site_perl/Danga/Client.pm +%{_prefix}/lib/perl5/site_perl/Danga/TimeoutSocket.pm +%{_prefix}/lib/perl5/site_perl/Qpsmtpd/ConfigServer.pm +%{_prefix}/lib/perl5/site_perl/Qpsmtpd/Plugin/Async/DNSBLBase.pm +%{_prefix}/lib/perl5/site_perl/Qpsmtpd/PollServer.pm +%{_mandir}/man1/qpsmtpd-async.1.gz +%{_datadir}/%{name}/plugins/async/* -* Tue Jan 31 2006 Gordon Rowell 0.31-7sme02 -- Return a 4xx error code if clamd required, but not responding [SME: 176] +%pre -* Fri Nov 4 2005 Gordon Rowell 0.31-7sme01 -- Don't apply check_badrcptto to relay clients [SF: 1333999] +%changelog +* Wed Apr 14 2010 0.84-0.1.sme +- Update to 0.84 +- add sme specific patches + +* Wed Mar 3 2010 0.83-0.7.sme +- Remove spool and log dir from package (in smeserver-qpsmtpd) +- Don't create smtpd user (unused in sme) [SME: 5815] + +* Thu Nov 5 2009 0.83-0.6.sme +- Apply qpsmtpd git changesets to implement custom SPAM + subject prefix [SME: 5031] + +* Tue Nov 3 2009 0.83-0.5.sme +- Update pre requires so scripts don't fail on install [SME: 5558] + +* Sat Oct 31 2009 0.83-0.4.sme +- Rebase bad_rcptto patch to remove orig file [SME: 5548] +- Change logging in tls init to prevent warnings [SME: 5551] + +* Thu Oct 29 2009 0.83-0.3.sme +- Only run/initialize plugins once [SME: 5533] + +* Mon Oct 26 2009 0.83-0.2.sme +- Change spool dir permissions and owner to qpsmtpd:clamav +- Change log dir permissions and owner to smelog:smelog + +* Tue Sep 22 2009 0.83-0.1.sme +- add sme specific patches + +* Fri Sep 18 2009 0.83-0.1 +- Update to 0.83 + +* Sun Jul 12 2009 0.82-0.1 +- Update to latest release +- don't add qpsmtpd to start-up by default +- add apache config file to qpsmtpd-apache package +- remove all patches +- use rpm macros for dirs +- use a filelist for main package instead of a long list of files + +* Tue Jul 15 2008 0.43-0.7 +- Removed SelectServer.pm from .spec file + +* Tue Mar 18 2008 0.43-0.6 +- moved config files back to /etc/qpsmtpd following some changes + to the qpsmtpd src + +* Tue Mar 18 2008 0.43-0.5 +- moved config files to /etc/qpsmtpd/config + +* Tue Mar 18 2008 0.43-0.4 +- Moved qpsmtpd-async to /usr/bin +- Added qpsmtpd-async man page to async package +- Added async smtproute plugin to async package + +* Wed Mar 12 2008 0.43-0.3 +- Makefile.PL now updated in svn, so remove hack + +* Wed Mar 12 2008 0.43-0.2 +- Added qpsmtpd-prefork to qpsmtpd RPM, inc. hack to work round + deficiency in Makefile.PL + +* Mon Mar 10 2008 0.43-0.1 +- Updated to work with Makefile to build from svn + +* Wed Sep 12 2007 0.40-2.0 +- Updated to build trunk-r790 + +* Tue Jun 12 2007 0.40-1.0 +- updated to 0.40 - no code change. + +* Thu Jun 07 2007 0.40-0.2 +- unset environment variables which are normally tainted in perl. +- updated to 0.40rc1 +- added dependency on Net::IP (needed by some plugins) + +* Sat May 05 2007 0.33-0.5 +- moved environment cleanup into start() function, otherwise + LANG just gets reinitialized. + +* Sat May 05 2007 0.33-0.4 +- split qpsmtpd-async into a separate package to avoid dependency + on ParaDNS. + +* Sat May 05 2007 0.33-0.3 +- also unset LANG, LC_ALL and LC_TIME in startup script to prevent + locale specific Received headers (bug reported by Dominik Meyer) + +* Sun Feb 25 2007 0.33-0.2 +- 0.3x branch has been merged back to trunk. + Got current snapshot (r715) from trunk. + +* Sun Feb 25 2007 0.33-0.1 +- Start forkserver via "daemon" (Gavin Carr) +- Fixed 'service qpsmtpd-forkserver status' (Gavin Carr) +- Changed policy for config files to noreplace (Gavin Carr) + +* Sun Nov 05 2006 0.33-0.0 +- Upgraded to current snapshot from 0.3x branch (which should become + 0.33 soon-ish) +- included xinetd-support again. + +* Sat Mar 18 2006 0.32-2 +- fix dnsbl to check whether answer fits query. +- randomize Net::DNS ids for qpsmtpd-forkserver child processes. + +* Wed Mar 08 2006 0.32-1 +- New upstream 0.32 +- rc-file unsets PERL_UNICODE (bug #38397) + +* Sat Jan 28 2006 0.31.1-3 +- Use ${SOURCE*} macros to refer to source files +- Avoid invoking rpm and other cleanup in %pre section +- Invoke chkconfig in %post. +- (Thanks to Josko Plazonic for the reporting these problems and + suggesting fixes) + +* Tue Nov 30 2005 0.31.1-2 +- Revision 170 of plugins/loggin/file_connection: + Return DECLINED from open_log. + Open log in write_log if it isn't already open. + +* Tue Nov 29 2005 0.31.1-1 +- Commented out queue plugins from sample config +- Added dependencies +- Create smtpd user if it doesn't exist +- Added /var/log/qpsmtpd and /var/spool/qpsmtpd + +* Sat Nov 26 2005 +- Added file_connection plugin +- Startup file for qpsmtpd-forkserver now uses --detach and assumes that + a suitable logging module is configured (file_connection by default) + +* Wed Nov 23 2005 +- Forkserver drops privileges before loading plugins now. + +* Sun Nov 20 2005 +- New upstream 0.31.1 + +* Mon Nov 14 2005 0.31-8 +- New upstream 0.31rc3. +- pre-connection patch slightly simplified since upstream fixed one of + the bugs. + +* Tue Aug 23 2005 +- forced INSTALLSITELIB=/usr/lib/perl5/site_perl as suggested by + Charlie Brady. * Sat Aug 20 2005 0.31-7 - RC2 from upstream.