diff --git a/postfix.changes b/postfix.changes index 36f2993..64ee973 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 20 18:01:36 CET 2017 - kukuk@suse.de + +- Require system group mail +- Use mail group name instead of GID + ------------------------------------------------------------------- Mon Mar 6 21:27:38 UTC 2017 - mrueckert@suse.de diff --git a/postfix.spec b/postfix.spec index 4a893c0..561014a 100644 --- a/postfix.spec +++ b/postfix.spec @@ -42,7 +42,7 @@ %define pf_uid 51 %define pf_gid 51 %define maildrop_gid 59 -%define mail_gid 12 +%define mail_group mail %define conf_backup_dir %{_localstatedir}/adm/backup/%{name} %define omc_pdir %{_datadir}/omc/ %define omc_dir %{_datadir}/omc/svcinfo.d/ @@ -107,6 +107,9 @@ Requires(pre): sysvinit(syslog) %if 0%{?suse_version} >= 1100 BuildRequires: fdupes %endif +%if 0%{?suse_version} >= 1330 +Requires(pre): group(%{mail_group}) +%endif %if 0%{?suse_version} > 1210 BuildRequires: systemd %{?systemd_requires} @@ -247,7 +250,7 @@ make groupadd -g %{pf_gid} -o -r %{name} 2> /dev/null || : groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || : useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} 2> /dev/null || : -usermod -G %{maildrop_gid},%{mail_gid} %{name} 2> /dev/null || : +usermod -G %{maildrop_gid},%{mail_group} %{name} 2> /dev/null || : mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/etc/postfix cp conf/* %{buildroot}/etc/postfix/ @@ -401,7 +404,7 @@ fi getent group %{name} >/dev/null || groupadd -g %{pf_gid} -o -r %{name} getent group maildrop >/dev/null || groupadd -g %{maildrop_gid} -o -r maildrop getent passwd %{name} >/dev/null || useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} -usermod -G %{maildrop_gid},%{mail_gid} %{name} +usermod -G %{maildrop_gid},%{mail_group} %{name} # --------------------------------------------------------------------------- %pre mysql