head 1.12; access; symbols milter-greylist-4-5-13:1.12 milter-greylist-4-5-12:1.12 milter-greylist-4-5-11:1.12 milter-greylist-4-5-10:1.12 milter-greylist-4-9-10:1.12 milter-greylist-4-5-8:1.12 milter-greylist-4-5-9:1.12 milter-greylist-4-5-7:1.12 milter-greylist-4-5-6:1.12 milter-greylist-4-5:1.12 milter-greylist-4-5-5:1.12 milter-greylist-4-5-4:1.12 milter-greylist-4-5-3:1.12 milter-greylist-4-5-2:1.12 milter-greylist-4-5-1:1.12 milter-greylist-4-4-3:1.12 milter-greylist-4-4-2:1.12 milter-greylist-4-4-1:1.12 milter-greylist-4-4:1.12 milter-greylist-4-4-rc1:1.12 milter-greylist-4-4-alpha4:1.12 milter-greylist-4-4-alpha3:1.12 milter-greylist-4-4-alpha2:1.10 milter-greylist-4-4-alpha1:1.10 milter-greylist-4-2-7:1.9.2.1 milter-greylist-4-3-9:1.10 milter-greylist-4-2-6:1.9.2.1 milter-gresylit-4-2-6:1.9.2.1 milter-greylist-4-3-8:1.10 milter-greylist-4-3-7:1.10 milter-greylist-4-2-5:1.9.2.1 milter-greylist-4-3-6:1.10 milter-greylist-4-2-4:1.9.2.1 milter-greylist-4-3-5:1.10 milter-greylist-4-3-4:1.9 milter-greylist-4-2-3:1.9 milter-greylist-4-3-3:1.9 rmilter-greylist-4-2-3:1.9 milter-greylist-4-3-2:1.9 milter-greylist-4-3-1:1.9 milter-greylist-2-2-2:1.9 milter-greylist-4-2-2:1.9 milter-greylist-4-2-1:1.9 milter-greylist-4-2:1.9 milter-greylist-4-2-rc1:1.9 milter-greylist-4-2-beta1:1.9 milter-greylist-4-2-branch:1.9.0.2 milter-greylist-4-2-base:1.9 milter-greylist-4-2-0-base:1.9 milter-greylist-4-1-12:1.9 milter-greylist-4-1-11:1.9 milter-greylist-4-1-10:1.9 milter-greylist-4-1-9:1.9 milter-greylist-4-1-8:1.9 milter-greylist-4-1-7:1.9 milter-greylist-4-1-6:1.8 milter-greylist-4-0-1:1.8 milter-greylist-4-0-1-rc1:1.8 milter-greylist-4-1-5:1.8 milter-greylist-4-1-4:1.8 milter-greylist-4-1-3:1.8 milter-greylist-4-1-2:1.8 milter-greylist-4-1-1:1.8 milter-greylist-4-0-branch:1.8.0.2 milter-greylist-4-0-base:1.8 milter-greylist-4-0:1.8 milter-greylist-4-0-rc2:1.8 milter-greylist-4-0-rc1:1.8 milter-greylist-4-0-beta4:1.8 milter-greylist-4-0-beta3:1.8 milter-greylist-4-0-beta2:1.8 milter-greylist-4-0-beta1:1.8 milter-greylist-4-0-alpha6:1.8 milter-greylist-4-0-alpha5:1.8 milter-greylist-4-0-alpha4:1.8 milter-greylist-4-0-alpha3:1.8 milter-greylist-4-0-alpha2:1.8 milter-greylist-4-0-alpha1:1.8 milter-greylist-3-1-8:1.8 milter-greylist-3-1-7:1.8 milter-greylist-3-1-6:1.8 milter-greylist-1-3-6:1.8 milter-greylist-3-1-5:1.8 milter-greylist-3-1-5-alpha1:1.7 milter-greylist-3-0-1-beta1:1.4.2.1 milter-greylist-3-1-4:1.7 milter-greylist-3-1-3:1.5 milter-greylist-3-1-2:1.5 milter-greylist-3-1-1:1.4 milter-greylist-3-0:1.4 milter-greylist-3-0-rc7:1.4 milter-greylist-3-0-rc6:1.4 milter-greylist-3-0-rc5:1.4 milter-greylist-3-0-rc4:1.4 milter-greylist-3-0-rc3:1.4 milter-greylist-3-0-rc2:1.4 milter-greylist-3-0-rc1:1.4 milter-greylist-3-0-alpha6:1.4 milter-greylist-3-0-branch:1.4.0.2 milter-greylist-3-0-base:1.4 milter-greylist-3-0-alpha5:1.4 milter-greylist-3-0-alpha4:1.4 milter-greylist-3-0-alpha3:1.4 milter-greylist-3-0-alpha2:1.4 milter-greylist-3-0-alpha1:1.4 milter-greylist-2-1-12:1.4 milter-greylist-2-1-11:1.4 milter-greylist-2-1-10:1.4 milter-greylist-2-1-9:1.4 milter-greylist-2-1-9a1:1.4 milter-greylist-2-1-8:1.4 milter-greylist-2-1-7:1.4 milter-greylist-2-1-6:1.4 milter-greylist-2-1-5:1.4 milter-greylist-2-1-4:1.4 milter-greylist-2-1-3:1.4 milter-greylist-2-1-2:1.4 milter-greylist-2-1-1:1.4 milter-greylist-2-0-2:1.4 milter-greylist-2-0-1:1.4 milter-greylist-2-0-1-b1:1.4 milter-greylist-2-0-release:1.4 milter-greylist-2-0-rc5:1.4 milter-greylist-2-0-rc4:1.4 milter-greylist-2-0-rc3:1.4 milter-grey-list-2-0-rc3:1.4 milter-grey-list-2-0-rc2:1.4 milter-grey-list-2-0-rc1:1.4 milter-greylist-2-0-beta7:1.3 milter-greylist-2-0-beta6:1.3 milter-gre-ylist-2-0-beta5:1.3 milter-greylist-2-0-beta5:1.3 milter-greylist-2-0-beta4:1.3 milter-greylist-2-0-beta3:1.3 milter-greylist-2-0-beta2:1.2 milter-greylist-2-0:1.2.0.2 milter-greylist-2-0-base:1.2 milter-greylist-2-0-beta1:1.2 milter-greylist-1-7-5:1.1 before_delayed_tempfail:1.1; locks; strict; comment @# @; 1.12 date 2012.09.11.04.29.19; author manu; state Exp; branches; next 1.11; 1.11 date 2012.03.17.13.38.45; author manu; state Exp; branches; next 1.10; 1.10 date 2010.03.13.07.04.10; author manu; state Exp; branches; next 1.9; 1.9 date 2008.10.03.23.27.40; author manu; state Exp; branches 1.9.2.1; next 1.8; 1.8 date 2007.02.07.00.11.56; author manu; state Exp; branches; next 1.7; 1.7 date 2007.01.16.04.57.27; author manu; state Exp; branches; next 1.6; 1.6 date 2007.01.04.05.04.13; author manu; state Exp; branches; next 1.5; 1.5 date 2006.12.18.22.15.02; author manu; state Exp; branches; next 1.4; 1.4 date 2005.05.11.19.57.45; author manu; state Exp; branches 1.4.2.1; next 1.3; 1.3 date 2005.03.17.20.31.51; author manu; state Exp; branches; next 1.2; 1.2 date 2005.02.06.10.45.55; author manu; state Exp; branches; next 1.1; 1.1 date 2005.01.08.15.11.43; author manu; state Exp; branches; next ; 1.9.2.1 date 2010.03.13.07.09.33; author manu; state Exp; branches; next ; 1.4.2.1 date 2007.01.22.22.36.48; author manu; state Exp; branches; next ; desc @@ 1.12 log @Mkdir parent dir for pidfile/socket/dumpfile Add helpful error message if mkdir fails Fix duplicate logging when run with -D via systemd @ text @# $Id: milter-greylist.spec.in,v 1.11 2012/03/17 13:38:45 manu Exp $ # Contributed by Ivan F. Martinez %define ver @@PACKAGE_VERSION@@ %define rel 1 %define user grmilter %{?build_user:%define user %{build_user}} %define postfix 0 %{?build_postfix:%define postfix 1} %define dnsrbl 0 %{?build_dnsrbl:%define dnsrbl 1} %define libbind 0 %{?build_libbind:%define libbind 1} %define libspf2 0 %{?build_libspf2:%define libspf2 1} %define libGeoIP 0 %{?build_libGeoIP:%define libGeoIP 1} %define libcurl 0 %{?build_libcurl:%define libcurl 1} %define p0f 0 %{?build_p0f:%define p0f 1} %define libdkim 0 %{?build_libdkim:%define libdkim 1} %define bldmx 0 %{?build_mx:%define bldmx 1} %if ! %{postfix} Summary: GreyList milter for Sendmail %else Summary: GreyList milter for Postfix %endif Name: milter-greylist Version: %ver Release: %rel Group: System Environment/Daemons License: 3-clause BSD license Source0: ftp://ftp.espci.fr/pub/milter-greylist/%{name}-%{version}.tgz URL: http://hcpnet.free.fr/milter-greylist/ BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) %if ! %{postfix} Requires: sendmail >= 8.11 Requires: sendmail-cf >= 8.11 %else Requires: postfix >= 2.3 %endif BuildRequires: sendmail-devel >= 8.11 BuildRequires: flex BuildRequires: bison %if %{libbind} BuildRequires: bind-libbind-devel %endif %if %{libspf2} BuildRequires: libspf2-devel %endif %if %{libcurl} BuildRequires: curl-devel %endif %if %{libGeoIP} BuildRequires: GeoIP-devel %endif %description milter-greylist is a stand-alone milter written in C that implements the greylist filtering method, as proposed by Evan Harris. Grey listing works by assuming that unlike legitimate MTA, spam engines will not retry sending their junk mail on a temporary error. The filter will always temporarily reject mail on a first attempt, and to accept it after some time has elapsed. If spammers ever try to resend rejected messages, we can assume they will not stay idle between the two sends (if they do, the spam problem would just be solved). Odds are good that the spammer will send a mail to an honey pot address and get blacklisted in several real-time distributed black list before the second attempt. %prep %setup -q %build %configure \ --with-user=%{user} \ %if %{postfix} --enable-postfix \ %endif %if %{dnsrbl} --enable-dnsrbl \ %endif %if %{p0f} --enable-p0f \ %endif %if %{libbind} --with-libbind \ %endif %if %{libspf2} --with-libspf2 \ %endif %if %{libcurl} --with-libcurl \ %endif %if %{libGeoIP} --with-libGeoIP \ %endif %if %{libdkim} --with-libdkim=/usr/include \ %endif %if %{bldmx} --enable-mx \ %endif %{__make} %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/mail mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/milter-greylist mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/sendmail-cf/feature install -m 755 rc-redhat.sh ${RPM_BUILD_ROOT}%{_initrddir}/milter-greylist install -m 644 milter-greylist.m4 ${RPM_BUILD_ROOT}%{_datadir}/sendmail-cf/feature/milter-greylist.m4 touch ${RPM_BUILD_ROOT}%{_localstatedir}/milter-greylist/greylist.db # use root user, as the %files section define the correct install user make DESTDIR=${RPM_BUILD_ROOT} USER=root install %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %pre /usr/bin/id "%{user}" &> /dev/null if [ $? -ne 0 ] then /usr/sbin/useradd -r -d /etc/mail -s /sbin/nologin \ -c "GreyList Milter" %{user} >/dev/null 2>&1 || : fi %post /sbin/chkconfig --add milter-greylist %if ! %{postfix} /bin/grep -q -E '(FEATURE|INPUT_MAIL_FILTER).*milter-greylist' /etc/mail/sendmail.mc if [ $? -ne 0 ] then echo "You can enable milter-greylist in your sendmail, adding the line : " echo "FEATURE(\`milter-greylist')dnl" echo "to /etc/mail/sendmail.mc file" fi %endif %preun if [ $1 -eq 0 ]; then /sbin/service milter-greylist stop > /dev/null 2>&1 || : /sbin/chkconfig --del milter-greylist %if ! %{postfix} /bin/grep -q -E '(FEATURE|INPUT_MAIL_FILTER).*milter-greylist' /etc/mail/sendmail.mc if [ $? -eq 0 ] then echo "You must remove the milter-greylist config" echo "from /etc/mail/sendmail.mc file" fi %endif fi %postun if [ $1 -eq 0 ]; then rm -rf %{_localstatedir}/milter-greylist/ grep -q "$%{user}:.*GreyList Milter:" if [ $? -eq 0 ] then /usr/sbin/userdel %{user} >/dev/null 2>&1 || : /usr/sbin/groupdel %{user} >/dev/null 2>&1 || : fi else /sbin/service milter-greylist condrestart > /dev/null 2>&1 || : fi %files %defattr(-,root,root) %doc README ChangeLog %config (noreplace) %{_sysconfdir}/mail/greylist.conf %{_initrddir}/milter-greylist %{_bindir}/milter-greylist %{_mandir}/man5/greylist.conf.5.gz %{_mandir}/man8/milter-greylist.8.gz %{_datadir}/sendmail-cf/feature/milter-greylist.m4 %dir %attr(-,%{user},root) %{_localstatedir}/milter-greylist %attr(0600,%{user},root) %ghost %{_localstatedir}/milter-greylist/greylist.db %changelog * Mon Sep 10 2012 Murty Rompalli - Mkdir parent dir for pidfile/socket/dumpfile - Add helpful error message if mkdir fails - Fix duplicate logging when run with -D via systemd * Fri Mar 16 2012 Rudy Eschauzier - added build_libdkim and build_mx support * Wed Mar 10 2010 Chris Bennett (cgb) - added build_GeoIP, build_libcurl, build_p0f * Tue Aug 26 2008 Joe Pruett - added build_spf2 * Thu Jan 4 2007 Nerijus Baliunas 3.1.4-1 - added build_user, build_postfix, build_dnsrbl, build_libbind definitions * Sun Mar 13 2005 Petr Kristof 1.7.4-3 - support for running as specific user * Tue Jan 25 2005 Petr Kristof 1.7.4-3 - Use more %macros - Add conditional restart during upgrade - Fixed %postun cleanup - Add %ghost for greylist.db * Mon Jan 17 2005 Ivan F. Martinez 1.7.4-2 - added check for milter-greylist in sendmail.mc on post * Wed Jan 5 2005 Horst H. von Brand 1.7.4-1 - Updated version - Added missing installed milter-greylist.m4 file - Need sendmail-cf if installing above - Requires bison for building * Thu Dec 16 2004 Ivan F. Martinez 1.7.3-1 - updated to new version * Wed Dec 8 2004 Ivan F. Martinez 1.6rc1-1 - initial release @ 1.11 log @buildmx and builddkim for RPM, fix libm dependency (Rudy Eschauzier) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.10 2010/03/13 07:04:10 manu Exp $ d206 5 @ 1.10 log @Update .spec file for libcurl, GeoIP and p0f support (Chris Bennett) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.9 2008/10/03 23:27:40 manu Exp $ d7 1 a7 1 %define user root d31 6 d117 7 d206 3 @ 1.9 log @Add libspf2 support to .spec file for RPM (Joe Pruett) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.8 2007/02/07 00:11:56 manu Exp $ d22 9 d60 6 d96 3 d100 1 a100 1 --with-libbind d103 7 a109 1 --with-libspf2 d193 3 @ 1.9.2.1 log @Update .spec file for libcurl, GeoIP and p0f support (Chris Bennett) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.9 2008/10/03 23:27:40 manu Exp $ a21 9 %define libGeoIP 0 %{?build_libGeoIP:%define libGeoIP 1} %define libcurl 0 %{?build_libcurl:%define libcurl 1} %define p0f 0 %{?build_p0f:%define p0f 1} a50 6 %if %{libcurl} BuildRequires: curl-devel %endif %if %{libGeoIP} BuildRequires: GeoIP-devel %endif a80 3 %if %{p0f} --enable-p0f \ %endif d82 1 a82 1 --with-libbind \ d85 1 a85 7 --with-libspf2 \ %endif %if %{libcurl} --with-libcurl \ %endif %if %{libGeoIP} --with-libGeoIP \ a168 3 * Wed Mar 10 2010 Chris Bennett (cgb) - added build_GeoIP, build_libcurl, build_p0f @ 1.8 log @Set default user to root in .spec file @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.7 2007/01/16 04:57:27 manu Exp $ d19 3 d48 3 d83 3 a85 1 d169 3 @ 1.7 log @postfix support @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.6 2007/01/04 05:04:13 manu Exp $ d7 1 a7 1 %define user @@USER@@ @ 1.6 log @Update .spec for Postfix (Nerijus Baliunas) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.5 2006/12/18 22:15:02 manu Exp $ d36 2 @ 1.5 log @Add DNSRBL support to .spec file @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.4 2005/05/11 19:57:45 manu Exp $ d3 1 d6 1 d8 7 d16 8 a23 1 Summary: GreyList milter for sendmail d33 1 d36 1 d40 1 d42 1 d65 13 a77 1 %configure --with-user=%{user} --enable-dnsrbl --with-libbind d108 1 d116 1 d123 1 d127 1 a127 1 echo "You you must remove the milter-greylist config" d130 1 d159 3 @ 1.4 log @Only sendmail 8.11 is required (.spec file) @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.3 2005/03/17 20:31:51 manu Exp $ d22 1 d45 1 a45 1 %configure --with-user=%{user} @ 1.4.2.1 log @Postfix support bump to 3.0.1b1 @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.6 2007/01/04 05:04:13 manu Exp $ a2 1 a4 1 a5 4 %{?build_user:%define user %{build_user}} %define postfix 0 %{?build_postfix:%define postfix 1} d7 1 a7 11 %define dnsrbl 0 %{?build_dnsrbl:%define dnsrbl 1} %define libbind 0 %{?build_libbind:%define libbind 1} %if ! %{postfix} Summary: GreyList milter for Sendmail %else Summary: GreyList milter for Postfix %endif a16 1 %if ! %{postfix} a18 1 %endif d44 1 a44 6 %configure \ %if %{postfix} --enable-postfix \ %endif --with-user=%{user} a74 1 %if ! %{postfix} a81 1 %endif a87 1 %if ! %{postfix} d91 1 a91 1 echo "You must remove the milter-greylist config" a93 1 %endif a121 3 * Thu Jan 4 2007 Nerijus Baliunas 3.1.4-1 - added build_user, build_postfix, build_dnsrbl, build_libbind definitions @ 1.3 log @updated .spec file for not using root priv at startup. @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.2 2005/02/06 10:45:55 manu Exp $ d17 3 a19 3 Requires: sendmail >= 8.12 Requires: sendmail-cf >= 8.12 BuildRequires: sendmail-devel >= 8.12 @ 1.2 log @Updated .spec file @ text @d1 1 a1 1 # $Id: milter-greylist.spec.in,v 1.1 2005/01/08 15:11:43 manu Exp $ d58 5 a62 1 make DESTDIR=${RPM_BUILD_ROOT} install d65 7 d85 1 a85 1 if [ $1 = 0 ]; then d99 7 a105 1 else d122 3 @ 1.1 log @updated spec file. @ text @d1 1 a1 1 # $Id: milter-greylist.spec,v 1.1 2004/12/17 22:37:43 manu Exp $ d11 1 a11 1 Group: System Environment/Daemons d15 1 a15 1 BuildRoot: %{_tmppath}/%{name}-%{version} d17 2 a18 1 Requires: sendmail >= 8.12, sendmail-cf >= 8.12 d20 2 a21 1 BuildRequires: flex, bison d44 3 a46 2 ./configure --prefix=%{_prefix} --mandir=%{_mandir} --with-user=%{user} make d51 3 a53 3 mkdir -p ${RPM_BUILD_ROOT}/etc/mail mkdir -p ${RPM_BUILD_ROOT}/var/milter-greylist mkdir -p ${RPM_BUILD_ROOT}/usr/share/sendmail-cf/feature d57 1 d64 8 d75 1 d85 7 d95 1 a95 1 %config (noreplace) /etc/mail/greylist.conf d97 1 a97 2 %{_prefix}/bin/milter-greylist %{_datadir}/sendmail-cf/feature/milter-greylist.m4 d100 3 a102 1 %dir %attr(-,%{user},root) /var/milter-greylist d105 9 @