1 --- courier-0.78.2.orig/courier/configure.ac 2010-01-09 22:13:40.000000000 +0100
2 +++ courier-0.78.2/courier/configure.ac 2010-05-08 23:31:10.355976183 +0200
4 eval "datarootdir=$datarootdir"
6 eval "localstatedir=$localstatedir"
7 +eval "datadir=$datadir"
9 +AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
10 +certsdir="$withval", certsdir=$datadir)
14 MAILDROP="$bindir/maildrop"
16 --- courier-0.78.2.orig/courier/imapd-ssl.rc.in 2010-05-08 23:30:54.599915374 +0200
17 +++ courier-0.78.2/courier/imapd-ssl.rc.in 2010-05-08 23:31:10.355976183 +0200
22 + # If we do not have a certificate, make one up.
23 + if [ ! -f @certsdir@/imapd.pem ]; then
24 + @sbindir@/mkimapdcert
28 @ULIMIT@ $IMAP_ULIMITD
29 @SETENV@ -i @SHELL@ -c " set -a ;
30 --- courier-0.78.2.orig/courier/module.esmtp/configure.ac 2008-07-12 22:17:24.000000000 +0200
31 +++ courier-0.78.2/courier/module.esmtp/configure.ac 2010-05-08 23:31:10.355976183 +0200
33 AC_SUBST(mydatadir) # Quell automake warning
36 +AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
37 +certsdir="$withval", certsdir=$datadir)
42 dnl Check what libraries are available
44 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd.dist.in 2010-02-02 23:30:00.000000000 +0100
45 +++ courier-0.78.2/courier/module.esmtp/esmtpd.dist.in 2010-05-08 23:31:10.355976183 +0200
48 # This is an experimental feature.
50 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
51 +TLS_CERTFILE=@certsdir@/esmtpd.pem
53 ##NAME: TLS_TRUSTCERTS:0
55 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.dist.in 2010-02-02 23:30:00.000000000 +0100
56 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.dist.in 2010-05-08 23:31:10.355976183 +0200
59 # This is an experimental feature.
61 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
62 +TLS_CERTFILE=@certsdir@/esmtpd.pem
64 ##NAME: TLS_TRUSTCERTS:0
66 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:30:54.612778263 +0200
67 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:31:10.355976183 +0200
72 + # If we do not have a certificate, make one up.
73 + if [ ! -f @certsdir@/esmtpd.pem ]; then
74 + @sbindir@/mkesmtpdcert
78 ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
79 --- courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in.orig 2018-03-25 10:15:59.986631408 +0200
80 +++ courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in 2018-03-25 11:27:37.983248999 +0200
84 if [ -z "$PEMFILE" ]; then
85 - PEMFILE=@mydatadir@/esmtpd.pem
86 + PEMFILE=@certsdir@/esmtpd.pem
89 if test "@ssllib@" = "openssl"
100 -config @sysconfdir@/esmtpd.cnf -out "$PEMFILE" -keyout "$PEMFILE" || cleanup
101 @OPENSSL@ dhparam -2 -rand "$PEMFILE".rand 512 >>"$PEMFILE" || cleanup
102 @OPENSSL@ x509 -subject -dates -fingerprint -noout -in "$PEMFILE" || cleanup
103 - rm -f @mydatadir@/esmtpd.rand
104 + rm -f @certsdir@/esmtpd.rand
108 --- courier-0.78.2.orig/courier/pop3d-ssl.in 2010-05-08 23:30:54.612778263 +0200
109 +++ courier-0.78.2/courier/pop3d-ssl.in 2010-05-08 23:31:10.355976183 +0200
114 + # If we do not have a certificate, make one up.
115 + if [ ! -f @certsdir@/pop3d.pem ]; then
116 + @sbindir@/mkpop3dcert
119 exec @SETENV@ -i PATH="$PATH" SHELL="$SHELL" \
120 @SHELL@ -c " set -a ; \
122 --- courier-0.78.2.orig/courier.sysvinit.in 2010-05-08 23:30:54.612778263 +0200
123 +++ courier-0.78.2/courier.sysvinit.in 2010-05-08 23:31:10.355976183 +0200
127 libexecdir="@libexecdir@"
129 +certsdir="@certsdir@"
131 if test ! -f ${sysconfdir}/esmtpd
135 # If we do not have a certificate, make one up.
137 - if test ! -f ${datadir}/esmtpd.pem
138 + if test ! -f ${certsdir}/esmtpd.pem
140 if test -x $COURIERTLS
144 # If we do not have a certificate, make one up.
146 - if test ! -f ${datadir}/pop3d.pem
147 + if test ! -f ${certsdir}/pop3d.pem
149 echo -n " generating-POP3-SSL-certificate..."
153 # If we do not have a certificate, make one up.
155 - if test ! -f ${datadir}/imapd.pem
156 + if test ! -f ${certsdir}/imapd.pem
158 echo -n " generating-IMAP-SSL-certificate..."