]> git.pld-linux.org Git - packages/postfix.git/blobdiff - postfix.spec
- restored slightly modified postconf -e removed in rev. 1.306
[packages/postfix.git] / 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.106739 seconds and 4 git commands to generate.