%if 0%{?fedora} >= 43 ExcludeArch: %{ix86} %endif Summary: A DMARC milter and library Name: opendmarc Version: 1.4.2 Release: %autorelease License: BSD-3-Clause AND Sendmail-Open-Source-1.1 URL: http://www.trusteddomain.org/opendmarc.html Source: https://github.com/trusteddomainproject/OpenDMARC/archive/refs/tags/rel-opendmarc-1-4-2.tar.gz # Patch for ticket 159 and 179 # fixes opendmarc-importstats script up for mysql Patch01: opendmarc-1.4.0-ticket159-179.patch # improve mysql and support strict mode # Unfortunately, this patchset no longer applies and there's changes, so it needs rebasing # by someone who knows the code well. # Patch03: %%{name}.ticket193.patch # Patch for non security bug cve-2024-25768 # https://github.com/trusteddomainproject/OpenDMARC/issues/256 Patch02: cve-2024-25768.patch # Correctly persist SPF include and library paths. # This prevents build failures in strict environments like rpmbuild. # https://github.com/trusteddomainproject/OpenDMARC/pull/287 Patch: 0001-Fix-configure-Correctly-persist-SPF-include-and-libr.patch # rhbz 2177653 # Fix for several segfauls # https://github.com/trusteddomainproject/OpenDMARC/pull/223 # https://github.com/trusteddomainproject/OpenDMARC/pull/224 # https://github.com/trusteddomainproject/OpenDMARC/pull/225 # https://github.com/trusteddomainproject/OpenDMARC/issues/183 # https://github.com/trusteddomainproject/OpenDMARC/issues/222 Patch: 223.patch Patch: 224.patch Patch: 225.patch # Fix https://github.com/trusteddomainproject/OpenDMARC/issues/274 Patch: 0001-libopendmarc-fix-NULL-pointer-deref-in-opendmarc_spf.patch # Required for all versions Requires: lib%{name}%{?_isa} = %{version}-%{release} %if (0%{?rhel} < 11) || (0%{?fedora} < 43) Requires(pre): shadow-utils %endif BuildRequires: autoconf BuildRequires: automake BuildRequires: make BuildRequires: libbsd BuildRequires: libbsd-devel BuildRequires: libspf2-devel BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: perl-generators BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros BuildRequires: mariadb-connector-c-devel BuildRequires: sendmail-milter-devel Suggests: %{name}-tools%{?_isa} = %{version}-%{release} %description OpenDMARC (Domain-based Message Authentication, Reporting & Conformance) provides an open source library that implements the DMARC verification service plus a milter-based filter application that can plug in to any milter-aware MTA, including sendmail, Postfix, or any other MTA that supports the milter protocol. The DMARC sender authentication system is still a draft standard, working towards RFC status. The database schema required for some functions is provided in %{_datadir}/%{name}/db. The rddmarc tools are provided in %{_datadir}/%{name}/contrib/rddmarc. %package -n opendmarc-tools Summary: Tools for opendmarc Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n opendmarc-tools This package contains the util binaries for opendmarc, including: - opendmarc-expire - opendmarc-import - opendmarc-importstats - opendmarc-params - opendmarc-reports %package -n libopendmarc Summary: An open source DMARC library %description -n libopendmarc This package contains the library files required for running services built using libopendmarc. %package -n libopendmarc-devel Summary: Development files for libopendmarc Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n lib%{name}-devel This package contains the static libraries, headers, and other support files required for developing applications against libopendmarc. %prep %autosetup -p1 -n OpenDMARC-rel-opendmarc-1-4-2 %if (0%{?rhel} >= 11) || (0%{?fedora} >= 43) # Create a sysusers.d config file cat >opendmarc.sysusers.conf < %{buildroot}%{_sysconfdir}/sysconfig/%{name} << 'EOF' # Set the necessary startup options OPTIONS="-c %{_sysconfdir}/%{name}.conf" EOF install -d -m 0755 %{buildroot}%{_unitdir} cat > %{buildroot}%{_unitdir}/%{name}.service <= 11) || (0%{?fedora} >= 43) install -m0644 -D opendmarc.sysusers.conf %{buildroot}%{_sysusersdir}/opendmarc.conf %else %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -G mail -d %{_rundir}/%{name} -s /sbin/nologin \ -c "OpenDMARC Milter" %{name} exit 0 %endif %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %ldconfig_scriptlets -n libopendmarc %files %license LICENSE LICENSE.Sendmail %doc README RELEASE_NOTES %config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_datadir}/%{name} %{_sbindir}/opendmarc %{_sbindir}/opendmarc-check %{_mandir}/man5/opendmarc.conf.5* %{_mandir}/man8/opendmarc.8* %{_mandir}/man8/opendmarc-check.8* %dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name} %dir %attr(710,%{name},mail) %{_rundir}/%{name} %dir %attr(-,%{name},%{name}) %{_sysconfdir}/%{name} %attr(0644,root,root) %{_unitdir}/%{name}.service %if (0%{?rhel} >= 11) || (0%{?fedora} >= 43) %{_sysusersdir}/opendmarc.conf %endif %files -n opendmarc-tools %{_sbindir}/opendmarc-expire %{_sbindir}/opendmarc-import %{_sbindir}/opendmarc-importstats %{_sbindir}/opendmarc-params %{_sbindir}/opendmarc-reports %{_mandir}/man8/opendmarc-expire.8* %{_mandir}/man8/opendmarc-import.8* %{_mandir}/man8/opendmarc-importstats.8* %{_mandir}/man8/opendmarc-params.8* %{_mandir}/man8/opendmarc-reports.8* %files -n libopendmarc %{_libdir}/lib%{name}.so.* %files -n libopendmarc-devel %doc lib%{name}/docs/*.html %{_includedir}/%{name} %{_libdir}/*.so %changelog %autochangelog