forked from pool/courier-imap
This commit is contained in:
parent
7ac0bab755
commit
1053507f93
@ -5,7 +5,7 @@
|
||||
# treated as confidential, and must not be world-readable.
|
||||
#
|
||||
-TLS_CERTFILE=@datadir@/imapd.pem
|
||||
+TLS_CERTFILE=@sysconfig@/courier-imap/imapd.pem
|
||||
+TLS_CERTFILE=@sysconfdir@/courier-imap/imapd.pem
|
||||
|
||||
##NAME: TLS_TRUSTCERTS:0
|
||||
#
|
||||
@ -16,10 +16,10 @@
|
||||
prefix="@prefix@"
|
||||
|
||||
-if test -f @datadir@/imapd.pem
|
||||
+if test -f @sysconfig@/courier-imap/imapd.pem
|
||||
+if test -f @sysconfdir@/courier-imap/imapd.pem
|
||||
then
|
||||
- echo "@datadir@/imapd.pem already exists."
|
||||
+ echo "@sysconfig@/courier-imap/imapd.pem already exists."
|
||||
+ echo "@sysconfdir@/courier-imap/imapd.pem already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -27,30 +27,30 @@
|
||||
-cp /dev/null @datadir@/imapd.pem
|
||||
-chmod 600 @datadir@/imapd.pem
|
||||
-chown @mailuser@ @datadir@/imapd.pem
|
||||
+cp /dev/null @sysconfig@/courier-imap/imapd.pem
|
||||
+chmod 600 @sysconfig@/courier-imap/imapd.pem
|
||||
+chown @mailuser@ @sysconfig@/courier-imap/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 @sysconfig@/courier-imap/imapd.pem
|
||||
+ rm -f @sysconfig@/courier-imap/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=@sysconfig@/courier-imap/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 @sysconfig@/courier-imap/imapd.pem -keyout @sysconfig@/courier-imap/imapd.pem || cleanup
|
||||
+@OPENSSL@ gendh -rand @sysconfig@/courier-imap/imapd.rand 512 >>@sysconfig@/courier-imap/imapd.pem || cleanup
|
||||
+@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfig@/courier-imap/imapd.pem || cleanup
|
||||
+rm -f @sysconfig@/courier-imap/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 @@
|
||||
@ -60,29 +60,29 @@
|
||||
-cp /dev/null @datadir@/pop3d.pem
|
||||
-chmod 600 @datadir@/pop3d.pem
|
||||
-chown @mailuser@ @datadir@/pop3d.pem
|
||||
+cp /dev/null @sysconfig@/courier-imap/pop3d.pem
|
||||
+chmod 600 @sysconfig@/courier-imap/pop3d.pem
|
||||
+chown @mailuser@ @sysconfig@/courier-imap/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 @sysconfig@/courier-imap/pop3d.pem
|
||||
+ rm -f @sysconfig@/courier-imap/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=@sysconfig@/courier-imap/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 @sysconfig@/courier-imap/pop3d.pem -keyout @sysconfig@/courier-imap/pop3d.pem || cleanup
|
||||
+@OPENSSL@ gendh -rand @sysconfig@/courier-imap/pop3d.rand 512 >> @sysconfig@/courier-imap/pop3d.pem || cleanup
|
||||
+@OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfig@/courier-imap/pop3d.pem || cleanup
|
||||
+rm -f @sysconfig@/courier-imap/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 @@
|
||||
@ -90,7 +90,7 @@
|
||||
# treated as confidential, and must not be world-readable.
|
||||
#
|
||||
-TLS_CERTFILE=@datadir@/pop3d.pem
|
||||
+TLS_CERTFILE=@sysconfig@/courier-imap/pop3d.pem
|
||||
+TLS_CERTFILE=@sysconfdir@/courier-imap/pop3d.pem
|
||||
|
||||
##NAME: TLS_TRUSTCERTS:0
|
||||
#
|
||||
|
@ -44,7 +44,12 @@ case "$1" in
|
||||
if test ! -f $TLS_CERTFILE
|
||||
then
|
||||
echo -n " generating-SSL-certificate..."
|
||||
/usr/sbin/mkimapdcert >/dev/null 2>&1
|
||||
/usr/sbin/mkimapdcert >/dev/null
|
||||
if( test $? -gt 0 )
|
||||
then
|
||||
echo "problem with mkimapdcert"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if test "$TLS_CACHEFILE" != ""
|
||||
then
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 16 08:32:29 CET 2007 - mskibbe@suse.de
|
||||
|
||||
- Bug 341267 - courier-imap-ssl configuration problems
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 22 17:38:19 CEST 2007 - sbrabec@suse.cz
|
||||
|
||||
|
@ -11,12 +11,12 @@
|
||||
# norootforbuild
|
||||
|
||||
Name: courier-imap
|
||||
BuildRequires: courier-authlib-devel fam-devel gcc-c++ gdbm-devel libstdc++-devel openssl-devel postfix procps
|
||||
BuildRequires: courier-authlib-devel fam-devel gcc-c++ gdbm-devel libstdc++-devel openssl openssl-devel postfix procps
|
||||
Requires: fam-server
|
||||
Url: http://www.courier-mta.org/imap/
|
||||
Summary: An IMAP and POP3 Server for Maildir MTAs
|
||||
Version: 4.1.3
|
||||
Release: 51
|
||||
Release: 59
|
||||
License: GPL v2 or later
|
||||
Conflicts: imap qpopper
|
||||
Group: Productivity/Networking/Email/Servers
|
||||
@ -66,7 +66,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
--enable-unicode \
|
||||
--with-authdaemonvar=%{authdaemondir} \
|
||||
--enable-workarounds-for-imap-client-bugs \
|
||||
--host=%{_host} --build=%{_build} --target=%{_target_platform}
|
||||
--host=%{_host} --build=%{_build} --target=%{_target_platform} \
|
||||
make
|
||||
#make check
|
||||
|
||||
@ -95,27 +95,15 @@ rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/pop3d-ssl.rc
|
||||
#
|
||||
# Fix imapd.dist
|
||||
#
|
||||
%{__sed} 's/^IMAPDSTART=.*/IMAPDSTART=YES/' \
|
||||
<$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist \
|
||||
>$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist.tmp
|
||||
%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist.tmp \
|
||||
%{__sed} -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
|
||||
%{__sed} 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' \
|
||||
<$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist \
|
||||
>$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist.tmp
|
||||
%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist.tmp \
|
||||
%{__sed} -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
|
||||
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
|
||||
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
|
||||
%{__sed} 's/^POP3DSTART=.*/POP3DSTART=YES/' \
|
||||
<$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist \
|
||||
>$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist.tmp
|
||||
%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist.tmp \
|
||||
%{__sed} -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
|
||||
%{__sed} 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' \
|
||||
<$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist \
|
||||
>$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist.tmp
|
||||
%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist.tmp \
|
||||
%{__sed} -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
|
||||
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
|
||||
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
|
||||
@ -186,6 +174,8 @@ exit 0
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%changelog
|
||||
* Fri Nov 16 2007 - mskibbe@suse.de
|
||||
- Bug 341267 - courier-imap-ssl configuration problems
|
||||
* Mon Oct 22 2007 - sbrabec@suse.cz
|
||||
- Use correct SuSEfirewall2 rule directory.
|
||||
* Wed Apr 25 2007 - mskibbe@suse.de
|
||||
|
@ -45,6 +45,11 @@ case "$1" in
|
||||
then
|
||||
echo -n " generating-SSL-certificate..."
|
||||
/usr/sbin/mkpop3dcert >/dev/null 2>&1
|
||||
if( test $? -gt 0 )
|
||||
then
|
||||
echo "problem with mkpop3dcert"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if test "$TLS_CACHEFILE" != ""
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user