From 83557f85e328fb1a0a4f52231e67420b6fdb3f5b Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:26:11 +0100 Subject: [PATCH] keep standard main.cf, provide virtualdomains main.cf as template file main.cf.virtualdomains [release 3.8.4-2mamba;Fri Dec 29 2023] --- postfix.spec | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/postfix.spec b/postfix.spec index c27103d..ab3c371 100644 --- a/postfix.spec +++ b/postfix.spec @@ -9,7 +9,7 @@ Name: postfix Version: 3.8.4 -Release: 1mamba +Release: 2mamba Summary: A fast, easy to administer, and secure mail transfer agent Group: System/Servers Vendor: openmamba @@ -54,11 +54,13 @@ Group: System/Servers Requires: mysql >= 4.1.22 Requires: mysql-client Requires: %{name} = %{version}-%{release} -Obsoletes: postfix-mysql +Obsoletes: postfix-mysql < 3.8.4-2mamba %description virtualdomains-mysql virtualdomains addon package for Postfix with mysql. This package is intended for using Postfix with mysql for managing virtual domains. +%debug_package + %prep %setup -q #%patch0 -p1 @@ -93,7 +95,8 @@ install -d -m0755 %{buildroot}/usr/lib ln -s /usr/sbin/sendmail %{buildroot}/usr/lib/sendmail # configure for virtual domains and more -cat >> %{buildroot}%{_sysconfdir}/postfix/main.cf << _EOF +cp %{buildroot}%{_sysconfdir}/postfix/main.cf{,.virtualdomains} +cat >> %{buildroot}%{_sysconfdir}/postfix/main.cf.virtualdomains << _EOF # use transport maps from file transport_maps = hash:/etc/postfix/transport @@ -110,15 +113,23 @@ virtual_uid_maps = static:%{vmail_userid} virtual_mailbox_limit_override = yes virtual_overquota_bounce = yes - proxy_read_maps = \$local_recipient_maps \$mydestination \$virtual_alias_maps \$virtual_alias_domains \$virtual_mailbox_maps \$virtual_mailbox_domains \$relay_recipient_maps \$relay_domains \$canonical_maps \$sender_canonical_maps \$recipient_canonical_maps \$relocated_maps \$transport_maps $mynetworks \$virtual_mailbox_limit_maps +# configuration for mysql maps +relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf +virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf,hash:/var/mailman/data/virtual-mailman +virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf + +virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf +virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf + _EOF + install -m 0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_alias_maps.cf install -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_domains_maps.cf install -m 0640 %{SOURCE4} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_mailbox_maps.cf @@ -302,11 +313,15 @@ exit 0 %files virtualdomains-mysql %defattr(-,root,root) %config(noreplace) %attr(640,root,postfix) %{_sysconfdir}/postfix/mysql_*.cf +%{_sysconfdir}/postfix/main.cf.virtualdomains %{_sysconfdir}/postfix/mysql-tables.txt %attr(0771,vmail,vmail) %dir %{_localstatedir}/spool/maildirs %attr(0771,vmail,vmail) %dir %{_localstatedir}/spool/deleted-maildirs %changelog +* Fri Dec 29 2023 Silvan Calarco 3.8.4-2mamba +- keep standard main.cf, provide virtualdomains main.cf as template file main.cf.virtualdomains + * Fri Dec 22 2023 Automatic Build System 3.8.4-1mamba - automatic version update by autodist