#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
}