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-1.0.3/courier/imapd-ssl.rc.in.orig 2018-11-24 08:32:30.698359598 +0100
17 +++ courier-1.0.3/courier/imapd-ssl.rc.in 2018-11-24 08:46:40.145016565 +0100
22 + # If we do not have a certificate, make one up.
23 + if test ! -f @certsdir@/imapd.pem
25 + @sbindir@/mkimapdcert
28 if test "$TLS_CACHEFILE" != ""
30 rm -f "$TLS_CACHEFILE"
31 --- courier-0.78.2.orig/courier/module.esmtp/configure.ac 2008-07-12 22:17:24.000000000 +0200
32 +++ courier-0.78.2/courier/module.esmtp/configure.ac 2010-05-08 23:31:10.355976183 +0200
34 AC_SUBST(mydatadir) # Quell automake warning
37 +AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
38 +certsdir="$withval", certsdir=$datadir)
43 dnl Check what libraries are available
45 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd.dist.in 2010-02-02 23:30:00.000000000 +0100
46 +++ courier-0.78.2/courier/module.esmtp/esmtpd.dist.in 2010-05-08 23:31:10.355976183 +0200
49 # This is an experimental feature.
51 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
52 +TLS_CERTFILE=@certsdir@/esmtpd.pem
54 ##NAME: TLS_TRUSTCERTS:0
56 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.dist.in 2010-02-02 23:30:00.000000000 +0100
57 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.dist.in 2010-05-08 23:31:10.355976183 +0200
60 # This is an experimental feature.
62 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
63 +TLS_CERTFILE=@certsdir@/esmtpd.pem
65 ##NAME: TLS_TRUSTCERTS:0
67 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:30:54.612778263 +0200
68 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.in 2010-05-08 23:31:10.355976183 +0200
73 + # If we do not have a certificate, make one up.
74 + if [ ! -f @certsdir@/esmtpd.pem ]; then
75 + @sbindir@/mkesmtpdcert
79 ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
80 --- courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in.orig 2018-03-25 10:15:59.986631408 +0200
81 +++ courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in 2018-03-25 11:27:37.983248999 +0200
85 if [ -z "$PEMFILE" ]; then
86 - PEMFILE=@mydatadir@/esmtpd.pem
87 + PEMFILE=@certsdir@/esmtpd.pem
90 if test "@ssllib@" = "openssl"
101 -config @sysconfdir@/esmtpd.cnf -out "$PEMFILE" -keyout "$PEMFILE" || cleanup
102 @OPENSSL@ dhparam -2 -rand "$PEMFILE".rand 512 >>"$PEMFILE" || cleanup
103 @OPENSSL@ x509 -subject -dates -fingerprint -noout -in "$PEMFILE" || cleanup
104 - rm -f @mydatadir@/esmtpd.rand
105 + rm -f @certsdir@/esmtpd.rand
109 --- courier-1.0.3/courier/pop3d-ssl.in.orig 2018-11-24 08:32:30.701692932 +0100
110 +++ courier-1.0.3/courier/pop3d-ssl.in 2018-11-24 08:47:26.655016034 +0100
115 + # If we do not have a certificate, make one up.
116 + if test ! -f @certsdir@/pop3d.pem
118 + @sbindir@/mkpop3dcert
121 if test "$TLS_CACHEFILE" != ""
123 rm -f "$TLS_CACHEFILE"
124 --- courier-0.78.2.orig/courier.sysvinit.in 2010-05-08 23:30:54.612778263 +0200
125 +++ courier-0.78.2/courier.sysvinit.in 2010-05-08 23:31:10.355976183 +0200
129 libexecdir="@libexecdir@"
131 +certsdir="@certsdir@"
133 if test ! -f ${sysconfdir}/esmtpd
137 # If we do not have a certificate, make one up.
139 - if test ! -f ${datadir}/esmtpd.pem
140 + if test ! -f ${certsdir}/esmtpd.pem
142 if test -x $COURIERTLS
146 # If we do not have a certificate, make one up.
148 - if test ! -f ${datadir}/pop3d.pem
149 + if test ! -f ${certsdir}/pop3d.pem
151 echo -n " generating-POP3-SSL-certificate..."
155 # If we do not have a certificate, make one up.
157 - if test ! -f ${datadir}/imapd.pem
158 + if test ! -f ${certsdir}/imapd.pem
160 echo -n " generating-IMAP-SSL-certificate..."