SHA256
1
0
forked from pool/courier-imap
courier-imap/courier-imap-4.1.1.diff

97 lines
3.6 KiB
Diff

--- imap/imapd-ssl.dist.in
+++ imap/imapd-ssl.dist.in
@@ -153,7 +153,7 @@
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
# treated as confidential, and must not be world-readable.
#
-TLS_CERTFILE=@datadir@/imapd.pem
+TLS_CERTFILE=@sysconfdir@/courier-imap/imapd.pem
##NAME: TLS_TRUSTCERTS:0
#
--- imap/mkimapdcert.in
+++ imap/mkimapdcert.in
@@ -13,27 +13,27 @@
prefix="@prefix@"
-if test -f @datadir@/imapd.pem
+if test -f @sysconfdir@/courier-imap/imapd.pem
then
- echo "@datadir@/imapd.pem already exists."
+ echo "@sysconfdir@/courier-imap/imapd.pem already exists."
exit 1
fi
umask 077
-cp /dev/null @datadir@/imapd.pem
-chmod 600 @datadir@/imapd.pem
-chown @mailuser@ @datadir@/imapd.pem
+cp /dev/null @sysconfdir@/courier-imap/imapd.pem
+chmod 600 @sysconfdir@/courier-imap/imapd.pem
+chown @mailuser@ @sysconfdir@/courier-imap/imapd.pem
cleanup() {
- rm -f @datadir@/imapd.pem
- rm -f @datadir@/imapd.rand
+ rm -f @sysconfdir@/courier-imap/imapd.pem
+ rm -f @sysconfdir@/courier-imap/imapd.rand
exit 1
}
cd @datadir@
-dd if=@RANDOMV@ of=@datadir@/imapd.rand count=1 2>/dev/null
+dd if=@RANDOMV@ of=@sysconfdir@/courier-imap/imapd.rand count=1 2>/dev/null
@OPENSSL@ req -new -x509 -days 365 -nodes \
- -config @sysconfdir@/imapd.cnf -out @datadir@/imapd.pem -keyout @datadir@/imapd.pem || cleanup
-@OPENSSL@ gendh -rand @datadir@/imapd.rand 512 >>@datadir@/imapd.pem || cleanup
-@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @datadir@/imapd.pem || cleanup
-rm -f @datadir@/imapd.rand
+ -config @sysconfdir@/imapd.cnf -out @sysconfdir@/courier-imap/imapd.pem -keyout @sysconfdir@/courier-imap/imapd.pem || cleanup
+@OPENSSL@ gendh -rand @sysconfdir@/courier-imap/imapd.rand 512 >>@sysconfdir@/courier-imap/imapd.pem || cleanup
+@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfdir@/courier-imap/imapd.pem || cleanup
+rm -f @sysconfdir@/courier-imap/imapd.rand
--- imap/mkpop3dcert.in
+++ imap/mkpop3dcert.in
@@ -20,19 +20,19 @@
fi
umask 077
-cp /dev/null @datadir@/pop3d.pem
-chmod 600 @datadir@/pop3d.pem
-chown @mailuser@ @datadir@/pop3d.pem
+cp /dev/null @sysconfdir@/courier-imap/pop3d.pem
+chmod 600 @sysconfdir@/courier-imap/pop3d.pem
+chown @mailuser@ @sysconfdir@/courier-imap/pop3d.pem
cleanup() {
- rm -f @datadir@/pop3d.pem
- rm -f @datadir@/pop3d.rand
+ rm -f @sysconfdir@/courier-imap/pop3d.pem
+ rm -f @sysconfdir@/courier-imap/pop3d.rand
exit 1
}
-dd if=@RANDOMV@ of=@datadir@/pop3d.rand count=1 2>/dev/null
+dd if=@RANDOMV@ of=@sysconfdir@/courier-imap/pop3d.rand count=1 2>/dev/null
@OPENSSL@ req -new -x509 -days 365 -nodes \
- -config @sysconfdir@/pop3d.cnf -out @datadir@/pop3d.pem -keyout @datadir@/pop3d.pem || cleanup
-@OPENSSL@ gendh -rand @datadir@/pop3d.rand 512 >>@datadir@/pop3d.pem || cleanup
-@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @datadir@/pop3d.pem || cleanup
-rm -f @datadir@/pop3d.rand
+ -config @sysconfdir@/pop3d.cnf -out @sysconfdir@/courier-imap/pop3d.pem -keyout @sysconfdir@/courier-imap/pop3d.pem || cleanup
+@OPENSSL@ gendh -rand @sysconfdir@/courier-imap/pop3d.rand 512 >> @sysconfdir@/courier-imap/pop3d.pem || cleanup
+@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfdir@/courier-imap/pop3d.pem || cleanup
+rm -f @sysconfdir@/courier-imap/pop3d.rand
--- imap/pop3d-ssl.dist.in
+++ imap/pop3d-ssl.dist.in
@@ -140,7 +140,7 @@
# servers, and is optional for SSL/TLS clients. TLS_CERTFILE is usually
# treated as confidential, and must not be world-readable.
#
-TLS_CERTFILE=@datadir@/pop3d.pem
+TLS_CERTFILE=@sysconfdir@/courier-imap/pop3d.pem
##NAME: TLS_TRUSTCERTS:0
#