diff options
author | Tomasz Pala | 2009-06-16 08:14:42 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | 49e87d62c1720cf1d0bcc9bf84502b9de363d646 (patch) | |
tree | 1e490bf0b3e7da9add964ffedf7e66c983ca8f00 | |
parent | 5db25861fd0498aee5113cb43ee5bfd48f040088 (diff) | |
download | postfix-49e87d62c1720cf1d0bcc9bf84502b9de363d646.zip postfix-49e87d62c1720cf1d0bcc9bf84502b9de363d646.tar.gz |
- restored slightly modified postconf -e removed in rev. 1.306
Changed files:
postfix.spec -> 1.336
-rw-r--r-- | postfix.spec | 9 |
1 files changed, 8 insertions, 1 deletions
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 |