]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- restored slightly modified postconf -e removed in rev. 1.306
authorTomasz Pala <gotar@pld-linux.org>
Tue, 16 Jun 2009 08:14:42 +0000 (08:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix.spec -> 1.336

postfix.spec

index b396938d8a0a9d2a68ae9c9d591a836bca2832f0..921b63811f04ccbd02458fc8ee4951f29ce717c2 100644 (file)
@@ -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
 
This page took 0.082901 seconds and 4 git commands to generate.