|
|
b3ba585 |
Name: milter-regex
|
|
|
542bd18 |
Version: 2.0
|
|
|
4fc7127 |
Release: 3%{?dist}
|
|
|
e7f0a3b |
Summary: Milter plug-in for regular expression filtering
|
|
|
b3ba585 |
Group: System Environment/Daemons
|
|
|
b3ba585 |
License: BSD
|
|
|
b3ba585 |
URL: http://www.benzedrine.cx/milter-regex.html
|
|
|
b3ba585 |
Source0: http://www.benzedrine.cx/milter-regex-%{version}.tar.gz
|
|
|
e7f0a3b |
Source1: milter-regex.service
|
|
|
b3ba585 |
Source2: milter-regex-options
|
|
|
b3ba585 |
Source3: milter-regex.conf
|
|
|
b3ba585 |
Buildrequires: sendmail-devel >= 8.13, byacc, groff
|
|
|
e7f0a3b |
BuildRequires: systemd-units
|
|
|
b3ba585 |
|
|
|
e7f0a3b |
Requires(pre): shadow-utils
|
|
|
e7f0a3b |
Requires(post): systemd-units
|
|
|
e7f0a3b |
Requires(preun): systemd-units
|
|
|
e7f0a3b |
Requires(postun): systemd-units
|
|
|
174e586 |
|
|
|
174e586 |
%description
|
|
|
174e586 |
Milter-regex is a milter based filter that makes it possible to filter
|
|
|
174e586 |
emails using regular expressions.
|
|
|
174e586 |
|
|
|
174e586 |
%prep
|
|
|
b3ba585 |
%setup -q
|
|
|
8f77fea |
|
|
|
8f77fea |
# Customize config file location and dæmon user
|
|
|
e7f0a3b |
sed -i -e 's|/etc/milter-regex\.conf|%{_sysconfdir}/mail/milter-regex.conf|;
|
|
|
e7f0a3b |
s|_milter-regex|mregex|' milter-regex.[8c]
|
|
|
8f77fea |
|
|
|
8f77fea |
# Copy out the license text from the source code
|
|
|
e7f0a3b |
head -n +31 milter-regex.c > LICENSE
|
|
|
174e586 |
|
|
|
174e586 |
%build
|
|
|
06e076c |
make %{?_smp_mflags} -f Makefile.linux CFLAGS="%{optflags} -Wextra -Wwrite-strings -DYYMAXDEPTH=8192"
|
|
|
174e586 |
|
|
|
174e586 |
%install
|
|
|
e7f0a3b |
mkdir -p \
|
|
|
e7f0a3b |
%{buildroot}%{_unitdir} \
|
|
|
b3ba585 |
%{buildroot}%{_localstatedir}/spool/milter-regex \
|
|
|
b3ba585 |
%{buildroot}%{_mandir}/man8 \
|
|
|
b3ba585 |
%{buildroot}%{_sbindir} \
|
|
|
b3ba585 |
%{buildroot}%{_sysconfdir}/{mail,sysconfig}
|
|
|
e7f0a3b |
install -p -m 755 milter-regex %{buildroot}%{_sbindir}/
|
|
|
e7f0a3b |
install -p -m 644 milter-regex.8 %{buildroot}%{_mandir}/man8/
|
|
|
e7f0a3b |
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/milter-regex.service
|
|
|
e7f0a3b |
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/milter-regex
|
|
|
e7f0a3b |
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mail/milter-regex.conf
|
|
|
174e586 |
|
|
|
174e586 |
# Create a ghost sock file so we can remove it on package deletion
|
|
|
174e586 |
: > %{buildroot}%{_localstatedir}/spool/milter-regex/sock
|
|
|
174e586 |
|
|
|
174e586 |
%pre
|
|
|
b3ba585 |
/usr/bin/getent group mregex >/dev/null || /usr/sbin/groupadd -r mregex
|
|
|
b3ba585 |
/usr/bin/getent passwd mregex >/dev/null || \
|
|
|
b3ba585 |
/usr/sbin/useradd -r -g mregex -d %{_localstatedir}/spool/milter-regex \
|
|
|
b3ba585 |
-s /sbin/nologin -c "Regex Milter" mregex
|
|
|
b3ba585 |
exit 0
|
|
|
174e586 |
|
|
|
174e586 |
%post
|
|
|
549e679 |
%systemd_post milter-regex.service
|
|
|
174e586 |
|
|
|
174e586 |
%preun
|
|
|
549e679 |
%systemd_preun milter-regex.service
|
|
|
174e586 |
|
|
|
174e586 |
%postun
|
|
|
549e679 |
%systemd_postun_with_restart milter-regex.service
|
|
|
174e586 |
|
|
|
174e586 |
%files
|
|
|
174e586 |
%doc LICENSE
|
|
|
174e586 |
%{_sbindir}/milter-regex
|
|
|
e7f0a3b |
%{_unitdir}/milter-regex.service
|
|
|
174e586 |
%config(noreplace) %{_sysconfdir}/sysconfig/milter-regex
|
|
|
174e586 |
%config(noreplace) %{_sysconfdir}/mail/milter-regex.conf
|
|
|
2a0fd92 |
%dir %attr(755,mregex,mregex) %{_localstatedir}/spool/milter-regex/
|
|
|
174e586 |
%ghost %{_localstatedir}/spool/milter-regex/sock
|
|
|
174e586 |
%{_mandir}/man8/milter-regex.8*
|
|
|
174e586 |
|
|
|
174e586 |
%changelog
|
|
|
4fc7127 |
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-3
|
|
|
4fc7127 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
4fc7127 |
|
|
|
383dd2e |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-2
|
|
|
383dd2e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
383dd2e |
|
|
|
542bd18 |
* Mon Nov 25 2013 Paul Howarth <paul@city-fan.org> - 2.0-1
|
|
|
542bd18 |
- update to 2.0
|
|
|
542bd18 |
- add -l option to specify maximum log level
|
|
|
542bd18 |
- drop upstreamed cleanup and starttls patches
|
|
|
542bd18 |
|
|
|
322ed71 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-7
|
|
|
542bd18 |
- rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
322ed71 |
|
|
|
7b0ea80 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-6
|
|
|
542bd18 |
- rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
7b0ea80 |
|
|
|
4c67770 |
* Fri Sep 7 2012 Paul Howarth <paul@city-fan.org> - 1.9-5
|
|
|
4c67770 |
- drop SysV-to-systemd migration support from F-18 onwards
|
|
|
549e679 |
- use systemd scriptlet macros for preset support (#850207)
|
|
|
4c67770 |
|
|
|
829fca1 |
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-4
|
|
|
4c67770 |
- rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
829fca1 |
|
|
|
8f77fea |
* Tue Jul 17 2012 Paul Howarth <paul@city-fan.org> - 1.9-3
|
|
|
8f77fea |
- add support for STARTTLS macro checking (#840665)
|
|
|
8f77fea |
- defer dæmon startup until network is available
|
|
|
8f77fea |
|
|
|
1513baa |
* Fri Jan 6 2012 Paul Howarth <paul@city-fan.org> - 1.9-2
|
|
|
1513baa |
- rebuilt for gcc 4.7
|
|
|
1513baa |
|
|
|
06e076c |
* Tue Nov 22 2011 Paul Howarth <paul@city-fan.org> - 1.9-1
|
|
|
06e076c |
- update to 1.9
|
|
|
06e076c |
- add -j option to chroot
|
|
|
06e076c |
- improve building on various platforms
|
|
|
06e076c |
- fix some typos in documentation and example config
|
|
|
06e076c |
- drop upstreamed strlcat patch
|
|
|
06e076c |
- drop gcc patch, no longer needed
|
|
|
06e076c |
- build with additional warnings enabled, and add patch to fix warnings where
|
|
|
06e076c |
possible (libmilter API is missing some 'const' attributes, so it's not
|
|
|
06e076c |
possible to get rid of all of them)
|
|
|
06e076c |
|
|
|
41aad00 |
* Mon Jul 25 2011 Paul Howarth <paul@city-fan.org> - 1.8-4
|
|
|
41aad00 |
- Requires(post): systemd-sysv for sysv-to-systemd migration
|
|
|
41aad00 |
|
|
|
e7f0a3b |
* Sat Jul 16 2011 Paul Howarth <paul@city-fan.org> - 1.8-3
|
|
|
e7f0a3b |
- switch from SysV initscript to systemd unit file
|
|
|
e7f0a3b |
- clean up for modern rpmbuild
|
|
|
e7f0a3b |
- drop Sendmail references as the milter should work with Postfix too
|
|
|
e7f0a3b |
- nobody else likes macros for commands
|
|
|
e7f0a3b |
|
|
|
cdade1c |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
|
|
|
e7f0a3b |
- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
cdade1c |
|
|
|
bb31b40 |
* Fri Aug 13 2010 Paul Howarth <paul@city-fan.org> - 1.8-1
|
|
|
bb31b40 |
- update to 1.8 (log symbolic host name together with numeric IP address)
|
|
|
bb31b40 |
- add missing function strlcat from openbsd libc
|
|
|
bb31b40 |
- fix %%postun to restart the milter properly on package upgrades
|
|
|
bb31b40 |
- use %%{_initddir} rather than the deprecated %%{_initrddir} where possible
|
|
|
bb31b40 |
|
|
|
46de781 |
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-6
|
|
|
bb31b40 |
- rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
46de781 |
|
|
|
194749d |
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-5
|
|
|
bb31b40 |
- rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
194749d |
|
|
|
e16af9b |
* Fri Feb 13 2009 Paul Howarth <paul@city-fan.org> - 1.7-4
|
|
|
bb31b40 |
- rebuild for shared libmilter in Fedora 11 development
|
|
|
e16af9b |
|
|
|
0a744b1 |
* Mon Feb 18 2008 Paul Howarth <paul@city-fan.org> - 1.7-3
|
|
|
0a744b1 |
- support config files with more than 507 rules (#304071)
|
|
|
0a744b1 |
|
|
|
c9ffdcf |
* Wed Aug 22 2007 Paul Howarth <paul@city-fan.org> - 1.7-2
|
|
|
c9ffdcf |
- rebuild for BuildID inclusion
|
|
|
c9ffdcf |
(http://fedoraproject.org/wiki/Releases/FeatureBuildId)
|
|
|
c9ffdcf |
|
|
|
b3ba585 |
* Mon Aug 6 2007 Paul Howarth <paul@city-fan.org> - 1.7-1
|
|
|
b3ba585 |
- update to 1.7 (sendmail macro filtering support added)
|
|
|
b3ba585 |
- tarball now includes a versioned directory name
|
|
|
b3ba585 |
- split milter-regex.conf out from being a here document in the spec and have
|
|
|
b3ba585 |
it as a separate source file instead
|
|
|
b3ba585 |
- unexpand tabs
|
|
|
b3ba585 |
- use the standard scriptlet for user/group creation in %%pre
|
|
|
b3ba585 |
- use %%{_initrddir} rather than %%{_sysconfdir}/rc.d/init.d for initscript
|
|
|
b3ba585 |
- use %%{__install} rather than %%{__cp} in %%install
|
|
|
b3ba585 |
- drop scriptlet dependencies on /sbin/service by calling initscript directly
|
|
|
b3ba585 |
- LSB-ize initscript (#246983)
|
|
|
b3ba585 |
|
|
|
2a0fd92 |
* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> - 1.6-7
|
|
|
2a0fd92 |
- add patch for compile errors on Fedora 7
|
|
|
2a0fd92 |
- use sed rather than perl for quick scripted edits
|
|
|
2a0fd92 |
|
|
|
cbc38c7 |
* Tue Aug 29 2006 Paul Howarth <paul@city-fan.org> - 1.6-6
|
|
|
cbc38c7 |
- rebuild for dynamic linking speedups (FE6)
|
|
|
cbc38c7 |
|
|
|
174e586 |
* Thu May 25 2006 Paul Howarth <paul@city-fan.org> - 1.6-5
|
|
|
174e586 |
- Address issues raised in review (#189611)
|
|
|
b3ba585 |
- Add sendmail dependency
|
|
|
b3ba585 |
- Honor %%{optflags}
|
|
|
174e586 |
|
|
|
174e586 |
* Fri Apr 21 2006 Paul Howarth <paul@city-fan.org> - 1.6-4
|
|
|
174e586 |
- Minor cosmetic changes for resubmission for Fedora Extras
|
|
|
174e586 |
|
|
|
174e586 |
* Fri Nov 18 2005 Paul Howarth <paul@city-fan.org> - 1.6-3
|
|
|
174e586 |
- Remove redundant ver_ and rel_ macros
|
|
|
174e586 |
- Don't include package name in the summary
|
|
|
174e586 |
- Use macros consistently
|
|
|
174e586 |
- Generate LICENSE file in %%prep rather than %%install
|
|
|
174e586 |
- Don't strip binary, so debuginfo package is useful
|
|
|
174e586 |
- Combine groupadd+useradd into a single useradd command
|
|
|
174e586 |
- Use /sbin/nologin for mregex shell instead of non-existent /bin/nologin
|
|
|
174e586 |
- Don't delete user+group on package removal (see
|
|
|
174e586 |
http://www.redhat.com/archives/fedora-extras-commits/2005-June/msg00271.html)
|
|
|
174e586 |
- Install initscript in %%{_sysconfdir} rather than /etc/init.d
|
|
|
174e586 |
- Don't enable service by default on installation
|
|
|
174e586 |
- Add scriptlet dependencies
|
|
|
174e586 |
- Add buildreq groff
|
|
|
174e586 |
- Use full URL for source
|
|
|
174e586 |
- Edit username in man page as well as in code
|
|
|
174e586 |
- Use install rather than cp to install %%{SOURCE1} and %%{SOURCE2} so
|
|
|
174e586 |
that permissions don't need to be set in SRPM
|
|
|
174e586 |
- Ghost the socket for clean package removal
|
|
|
174e586 |
- Buildreq sendmail-devel >= 8.13.0 because of the use of SMFIF_QUARANTINE
|
|
|
174e586 |
- Use dist tag
|
|
|
174e586 |
|
|
|
174e586 |
* Tue Jan 25 2005 Victor Ramirez <vramirez@gmail.com> - 1.6-2
|
|
|
174e586 |
- Initial rpm release
|
|
|
174e586 |
- Modified user and configuration file location.
|
|
|
174e586 |
|