diff options
author | Elan Ruusamäe | 2011-11-27 21:37:42 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | d4128a22e7f454e6090835d6b4652c43d1be53ac (patch) | |
tree | 72899fd30155797cb20d6653906c0d8e9901d081 | |
parent | 8206dea2a78cb37eab54edc74e38b02e91ce9493 (diff) | |
download | postfix-d4128a22e7f454e6090835d6b4652c43d1be53ac.zip postfix-d4128a22e7f454e6090835d6b4652c43d1be53ac.tar.gz |
- avoid writing empty "mydomain" to config
Changed files:
postfix.spec -> 1.365
-rw-r--r-- | postfix.spec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/postfix.spec b/postfix.spec index d9466cd..f2d43a6 100644 --- a/postfix.spec +++ b/postfix.spec @@ -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 |