Summary: A SMTP virus scanning system Name: clamsmtp Version: 1.10 Release: 7%{?dist} License: BSD Group: System Environment/Daemons Source0: http://memberwebs.com/stef/software/clamsmtp/clamsmtp-%{version}.tar.gz Source1: clamsmtp.init Source2: clamsmtpd.conf Source3: clamsmtpd.sysconf Source4: clamsmtp-clamd.sysconfig Source5: clamsmtp-clamd.logrotate Source6: clamsmtp-clamd.init Source7: clamsmtp-clamd.conf Source8: clamsmtp-tmpfile.conf Patch0: clamsmtp-man.patch Patch1: clamsmtp-readme.patch URL: http://memberwebs.com/stef/software/clamsmtp/ # kept to be able to build EPEL versions Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: clamav-devel Requires(pre): shadow-utils Requires(postun): initscripts Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires: clamav-server %description ClamSMTP is an SMTP filter that allows you to check for viruses using the ClamAV anti-virus software. It accepts SMTP connections and forwards the SMTP commands and responses to another SMTP server. The 'DATA' email body is intercepted and scanned before forwarding. It aims to be lightweight, reliable, and simple rather than have a myriad of options. It's written in C without major dependencies. If you need more options then you could use something big like AMaViS which is written in PERL and can do almost anything. Written with the Postfix mail server in mind it can be configured as a Postfix Content Filter. It can also be used as a transparent proxy to filter an entire network's SMTP traffic at the router. %prep %setup -q %patch0 -p0 -b .man %patch1 -p0 -b .readme %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} mkdir -p $RPM_BUILD_ROOT%{_var}/run/clamd.clamsmtp mkdir -p $RPM_BUILD_ROOT%{_var}/log/clamd.clamsmtp mkdir -p $RPM_BUILD_ROOT%{_var}/lib/clamd.clamsmtp install -Dp -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/clamsmtpd install -Dp -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamsmtpd.conf install -Dp -m0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamsmtpd install -Dp -m0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.clamsmtp install -Dp -m0644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/clamsmtp install -Dp -m0755 %{SOURCE6} $RPM_BUILD_ROOT%{_initrddir}/clamsmtp-clamd install -Dp -m0644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/clamsmtp.conf install -Dp -m0644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/clamsmtp.conf ln -sf clamd $RPM_BUILD_ROOT%{_sbindir}/clamd.clamsmtp %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add clamsmtpd /sbin/chkconfig --add clamsmtp-clamd %preun if [ $1 -eq 0 ]; then /sbin/service clamsmtpd stop &>/dev/null || : /sbin/chkconfig --del clamsmtpd /sbin/service clamsmtp-clamd stop &>/dev/null || : /sbin/chkconfig --del clamsmtp-clamd fi %pre getent passwd clamsmtp >/dev/null || useradd -r -g mail -d %{_var}/lib/clamd.clamsmtp -s /sbin/nologin -c 'User to own clamsmtp directories and default processes' clamsmtp exit 0 %postun if [ $1 -ge 1 ]; then /sbin/service clamsmtpd condrestart &>/dev/null || : fi %files %defattr(-,root,root) %doc AUTHORS COPYING README %{_initrddir}/clamsmtpd %{_initrddir}/clamsmtp-clamd %config(noreplace) %{_sysconfdir}/logrotate.d/clamsmtp %config(noreplace) %{_sysconfdir}/clamsmtpd.conf %config(noreplace) %{_sysconfdir}/clamd.d/clamsmtp.conf %config(noreplace) %{_sysconfdir}/sysconfig/clamsmtpd %config(noreplace) %{_sysconfdir}/sysconfig/clamd.clamsmtp %config(noreplace) %{_sysconfdir}/tmpfiles.d/clamsmtp.conf %attr(755,root,root) %{_sbindir}/clamsmtpd %attr(755,root,root) %{_sbindir}/clamd.clamsmtp %attr(755,clamsmtp,mail) %{_var}/lib/clamd.clamsmtp %attr(755,clamsmtp,mail) %{_var}/log/clamd.clamsmtp %attr(755,clamsmtp,mail) %{_var}/run/clamd.clamsmtp %{_mandir}/man5/clamsmtpd.conf.5.gz %{_mandir}/man8/clamsmtpd.8.gz %changelog * Thu Nov 24 2016 Nathanael Noblet - 1.10-7 - Fixed readme URLs * Wed Feb 1 2012 Nathanael Noblet - 1.10-6 - Fixed init script typos * Mon Nov 21 2011 Nathanael Noblet - 1.10-5 - Fix log rotation * Sun Sep 11 2011 Nathanael Noblet - 1.10-4 - Fix bug #670569 * Tue May 24 2011 Nathanael Noblet - 1.10-3 - Added tmpfiles.d entry * Tue Feb 08 2011 Fedora Release Engineering - 1.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Aug 12 2010 Nathanael Noblet - 1.10-1 - Use integer for release ver - Unified Requires(foo) style - Added missing Requires - Consistent macro useage - Remove dot from initscript filename * Mon Jul 19 2010 Nathanael Noblet - 1.10-0.2 - Cleaned up the directories and init script names - Added Requires(postun) - Fixed logrotate script * Mon Jan 18 2010 Nathanael Noblet - 1.10-0.1 - Cleaned up for fedora guidelines - Updated to version 1.10 * Mon Nov 1 2004 Rubio Vaughan 1.1-1mdk - Updated to version 1.1 * Sat Oct 30 2004 Rubio Vaughan 1.0-1mdk - Updated to version 1.0 - Added virusheader patch * Mon Sep 27 2004 Rubio Vaughan 0.9-1mdk - Updated to version 0.9 - Removed droppriv patch since it's integrated in the main ClamSMTP distribution now. * Sun Sep 12 2004 Rubio Vaughan 0.8-2mdk - Added droppriv patch to run clamsmtpd under a different user - Added Mandrake init script * Sun Sep 12 2004 Rubio Vaughan 0.8-1mdk - Created clamsmtp.spec file