# TODO # Fix init script (add chkconfig support) # # spec file for p3scan # %define appver 3.0_rc1 Summary: Virus scanning transparent proxy server for POP3 POP3S SMTP Name: p3scan Version: 3.0 Release: 1.rc1 License: GPL Group: System Environment/Daemons URL: http://p3scan.sourceforge.net/ BuildRoot: /var/tmp/%{name}-root Prefix: /usr Source0: http://prdownloads.sourceforge.net/p3scan/%{name}-%{appver}.tar.gz Source1: p3scan.init Source2: p3scan.conf Patch1: p3scan-2.3-rpmtargetopts.patch Patch2: clamav-0.95.patch BuildPrereq: pcre-devel Requires: iptables, pcre Requires: clamd Requires: ripmime Conflicts: pop3vscan BuildRequires: clamav-devel %define user mail %description This is a fully transparent proxy-server for POP3, SMTP, and limited POP3S Clients. It runs on a Linux box with iptables (for port re- direction). It can be used to provide email scanning from/to the internet, to/from any internal network and is ideal for helping to protect your "Other OS" LAN from harm, especially when used synergically with a firewall and other Internet Proxy servers. It is designed to enable scanning of email messages for Viruses, Worms, Trojans, Spam (read as "Un-solicited Bulk Email"), and harmfull attachments. Because viewing HTML mail can enable a "Spammer" to validate an email address (via web bugs), it can also provide dangerous HTML tag stripping. %prep %setup -n %{name}-%{appver} #%patch1 -p1 # This is causing glibc errors #%patch2 -p1 %build #if [ -f /usr/include/pcre/pcre.h ] || [ -f /usr/local/include/pcre/pcre.h ] ; then #patch -p1 < p3scan-2.3-pcre.patch ; #fi %{configure} --disable-clamav make %install [ "$RPM_BUILD_ROOT" != "" ] && rm -rf ${RPM_BUILD_ROOT} #rm -rf ${RPM_BUILD_ROOT}/var/spool/p3scannotify mkdir -p ${RPM_BUILD_ROOT}/var/spool/p3scan/children mkdir -p ${RPM_BUILD_ROOT}/var/spool/p3scan/notify mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/p3scan mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}/var/run/p3scan mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 make install DESTDIR=${RPM_BUILD_ROOT} install %{SOURCE2} -p ${RPM_BUILD_ROOT}%{_sysconfdir}/p3scan/p3scan.conf %post /sbin/chkconfig --add p3scan %postun /sbin/chkconfig --del p3scan %clean rm -rf ${RPM_BUILD_ROOT} %preun if [ $1 = 0 ]; then if [ -f /var/lock/subsys/p3scan ]; then /etc/rc.d/init.d/p3scan stop fi if [ -f /etc/rc.d/init.d/p3scan ]; then /sbin/chkconfig --del p3scan fi fi %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/p3scan/p3scan.conf %{_sysconfdir}/init.d/p3scan %{_sysconfdir}/p3scan/p3scan*.mail %{_bindir}/p3scan #%{_docdir}/%{name}-%{version}/* /usr/doc/p3scan-3.0_rc1/* %{_sysconfdir}/p3scan/p3scan.conf.sample %{_sysconfdir}/p3scan/p3scan.blacklist %{_sysconfdir}/p3scan/p3scan.whitelist %{_mandir}/man8/p3scan.8.gz %{_mandir}/man8/p3scan_readme.8.gz %attr (-,mail,root) %dir /var/run/p3scan %attr (-,mail,root) %dir /var/spool/p3scan %attr (-,mail,root) %dir /var/spool/p3scan/children %attr (-,mail,root) %dir /var/spool/p3scan/notify #%dir %{_mandir}/man8 %changelog * Tue Jan 26 2010 - Updated init script to support chkconfig - Added default p3scan.conf - Disabled clamav internal functions for now. That patch needs work * Sun Dec 13 2009 - Update to 3.0_rc1 - Added patch to support the newer clamav api * Thu Feb 22 2007 - updates to build as non-root