From 49e87d62c1720cf1d0bcc9bf84502b9de363d646 Mon Sep 17 00:00:00 2001 From: Tomasz Pala Date: Tue, 16 Jun 2009 08:14:42 +0000 Subject: [PATCH] - restored slightly modified postconf -e removed in rev. 1.306 Changed files: postfix.spec -> 1.336 --- postfix.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index b396938..921b638 100644 --- a/postfix.spec +++ b/postfix.spec @@ -359,7 +359,14 @@ if ! grep -q "^postmaster:" %{_sysconfdir}/mail/aliases; then echo "Adding Entry for postmaster in %{_sysconfdir}/mail/aliases" >&2 echo "postmaster: root" >>%{_sysconfdir}/mail/aliases fi -if [ "$1" -gt "1" ]; then +if [ "$1" = "1" ]; then + # only on installation, not upgrade; set sane defaults + # postfix expects gethostname() to return FQDN, which is obviously wrong + if ! grep -qE "^my(domain|hostname)" %{_sysconfdir}/mail/main.cf; then + [ `/bin/hostname -d` != 'localdomain' ] && \ + postconf -e mydomain=`/bin/hostname -d` + fi +else %{_sbindir}/postfix upgrade-configuration fi -- 2.44.0