Browse Source

improve default configuration even more by regrouping directives, giving better defaults and also giving a few essential hints

Ralf S. Engelschall 19 years ago
parent
commit
ec3372a345
2 changed files with 51 additions and 31 deletions
  1. 23 20
      imapd/imapd.conf
  2. 28 11
      imapd/imapd.spec

+ 23 - 20
imapd/imapd.conf

@@ -4,32 +4,35 @@
 
 configdirectory:        @l_prefix@/var/imapd
 partition-default:      @l_prefix@/var/imapd/spool
-admins:                 @l_rusr@
-defaultacl:             @l_rusr@ lrswipcda
-sasl_pwcheck_method:    saslauthd
-sasl_mech_list:         PLAIN
-sendmail:               @l_prefix@/sbin/sendmail
-lmtpsocket:             @l_prefix@/var/imapd/socket/lmtp
 temp_path:              @l_prefix@/var/imapd/tmp
 sievedir:               @l_prefix@/var/imapd/sieve
-unixhierarchysep:       yes
-#altnamespace:           yes
-allowanonymouslogin:    no
+lmtpsocket:             @l_prefix@/var/imapd/socket/lmtp
+sendmail:               @l_prefix@/sbin/sendmail
+
+admins:                 @l_susr@
+defaultacl:             @l_susr@ lrswipcda
+sasl_pwcheck_method:    saslauthd
+sasl_mech_list:         PLAIN
 allowplaintext:         yes
+allowanonymouslogin:    no
 allowusermoves:         no
-servername:             @l_hostname@.@l_domainname@
+
+servername:             mail.example.com
+defaultdomain:          example.com
+virtdomains:            yes
+unixhierarchysep:       yes
+altnamespace:           no
+
 autocreatequota:        10000
-reject8bit:             no
 quotawarn:              90
 timeout:                30
-defaultdomain:          @l_domainname@
-virtdomains:            on
+reject8bit:             no
 
-#sync_host:             
-#sync_authname:         
-#sync_realm:
-#sync_password:
-#sync_machineid:         33
-#sync_log:               yes
-#sync_repeat_interval:   60
+#sync_host:             mail2.example.com
+#sync_realm:            example.com
+#sync_authname:         xxxxx
+#sync_password:         xxxxx
+#sync_machineid:        33
+#sync_log:              yes
+#sync_repeat_interval:  60
 

+ 28 - 11
imapd/imapd.spec

@@ -317,13 +317,29 @@ AutoReqProv:  no
 
 %pre
     #   before upgrade, save status and stop service
-    [ $1 -eq 2 ] || exit 0
-    eval `%{l_rc} imapd status 2>/dev/null | tee %{l_tmpfile}`
-    %{l_rc} imapd stop 2>/dev/null
+    if [ $1 -eq 2 ]; then
+        eval `%{l_rc} imapd status 2>/dev/null | tee %{l_tmpfile}`
+        %{l_rc} imapd stop 2>/dev/null
+    fi
     exit 0
 
 %post
-    if [ $1 -eq 2 ]; then
+    if [ $1 -eq 1 ]; then
+        #   display final hints on initial installation
+        ( echo "To complete the Cyrus IMAP installation do:"
+          echo "1. start SASL and Cyrus IMAP with:"
+          echo "   $RPM_INSTALL_PREFIX/bin/openpkg rc sasl start"
+          echo "   $RPM_INSTALL_PREFIX/bin/openpkg rc imapd start"
+          echo "2. hook Cyrus IMAP into your particular MTA manually"
+          echo "   (usually configure mail delivery via LMTP)"
+          echo "3. create mailboxes for each of your users:"
+          echo "   \$ $RPM_INSTALL_PREFIX/bin/cyradm --user=%{l_susr} localhost"
+          echo "   cyradm> createmailbox user.<user>"
+          echo "   cyradm> setaclmailbox user.<user> <user> lrswipcd"
+          echo "   cyradm> mboxconfig user.<user> comment \"<name>\""
+          echo "   cyradm> setquota user.<user> STORAGE 500000"
+        ) | %{l_rpmtool} msg -b -t notice
+    elif [ $1 -eq 2 ]; then
         #   after upgrade, restore status
         eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
         [ ".$imapd_active" = .yes ] && %{l_rc} imapd start
@@ -332,12 +348,13 @@ AutoReqProv:  no
 
 %preun
     #   before erase, stop service and remove log and temporary files
-    [ $1 -eq 0 ] || exit 0
-    %{l_rc} imapd stop 2>/dev/null
-    rm -f  $RPM_INSTALL_PREFIX/var/imapd/*.db       >/dev/null 2>&1 || true
-    rm -f  $RPM_INSTALL_PREFIX/var/imapd/db.backup* >/dev/null 2>&1 || true
-    rm -f  $RPM_INSTALL_PREFIX/var/imapd/log/*.log  >/dev/null 2>&1 || true
-    rm -f  $RPM_INSTALL_PREFIX/var/imapd/socket/*   >/dev/null 2>&1 || true
-    rm -rf $RPM_INSTALL_PREFIX/var/imapd/tmp/*      >/dev/null 2>&1 || true
+    if [ $1 -eq 0 ]; then
+        %{l_rc} imapd stop 2>/dev/null
+        rm -f  $RPM_INSTALL_PREFIX/var/imapd/*.db       >/dev/null 2>&1 || true
+        rm -f  $RPM_INSTALL_PREFIX/var/imapd/db.backup* >/dev/null 2>&1 || true
+        rm -f  $RPM_INSTALL_PREFIX/var/imapd/log/*.log  >/dev/null 2>&1 || true
+        rm -f  $RPM_INSTALL_PREFIX/var/imapd/socket/*   >/dev/null 2>&1 || true
+        rm -rf $RPM_INSTALL_PREFIX/var/imapd/tmp/*      >/dev/null 2>&1 || true
+    fi
     exit 0