]> git.pld-linux.org Git - packages/courier.git/blob - courier-certs.patch
- updated maildir patch
[packages/courier.git] / courier-certs.patch
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
3 @@ -480,6 +480,12 @@
4  eval "datarootdir=$datarootdir"
5  eval "bindir=$bindir"
6  eval "localstatedir=$localstatedir"
7 +eval "datadir=$datadir"
8 +
9 +AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
10 +certsdir="$withval", certsdir=$datadir)
11 +
12 +AC_SUBST(certsdir)
13  
14  MAILDROP="$bindir/maildrop"
15  AC_SUBST(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
18 @@ -27,6 +27,12 @@
19  
20  case $1 in
21  start)
22 +       # If we do not have a certificate, make one up.
23 +       if test ! -f @certsdir@/imapd.pem
24 +       then
25 +               @sbindir@/mkimapdcert
26 +       fi
27 +
28         if test "$TLS_CACHEFILE" != ""
29         then
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
33 @@ -287,6 +287,11 @@
34  AC_SUBST(mydatadir)   # Quell automake warning
35  
36  
37 +AC_ARG_WITH(certsdir, [  --with-certsdir Directory where certs are created ],
38 +certsdir="$withval", certsdir=$datadir)
39 +
40 +AC_SUBST(certsdir)
41 +
42  dnl
43  dnl  Check what libraries are available
44  dnl
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
47 @@ -242,7 +242,7 @@
48  #
49  # This is an experimental feature.
50  
51 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
52 +TLS_CERTFILE=@certsdir@/esmtpd.pem
53  
54  ##NAME: TLS_TRUSTCERTS:0
55  #
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
58 @@ -269,7 +269,7 @@
59  #
60  # This is an experimental feature.
61  
62 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
63 +TLS_CERTFILE=@certsdir@/esmtpd.pem
64  
65  ##NAME: TLS_TRUSTCERTS:0
66  #
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
69 @@ -25,6 +25,10 @@
70  
71  case $1 in
72  start)
73 +       # If we do not have a certificate, make one up.
74 +       if [ ! -f @certsdir@/esmtpd.pem ]; then
75 +       @sbindir@/mkesmtpdcert
76 +       fi
77         ;;
78  stop)
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
82 @@ -11,7 +11,7 @@
83  PEMFILE="$1"
84  
85  if [ -z "$PEMFILE" ]; then
86 -       PEMFILE=@mydatadir@/esmtpd.pem
87 +       PEMFILE=@certsdir@/esmtpd.pem
88  fi
89  
90  if test "@ssllib@" = "openssl"
91 @@ -35,7 +35,7 @@
92         exit 1
93  }
94  
95 -cd @mydatadir@
96 +cd @certsdir@
97  umask 077
98  BITS="$BITS"
99  set -e
100 @@ -50,7 +50,7 @@
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
106  else
107         if test "$BITS" = ""
108         then
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
111 @@ -28,6 +28,12 @@
112  
113  case $1 in
114  start)
115 +       # If we do not have a certificate, make one up.
116 +       if test ! -f @certsdir@/pop3d.pem
117 +       then
118 +               @sbindir@/mkpop3dcert
119 +       fi
120 +
121         if test "$TLS_CACHEFILE" != ""
122         then
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
126 @@ -18,7 +18,7 @@
127  sbindir="@sbindir@"
128  bindir="@bindir@"
129  libexecdir="@libexecdir@"
130 -datadir="@datadir@"
131 +certsdir="@certsdir@"
132  
133  if test ! -f ${sysconfdir}/esmtpd
134  then
135 @@ -85,7 +85,7 @@
136         then
137  # If we do not have a certificate, make one up.
138  
139 -               if test ! -f ${datadir}/esmtpd.pem
140 +               if test ! -f ${certsdir}/esmtpd.pem
141                 then
142                         if test -x $COURIERTLS
143                         then
144 @@ -152,7 +152,7 @@
145                         then
146  # If we do not have a certificate, make one up.
147  
148 -                               if test ! -f ${datadir}/pop3d.pem
149 +                               if test ! -f ${certsdir}/pop3d.pem
150                                 then
151                                         echo -n " generating-POP3-SSL-certificate..."
152  
153 @@ -182,7 +182,7 @@
154                         then
155  # If we do not have a certificate, make one up.
156  
157 -                               if test ! -f ${datadir}/imapd.pem
158 +                               if test ! -f ${certsdir}/imapd.pem
159                                 then
160                                         echo -n " generating-IMAP-SSL-certificate..."
161  
This page took 0.124142 seconds and 3 git commands to generate.