#there's already a pop-before-smtp package in contribs, but this is another one written in c %define name pop-before-smtp-in-c %define altname pop-before-smtp %define version 1.0 %define release 1mdk Summary: Watch log for pop/imap auth, notify Postfix to allow relay Name: %{name} Version: %{version} Release: %{release} Source0: %{altname}-%{version}.tar.bz2 Source1: %{altname}.init.bz2 Patch0: %{altname}-maillog.patch.bz2 URL: http://www.bluelavalamp.net/pop-before-smtp/ License: GPL Group: System/Servers PreReq: /sbin/chkconfig rpm-helper Requires: postfix vm-pop3d Conflicts: %{altname} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Spam prevention requires preventing open relaying through email servers. However, legit users want to be able to relay. If legit users always stayed in one spot, they'd be easy to describe to the daemon. However, what with roving laptops, logins from home, etc., legit users refuse to stay in one spot. pop-before-smtp watches the mail log, looking for successful pop/imap logins, and posts the originating IP address into a database which can be checked by Postfix, to allow relaying for people who have recently downloaded their email. %prep %setup -q -n %{altname}-%{version} %patch0 -p0 %build %{__cc} -DOPTIMIZE $RPM_OPT_FLAGS -o %{altname} %{altname}.c strip %{altname} %install rm -rf $RPM_BUILD_ROOT install -D -m755 %{altname} %{buildroot}%{_sbindir}/%{altname} bzcat %{SOURCE1} > %{altname}.init; install -D -m755 %{altname}.init %{buildroot}%{_initrddir}/%{altname} %post %_post_service %{altname} %preun %_post_service %{altname} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc CHANGES %{altname}.html %{_sbindir}/%{altname} %config(noreplace) %{_initrddir}/%{altname} %changelog * Sat Jan 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.0-1mdk - First release