Name: noattach Version: 1.2 Release: 0 Summary: An attachment filter for sendmail. Group: System Environment/Daemons License: GPL URL: ftp://ftp.rhnet.is/pub/noattach/ Source0: noattach-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: sendmail-devel Requires: sendmail sendmail-cf %description There really isn't much to say, noattach is a milter that parses the body of email messages from sendmail and checks if the filename of attachments matches one of the regular expressions in a given pattern file and rejects those emails that match. Filenames are rfc2047 or rfc2231 decoded if needed. %prep %setup -q %build %configure \ --enable-header \ --with-pat-file=%{_sysconfdir}/mail/noattach.patterns \ --with-pid-file=%{_localstatedir}/run/noattach/noattach.pid %{__make} %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/ install -d $RPM_BUILD_ROOT%{_initrddir}/ install -d $RPM_BUILD_ROOT%{_localstatedir}/run/noattach/ install examples/noattach.patterns $RPM_BUILD_ROOT%{_sysconfdir}/mail/ install fedora/noattach.sh $RPM_BUILD_ROOT%{_initrddir}/noattach make install DESTDIR=$RPM_BUILD_ROOT mv examples/README README.patterns %clean rm -rf $RPM_BUILD_ROOT %pre /usr/sbin/useradd -r -d /etc/mail -s /sbin/nologin \ -c "NoAttach Milter" noattach >/dev/null 2>&1 || : %post /sbin/chkconfig --add noattach %preun if [ $1 -eq 0 ]; then /sbin/service noattach stop > /dev/null 2>&1 || : /sbin/chkconfig --del noattach fi %postun if [ $1 -eq 0 ]; then /usr/sbin/userdel noattach >/dev/null 2>&1 || : /usr/sbin/groupdel noattach >/dev/null 2>&1 || : else /sbin/service noattach condrestart > /dev/null 2>&1 || : fi %files %defattr(0644,root,root,0755) %doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO VERSION %doc README.libmilter README.patterns %config(noreplace) %{_sysconfdir}/mail/noattach.patterns %attr(0755,root,root) %{_initrddir}/noattach %attr(0755,root,root) %{_bindir}/noattach %attr(0755,noattach,noattach) %dir %{_localstatedir}/run/noattach/ %{_mandir}/man[^3]/* %changelog * Sun Feb 27 2005 Petr Krištof 1.2-0 - Update to 1.2 final - Run daemon as noattach user * Thu Dec 2 2004 Petr Krištof 1.2beta2-0 - Build on FC-3 - Initial RPM release