浏览代码

Set default servername to hostname

Michael van Elst 23 年之前
父节点
当前提交
480c7ba22b
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 1 1
      imapd/imapd.conf
  2. 6 1
      imapd/imapd.spec

+ 1 - 1
imapd/imapd.conf

@@ -16,7 +16,7 @@ unixhierarchysep:       yes
 #altnamespace:           yes
 allowanonymouslogin:    no
 allowplaintext:         yes
-servername:             not.configured.fqdn
+servername:             @l_hostname@.@l_domainname@
 autocreatequota:        10000
 reject8bit:             no
 quotawarn:              90

+ 6 - 1
imapd/imapd.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Mail
 License:      BSD
 Version:      2.1.12
-Release:      20030415
+Release:      20030417
 
 #   package options
 %option       with_vhost_hack  no
@@ -166,9 +166,14 @@ Provides:     IMAP
         $RPM_BUILD_ROOT%{l_prefix}/var/imapd/spool
 
     #   offer a sane configuration
+
+    l_hostname=`%{l_shtool} echo -e %h`
+    l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
     %{l_shtool} install -c -m 644 \
         -e 's;@l_prefix@;%{l_prefix};g' \
         -e 's;@l_rusr@;%{l_rusr};g' \
+        -e "s;@l_hostname@;$l_hostname;g" \
+        -e "s;@l_domainname@;$l_domainname;g" \
         %{SOURCE cyrus.conf} \
         %{SOURCE imapd.conf} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/imapd/