Mercurial > dovecot > original-hg > dovecot-1.2
view doc/mkcert.sh @ 9308:1072d2b53f72 HEAD
login-proxy: If proxy destination is known to be down, fail immediately.
We'll use a simple rule: If connection failed or timed out more recently
than it succeeded AND there are currently no clients trying to connect to
it, fail it. Since the connect isn't failed unless there is at least one
client already trying to connect to it, the proxy notices immediately when
the server comes back up and then starts serving it again.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 12 Aug 2009 14:51:35 -0400 |
parents | b668848fff11 |
children |
line wrap: on
line source
#!/bin/sh # Generates a self-signed certificate. # Edit dovecot-openssl.cnf before running this. OPENSSL=${OPENSSL-openssl} SSLDIR=${SSLDIR-/etc/ssl} OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf} CERTDIR=$SSLDIR/certs KEYDIR=$SSLDIR/private CERTFILE=$CERTDIR/dovecot.pem KEYFILE=$KEYDIR/dovecot.pem if [ ! -d $CERTDIR ]; then echo "$SSLDIR/certs directory doesn't exist" exit 1 fi if [ ! -d $KEYDIR ]; then echo "$SSLDIR/private directory doesn't exist" exit 1 fi if [ -f $CERTFILE ]; then echo "$CERTFILE already exists, won't overwrite" exit 1 fi if [ -f $KEYFILE ]; then echo "$KEYFILE already exists, won't overwrite" exit 1 fi $OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 365 || exit 2 chmod 0600 $KEYFILE echo $OPENSSL x509 -subject -fingerprint -noout -in $CERTFILE || exit 2