Summary: A drop-in connection-time spam filter for qmail. Name: spamdyke Version: 4.3.1 Release: 2 License: GPL Group: Applications/Internet Packager: Scott R. Shinn URL: http://www.spamdyke.org/ Source: http://www.spamdyke.org/releases/%{name}-%{version}.tgz Source1: spamdyke.cron Source2: spamdyke.conf Source3: spamdyke.sql Patch1: spamdyke-4.1.0-mysql.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) BuildRequires: mysql-devel %description spamdyke is a filter for monitoring and intercepting incoming SMTP connections to a qmail server. It acts as a transparent middleman, observing the conversation without interference unless it sees something it should block. Because it can silently monitor, it can also log mail traffic in several different ways. %package utils Group: Utilities/System Summary: These are some additional programs for spamdyke. Requires: %{name} = %{version} %description utils These are some additional programs for spamdyke. %prep %setup #%patch1 -p1 %build export LIBS="-lmysqlclient -L/usr/lib/mysql -L/usr/lib64/mysql" # Build spamdyke... cd %{name} %configure --with-excessive-output make # Build utils... cd ../utils %configure make %install install -d $RPM_BUILD_ROOT{%{_bindir},%{_docdir}/%{name}-%{version},%{_sysconfdir}} install spamdyke/spamdyke $RPM_BUILD_ROOT%{_bindir} install utils/{dns*[!.c],domain*[!.c]} $RPM_BUILD_ROOT%{_bindir} install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/spamdyke.conf install documentation/{*.txt,*.html} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{__mkdir_p} %{buildroot}/%{_sysconfdir}/cron.daily/ %{__mkdir_p} %{buildroot}/var/qmail/spamdyke %{__mkdir_p} %{buildroot}/var/qmail/spamdyke/greylist %{__mkdir_p} %{buildroot}/usr/share/spamdyke/ touch %{buildroot}/var/qmail/spamdyke/blacklist_senders touch %{buildroot}/var/qmail/spamdyke/blacklist_recipients touch %{buildroot}/var/qmail/spamdyke/blacklist_keywords touch %{buildroot}/var/qmail/spamdyke/blacklist_ip touch %{buildroot}/var/qmail/spamdyke/whitelist_rdns touch %{buildroot}/var/qmail/spamdyke/whitelist_ip touch %{buildroot}/var/qmail/spamdyke/whitelist_senders %{__install} %{SOURCE1} %{buildroot}/%{_sysconfdir}/cron.daily/spamdyke %{__install} %{SOURCE3} %{buildroot}/usr/share/spamdyke/spamdyke.sql %triggerin -- psa-qmail if [ -f /etc/xinetd.d/smtp_psa ]; then SMTP_PSA=/etc/xinetd.d/smtp_psa else SMTP_PSA=/etc/xinetd.d/smtp.psa fi if ! grep -q spamdyke $SMTP_PSA ; then perl -p -i -e "s[relaylock][relaylock /usr/bin/spamdyke -f /etc/spamdyke.conf]" $SMTP_PSA fi %triggerun -- psa-qmail if [ -f /etc/xinetd.d/smtp_psa ]; then SMTP_PSA=/etc/xinetd.d/smtp_psa else SMTP_PSA=/etc/xinetd.d/smtp.psa fi if grep -q spamdyke $SMTP_PSA ; then perl -p -i -e "s[/usr/bin/spamdyke -f /etc/spamdyke.conf][]" $SMTP_PSA fi %post if [ $1 = 1 ]; then MYSQL="mysql -u admin -p`cat /etc/psa/.psa.shadow` psa " $MYSQL < /usr/share/spamdyke/spamdyke.sql # restart xinetd /sbin/service xinetd restart fi %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/spamdyke.conf # permissions ( %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/blacklist_senders %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/blacklist_senders %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/blacklist_recipients %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/blacklist_keywords %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/blacklist_ip %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/whitelist_rdns %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/whitelist_ip %attr(0644, qmaild, qmail) %config(noreplace) /var/qmail/spamdyke/whitelist_senders %docdir %{_docdir}/%{name}-%{version} %{_docdir}/%{name}-%{version}/* %{_bindir}/spamdyke # permissions %attr(-, qmaild, qmail) /var/qmail/spamdyke /etc/cron.daily/spamdyke /usr/share/spamdyke/spamdyke.sql %files utils %defattr(-,root,root) %{_bindir}/dns* %{_bindir}/domain* %changelog * Mon Feb 27 2012 Scott R. Shinn - 4.3.1 - Update to 4.3.1 * Mon Nov 15 2010 Scott R. Shinn - 4.1.0-1 - Update to 4.1.0 - Merge in haggybear.de mysql patch * Sun Mar 21 2010 Scott R. Shinn - 4.0.10-6 - Added sql patch - Added sql files and install routine * Fri Mar 6 2009 Scott R. Shinn - 4.0.10-5 - Permissions updates * Fri Mar 6 2009 Scott R. Shinn - 4.0.10-4 - Added spamdyke dir, and default configs - Deprecated reject-ip-in-cc-rdns flag in config * Mon Mar 2 2009 Scott R. Shinn - 4.0.10-3 - Update to work with Plesk 9 * Wed Feb 11 2009 Scott R. Shinn - 4.0.10-2 - added default spamdyke config for plesk - added default cleanup cron job for plesk * Wed Feb 11 2009 Scott R. Shinn - 4.0.10-1 - update to 4.0.10 - import to art-build * Mon Dec 01 2008 UD 4.0.9-1 - 4.0.9-1 * Fri Nov 21 2008 UD 4.0.8-1 - 4.0.8-1 * Fri Nov 21 2008 UD 4.0.7-1 - 4.0.7-1 * Thu Oct 16 2008 UD 4.0.6-1 - Removed service reload, here's not the right place * Mon Oct 13 2008 UD 4.0.5-1 - Added excessive flag to configure. - Added service reload * Wed Sep 10 2008 UD 4.0.4-1 - 4.0.4-1 * Mon Sep 01 2008 UD 4.0.3-1 - First build on RHEL5.