]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- avoid writing empty "mydomain" to config
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 27 Nov 2011 21:37:42 +0000 (21:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix.spec -> 1.365

postfix.spec

index d9466cd46472356f1c3f69a68163f5a5c7f2ad8d..f2d43a6bdf1d53b9b2b94cffe8e323bedcb2743f 100644 (file)
@@ -384,7 +384,7 @@ if [ "$1" = "1" ]; then
        # postfix expects gethostname() to return FQDN, which is obviously wrong
        if ! grep -qE "^my(domain|hostname)" %{_sysconfdir}/mail/main.cf; then
                domain=$(/bin/hostname -d 2>/dev/null)
-               [ "$domain" != 'localdomain' ] && \
+               [ -n "$domain" -a "$domain" != 'localdomain' ] && \
                        postconf -e mydomain="$domain"
        fi
 else
This page took 0.127533 seconds and 4 git commands to generate.