Name: qpsmtpd Version: 0.40 Release: 1.6%{?dist} %define orig_version 0.40 Summary: qpsmtpd License: distributable Group: System Environment/Daemons 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-%{orig_version}.tar.gz Source1: qpsmtpd-forkserver.rc Source2: qpsmtpd-forkserver.sysconfig Source3: qpsmtpd-plugin-file_connection Source4: qpsmtpd-xinetd Source5: in.qpsmtpd Patch1: qpsmtpd-0.31-config.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 Patch104: qpsmtpd-0.40-clamd_conf.patch Patch105: qpsmtpd-0.40-denysoft.patch Patch106: qpsmtpd-0.40-clamav-headers.patch %description qpsmtpd is a flexible smtpd daemon written in Perl. Apart from the core SMTP features, all functionality is implemented in small "extension plugins" using the easy to use object oriented plugin API. qpsmtpd was originally written as a drop-in qmail-smtpd replacement, but now it also includes a smtp forward and a postfix "backend". %package apache 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-%{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 %patch103 -p1 %patch104 -p1 %patch105 -p1 %patch106 -p1 %build CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLSITELIB=/usr/lib/perl5/site_perl make %clean rm -rf $RPM_BUILD_ROOT %install rm -rf $RPM_BUILD_ROOT 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 else 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/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 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 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/qpsmtpd-forkserver mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/ 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 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 | 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 fi find $RPM_BUILD_ROOT/usr -type f -path '*/Apache*' -print | \ sed "s@^$RPM_BUILD_ROOT@@g" > qpsmtpd-apache-%{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(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) %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 %changelog * Sat Jun 30 2007 Shad L. Lords 0.40-1.6.sme - Move clamav headers to top to not mess up message signing. * Thu Jun 28 2007 Gavin Weight 0.40-1.5.sme - Remove the scriptlets within the .spec file. [SME: 3112] * Mon Jun 25 2007 Shad L. Lords 0.40-1.4.sme - Deny soft if clamscan fails [SME: 3098] * Fri Jun 15 2007 Shad L. Lords 0.40-1.3.sme - Fix clamd.conf path for clamav plugin [SME: 3067] * Thu Jun 14 2007 Shad L. Lords 0.40-1.2.sme - Fix clamav patch so service starts [SME: 3065] * Thu Jun 14 2007 Shad L. Lords 0.40-1.1.sme - Update for smeserver [SME: 3065] * 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. - Removed patches which aren't applied from spec file. * Fri Jul 22 2005 0.31-6 - New upstream snapshot from 0.31 branch: svn revision 509. * Sun Jul 17 2005 0.31-5 - include only /etc/init.d/qpsmtpd-forkserver, not /etc/init.d it conflicts with old initscripts packages. * Sun Jul 17 2005 0.31-4 - removed tabs from forkserver * Sun Jul 17 2005 0.31-3 - added startup script for forkserver - changed BuildArchitectures to noarch. * Sat Jul 16 2005 0.31-2 - pre-connection hook is now actually called, not just defined. * Fri Jul 15 2005 0.31-1 - merged with 0.31. Most of my patches are now in the official release. - merged Gavin's per-user-config patch with my dirs patch, since the latter needs a way to turn off logging. - added /etc/qpsmtpd/plugin_dir to package. * Mon Jun 13 2005 0.29-6 - fixed removal of patch backup files - fixed option --pid-file * Sun Jun 12 2005 - avoid installing patch backup files - split Apache::Qpsmtpd into separate package to avoid dependency hell. - fixed URL - changed group to Daemons. - Fixed installation for newer versions of ExtUtils::MakeMaker * Wed Jun 1 2005 0.29-5 - Really don't reap children in signal handler. * Tue May 31 2005 0.29-4 - Return 421 for DENYSOFT_DISCONNECT - Don't reap children in signal handler. * Thu May 19 2005 0.29-3 - removed code to accept paths without <>. * Thu May 19 2005 0.29-2 - added QPSMTPD_CONFIG env variable and plugin_dir config. - added supplemental groups and support for pid file - added shared_connect hook - changed log level for SMTP dialog from DEBUG to INFO * Thu Apr 21 2005 hjp@hjp.at - added plugins, /etc and docs. * Mon Apr 18 2005 hjp@hjp.at - Specfile autogenerated