#freeze
**スクリプト [#q9eb2185]

#contents

----
***起動スクリプト [#s88d0f9d]
 #!/bin/sh
 #
 # This is a sample /etc/rc.d/init.d file for Dovecot
 #
 # chkconfig: 2345 80 30
 # description: Dovecot IMAP4/POP3 Server
 #
 #
 
 # Source function library.
 . /etc/rc.d/init.d/functions
 
 if [ -f /etc/sysconfig/dovecot ]; then
         . /etc/sysconfig/dovecot
 fi
 
 dovecot=/usr/local/sbin/dovecot
 prog=dovecot
 RETVAL=0
 
 start() {
         echo -n $"Starting $prog: "
         daemon $dovecot $OPTIONS
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch /var/lock/subsys/dovecot
         return $RETVAL
 }
 stop() {
         echo -n $"Stopping $prog: "
         killproc $dovecot
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && rm -f /var/lock/subsys/dovecot /var/run/dovecot.pid
 }
 
 # See how we were called.
 case "$1" in
   start)
         start
         ;;
   stop)
         stop
         ;;
   restart)
         stop
         start
         ;;
   *)
         echo $"Usage: $prog {start|stop|restart}"
         exit 1
 esac
 
 exit $RETVAL

***xinetd用設定 [#s142f232]
 service imap
 {
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/local/libexec/dovecot/imap-login
        flags           = IPv4
        only_from       = 127.0.0.1
        banner          = /usr/local/etc/deny_banner
 }
 
 service imaps
 {
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/local/libexec/dovecot/imap-login
        flags           = IPv4
        server_args     = --ssl
 }
 
 service pop3
 {
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/local/libexec/dovecot/imap-login
        flags           = IPv4
        only_from       = 127.0.0.1
        banner          = /usr/local/etc/deny_banner
 }
 
 service pop3s
 {
        disable         = no
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/local/libexec/dovecot/imap-login
        flags           = IPv4
        server_args     = --ssl
 }

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS