Summary: An greylisting implementation for qmail Name: qgreylist Version: 0.3 Release: 3 License: BSD Group: Applications/System Source0: http://www.jonatkins.com/qgreylist/%{name}-%{version}.tar.gz URL: http://www.jonatkins.com/qgreylist/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: qmail %description qgreylist is a 'lite' version of greylisting. The puremagic.com page suggests using the source IP, the envelope from address and the envelope to address. %prep %setup -q -n qgreylist %build %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_localstatedir}/qmail/bin/ install -d $RPM_BUILD_ROOT%{_localstatedir}/qmail/greylist/ install -d $RPM_BUILD_ROOT%{_localstatedir}/qmail/whitelist/ install greylist $RPM_BUILD_ROOT%{_localstatedir}/qmail/bin/ %clean rm -rf $RPM_BUILD_ROOT %pre if [ -f /var/qmail/whitelist ]; then mv /var/qmail/whitelist /var/qmail/whitelist.bak fi %post %triggerin -- psa-qmail g=`grep -c "greylist /var/qmail/bin/qmail-smtpd" /etc/xinetd.d/smtp_psa || true` if [ $g -gt 0 ]; then # If already installed. true; # its installed else sed -e 's/relaylock \/var/relaylock \/var\/qmail\/bin\/greylist \/var/' \ /etc/xinetd.d/smtp_psa > /etc/xinetd.d/smtp_psa.$$ mv /etc/xinetd.d/smtp_psa.$$ /etc/xinetd.d/smtp_psa fi g=`grep -c "greylist /var/qmail/bin/qmail-smtpd" /etc/xinetd.d/smtps_psa || true` if [ $g -gt 0 ]; then # If already installed. true; # its installed else sed -e 's/relaylock \/var/relaylock \/var\/qmail\/bin\/greylist \/var/' \ /etc/xinetd.d/smtps_psa > /etc/xinetd.d/smtps_psa.$$ mv /etc/xinetd.d/smtps_psa.$$ /etc/xinetd.d/smtps_psa fi %triggerin -- project-gamera g=`grep -c "greylist qmail-smtpd" /service/smtpd/run || true` if [ $g -gt 0 ]; then # If already installed. true; # its installed else sed -e 's/^fixcrio $rbl qmail-smtpd/fixcrio $rbl \/var\/qmail\/bin\/greylist qmail-smtpd/' \ /service/smtpd/run > /service/smtpd/run.$$ mv /service/smtpd/run.$$ /service/smtpd/run chmod 0755 /service/smtpd/run fi %preun %postun %triggerun -- psa-qmail g=`grep -c "greylist /var/qmail/bin/qmail-smtpd" /etc/xinetd.d/smtp_psa || true` if [ $g -gt 0 ]; then # If already installed. sed -e 's/relaylock \/var\/qmail\/bin\/greylist \/var/relaylock \/var/' \ /etc/xinetd.d/smtp_psa > /etc/xinetd.d/smtp_psa.$$ mv /etc/xinetd.d/smtp_psa.$$ /etc/xinetd.d/smtp_psa fi g=`grep -c "greylist /var/qmail/bin/qmail-smtpd" /etc/xinetd.d/smtps_psa || true` if [ $g -gt 0 ]; then # If already installed. sed -e 's/relaylock \/var\/qmail\/bin\/greylist \/var/relaylock \/var/' \ /etc/xinetd.d/smtps_psa > /etc/xinetd.d/smtps_psa.$$ mv /etc/xinetd.d/smtps_psa.$$ /etc/xinetd.d/smtps_psa fi %triggerun -- project-gamera g=`grep -c "greylist qmail-smtpd" /service/smtpd/run || true` if [ $g -gt 0 ]; then # If already installed. sed -e 's/^fixcrio $rbl \/var\/qmail\/bin\/greylist qmail-smtpd/fixcrio $rbl qmail-smtpd/' \ /service/smtpd/run > /service/smtpd/run.$$ mv /service/smtpd/run.$$ /service/smtpd/run chmod 0755 /service/smtpd/run fi %files %defattr(0644,root,root,0755) %attr(0755,qmaild,root) %dir %{_localstatedir}/qmail/greylist/ %attr(0755,qmaild,root) %dir %{_localstatedir}/qmail/whitelist/ %attr(0755,root,root) %{_localstatedir}/qmail/bin/greylist %changelog * Tue Jan 2 2007 Scott R. Shinn 0.3-2 - fixed the whitelist issue * Fri May 5 2006 Scott R. Shinn 0.3-1 - update to qgreylist 0.3 (Did ya Miss me?!) - Trigger conversion * Fri Jun 11 2004 Scott R. Shinn 0.2-1 - initial release