--- rpms/qpsmtpd/sme7/qpsmtpd.spec 2007/06/12 17:16:13 1.1 +++ rpms/qpsmtpd/sme7/qpsmtpd.spec 2007/06/15 00:59:30 1.5 @@ -1,6 +1,7 @@ Name: qpsmtpd -Version: 0.32 -Release: 13%{?dist} +Version: 0.40 +Release: 1.2%{?dist} +%define orig_version 0.40 Summary: qpsmtpd License: distributable Group: System Environment/Daemons @@ -8,29 +9,27 @@ URL: http://smtpd.develooper.com/ BuildRoot: %{_tmppath}/%{name}-root BuildRequires: perl >= 0:5.00503 BuildArchitectures: noarch +Requires: perl(Mail::Header), perl(Net::DNS) perl(Net::IP) -Source0: qpsmtpd-%{version}.tar.gz +Source0: qpsmtpd-%{orig_version}.tar.gz Source1: qpsmtpd-forkserver.rc Source2: qpsmtpd-forkserver.sysconfig - -Source100: http://nowhere.dk/~alj/qpsmtpd/smtp-forward-new +Source3: qpsmtpd-plugin-file_connection +Source4: qpsmtpd-xinetd +Source5: in.qpsmtpd 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 +Patch2: qpsmtpd-0.33-xinetd.patch +Patch3: qpsmtpd-0.33-af_inet6.patch +Patch4: qpsmtpd-0.31.1-queue.patch +Patch5: qpsmtpd-0.33-smtp-loginfo.patch +Patch6: qpsmtpd-0.33-hook-logdebug.patch +Patch7: qpsmtpd-0.32-dnsbl-checkanswer.patch +Patch8: qpsmtpd-0.32-dns-random-id.patch +Patch100: qpsmtpd-0.40-badhelo_disconnect.patch +Patch101: qpsmtpd-0.40-badrcptto_allowrelay.patch +Patch102: qpsmtpd-0.40-clamav_fix.patch +Patch103: qpsmtpd-0.40-peer_hooks.patch %description qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core @@ -44,33 +43,40 @@ now it also includes a smtp forward and 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 -n qpsmtpd-%{orig_version} +# XXX - doesn't apply cleanly any more but may still be needed for empty +# configs. +#%patch1 -p0 -b .config +# Merged into upstream: +#%patch2 -p0 -b .xinetd +#%patch3 -p0 -b .af_inet6 +%patch4 -p0 -b .queue +#%patch5 -p0 -b .smtp-loginfo +#%patch6 -p0 -b .hook-logdebug +#%patch7 -p0 -b .dnsbl-checkanswer +#%patch8 -p0 -b .dns-random-id %patch100 -p1 %patch101 -p1 -%patch102 -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=/usr/lib/perl5/site_perl make @@ -92,15 +98,28 @@ else find blib/lib -name '*.pm.*' -exec rm -f {} \; make PREFIX=$RPM_BUILD_ROOT/usr install fi +mkdir -p $RPM_BUILD_ROOT/usr/sbin +cp qpsmtpd-async $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/share/qpsmtpd cp -r plugins $RPM_BUILD_ROOT/usr/share/qpsmtpd/plugins +rm -f $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 +rm -f $RPM_BUILD_ROOT/etc/qpsmtpd/*.* +echo /usr/share/qpsmtpd/plugins > $RPM_BUILD_ROOT/etc/qpsmtpd/plugin_dirs +echo /var/spool/qpsmtpd > $RPM_BUILD_ROOT/etc/qpsmtpd/spool_dir +echo logging/file_connection loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d > $RPM_BUILD_ROOT/etc/qpsmtpd/logging mkdir -p $RPM_BUILD_ROOT/etc/init.d/ -cp %{_sourcedir}/qpsmtpd-forkserver.rc $RPM_BUILD_ROOT/etc/init.d/qpsmtpd-forkserver +cp %{SOURCE1} $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 +cp %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/qpsmtpd-forkserver +cp %{SOURCE3} $RPM_BUILD_ROOT/usr/share/qpsmtpd/plugins/logging/file_connection +mkdir -p $RPM_BUILD_ROOT/var/spool/qpsmtpd +mkdir -p $RPM_BUILD_ROOT/var/log/qpsmtpd +mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d +cp %{SOURCE4} $RPM_BUILD_ROOT/etc/xinetd.d/smtp +mkdir -p $RPM_BUILD_ROOT/usr/sbin +cp %{SOURCE5} $RPM_BUILD_ROOT/usr/sbin/in.smtp [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress @@ -108,7 +127,10 @@ cp %{_sourcedir}/qpsmtpd-forkserver.sysc 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 + grep -v /Apache | + grep -v /Danga | + grep -v Qpsmtpd/ConfigServer.pm | + grep -v Qpsmtpd/PollServer.pm > qpsmtpd-%{version}-filelist if [ "$(cat qpsmtpd-%{version}-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 @@ -116,102 +138,224 @@ 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 %defattr(-,root,root) +/usr/sbin/in.smtp +/usr/bin/qpsmtpd +/usr/bin/qpsmtpd-forkserver +/usr/lib/perl5/site_perl/Qpsmtpd.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Plugin.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Constants.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Command.pm +/usr/lib/perl5/site_perl/Qpsmtpd/TcpServer.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Connection.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Transaction.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Postfix/Constants.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Postfix/pf2qp.pl +/usr/lib/perl5/site_perl/Qpsmtpd/TcpServer/Prefork.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Auth.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Utils.pm +/usr/lib/perl5/site_perl/Qpsmtpd/SelectServer.pm +/usr/lib/perl5/site_perl/Qpsmtpd/DSN.pm +/usr/lib/perl5/site_perl/Qpsmtpd/SMTP/Prefork.pm +/usr/lib/perl5/site_perl/Qpsmtpd/SMTP.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Address.pm +/usr/lib/perl5/site_perl/Qpsmtpd/Postfix.pm +/usr/share/man/man3/Qpsmtpd::Command.3pm.gz +/usr/share/man/man3/Qpsmtpd.3pm.gz +/usr/share/man/man3/Qpsmtpd::Transaction.3pm.gz +/usr/share/man/man3/Qpsmtpd::Constants.3pm.gz +/usr/share/man/man3/Qpsmtpd::ConfigServer.3pm.gz +/usr/share/man/man3/Qpsmtpd::DSN.3pm.gz +/usr/share/man/man3/Qpsmtpd::Postfix.3pm.gz +/usr/share/man/man3/Qpsmtpd::Address.3pm.gz +/usr/share/man/man3/Qpsmtpd::Connection.3pm.gz +/usr/share/qpsmtpd/plugins/check_loop +/usr/share/qpsmtpd/plugins/check_relay +/usr/share/qpsmtpd/plugins/sender_permitted_from +/usr/share/qpsmtpd/plugins/count_unrecognized_commands +/usr/share/qpsmtpd/plugins/spamassassin +/usr/share/qpsmtpd/plugins/check_badrcptto +/usr/share/qpsmtpd/plugins/rcpt_ok +/usr/share/qpsmtpd/plugins/domainkeys +/usr/share/qpsmtpd/plugins/virus/klez_filter +/usr/share/qpsmtpd/plugins/virus/check_for_hi_virus +/usr/share/qpsmtpd/plugins/virus/uvscan +/usr/share/qpsmtpd/plugins/virus/kavscanner +/usr/share/qpsmtpd/plugins/virus/hbedv +/usr/share/qpsmtpd/plugins/virus/clamav +/usr/share/qpsmtpd/plugins/virus/clamdscan +/usr/share/qpsmtpd/plugins/virus/aveclient +/usr/share/qpsmtpd/plugins/virus/sophie +/usr/share/qpsmtpd/plugins/virus/bitdefender +/usr/share/qpsmtpd/plugins/queue/smtp-forward +/usr/share/qpsmtpd/plugins/queue/qmail-queue +/usr/share/qpsmtpd/plugins/queue/maildir +/usr/share/qpsmtpd/plugins/queue/exim-bsmtp +/usr/share/qpsmtpd/plugins/queue/postfix-queue +/usr/share/qpsmtpd/plugins/http_config +/usr/share/qpsmtpd/plugins/quit_fortune +/usr/share/qpsmtpd/plugins/milter +/usr/share/qpsmtpd/plugins/auth/authnull +/usr/share/qpsmtpd/plugins/auth/authdeny +/usr/share/qpsmtpd/plugins/auth/auth_flat_file +/usr/share/qpsmtpd/plugins/auth/auth_cvm_unix_local +/usr/share/qpsmtpd/plugins/auth/auth_vpopmail_sql +/usr/share/qpsmtpd/plugins/auth/auth_ldap_bind +/usr/share/qpsmtpd/plugins/tls_cert +/usr/share/qpsmtpd/plugins/logging/warn +/usr/share/qpsmtpd/plugins/logging/syslog +/usr/share/qpsmtpd/plugins/logging/adaptive +/usr/share/qpsmtpd/plugins/logging/file +/usr/share/qpsmtpd/plugins/logging/devnull +/usr/share/qpsmtpd/plugins/logging/file_connection +/usr/share/qpsmtpd/plugins/content_log +/usr/share/qpsmtpd/plugins/tls +/usr/share/qpsmtpd/plugins/check_spamhelo +/usr/share/qpsmtpd/plugins/check_norelay +/usr/share/qpsmtpd/plugins/check_earlytalker +/usr/share/qpsmtpd/plugins/hosts_allow +/usr/share/qpsmtpd/plugins/check_badmailfrom +/usr/share/qpsmtpd/plugins/dns_whitelist_soft +/usr/share/qpsmtpd/plugins/dnsbl +/usr/share/qpsmtpd/plugins/ident/geoip +/usr/share/qpsmtpd/plugins/ident/p0f +/usr/share/qpsmtpd/plugins/relay_only +/usr/share/qpsmtpd/plugins/parse_addr_withhelo +/usr/share/qpsmtpd/plugins/require_resolvable_fromhost +/usr/share/qpsmtpd/plugins/rhsbl +/usr/share/qpsmtpd/plugins/dont_require_anglebrackets +/usr/share/qpsmtpd/plugins/check_badrcptto_patterns +/usr/share/qpsmtpd/plugins/greylisting +/usr/share/qpsmtpd/plugins/check_basicheaders +/usr/share/qpsmtpd/plugins/check_badmailfromto %doc CREDITS Changes LICENSE README README.plugins STATUS /etc/init.d/qpsmtpd-forkserver -%config /etc/qpsmtpd -%config /etc/sysconfig/qpsmtpd-forkserver +%config(noreplace) /etc/qpsmtpd/* +%config(noreplace) /etc/xinetd.d/smtp +%config(noreplace) /etc/sysconfig/qpsmtpd-forkserver %files apache -f qpsmtpd-apache-%{version}-filelist %defattr(-,root,root) -%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] +%files async +%defattr(-,root,root) +/usr/sbin/qpsmtpd-async +/usr/lib/perl5/site_perl/Danga/Client.pm +/usr/lib/perl5/site_perl/Danga/TimeoutSocket.pm +/usr/lib/perl5/site_perl/Qpsmtpd/ConfigServer.pm +/usr/lib/perl5/site_perl/Qpsmtpd/PollServer.pm +/usr/share/qpsmtpd/plugins/async/check_earlytalker +/usr/share/qpsmtpd/plugins/async/dnsbl +/usr/share/qpsmtpd/plugins/async/require_resolvable_fromhost -* 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] +%pre +if ! id smtpd >/dev/null 2>&1 +then + # need to create smtpd user. + if perl -e 'exit ! defined(getgrnam("postdrop"))' + then + # if postfix is installed, we will probably use + # queue/postfix, which will need this: + supp="-G postdrop" + fi + useradd -r -m $supp smtpd +fi -* Sun Feb 5 2006 Charlie Brady 0.31.1-1sme02 -- Disconnect in check_spamhelo plugin. [SME: 658] +%post +/sbin/chkconfig --add qpsmtpd-forkserver -* Thu Feb 2 2006 Charlie Brady 0.31.1-1sme01 -- Upgrade to 0.31.1 tarball. Remove obsolete pre-connection patch. - [SME: 643] +%changelog +* Thu Jun 14 2007 Shad L. Lords 0.40-1.2.sme +- Fix clamav patch so service starts -* Tue Jan 31 2006 Shad L. Lords 0.31-7sme03 -- Fix to allow TXT records for rhsbl lookups [perl #38347] [SME: 596] +* Thu Jun 14 2007 Shad L. Lords 0.40-1.1.sme +- Update for smeserver -* Tue Jan 31 2006 Gordon Rowell 0.31-7sme02 -- Return a 4xx error code if clamd required, but not responding [SME: 176] +* Tue Jun 12 2007 0.40-1.0 +- updated to 0.40 - no code change. -* Fri Nov 4 2005 Gordon Rowell 0.31-7sme01 -- Don't apply check_badrcptto to relay clients [SF: 1333999] +* 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.