automatic update by autodist [release 4.7.0-1mamba;Tue Apr 13 2010]

This commit is contained in:
Automatic Build System 2024-01-05 21:31:33 +01:00
parent 11710c4bbd
commit 92c541b8a7
6 changed files with 296 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# courier-imap # courier-imap
The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP.
Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework.

141
courier-imap.spec Normal file
View File

@ -0,0 +1,141 @@
Name: courier-imap
Version: 4.7.0
Release: 1mamba
Summary: An IMAP server that handles QMail's Mailbox dirs
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.courier-mta.org/
Source: http://switch.dl.sourceforge.net/sourceforge/courier/courier-imap-%{version}.tar.bz2
#Source: http://www.courier-mta.org/beta/imap/courier-imap-%{version}.tar.bz2
Source1: imap-pam
Source2: imapd-initscript
Source3: imapd-ssl-initscript
Source4: imap-generate-certificate.sh
License: GPL
BuildRequires: libdb47-devel >= 4.2.52, pam-devel >= 0.77, libopenssl-devel >= 0.9.7b
BuildRequires: libopenldap-devel >= 2.1.22
BuildRequires: courier-authlib
Requires: courier-authlib >= 0.59.3
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP.
Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework.
%prep
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"/../perl-root
[ "%{buildroot}" != "/" ] && rm -rf "%{buildroot}"
%setup -q
%build
find . -name Makefile.in | xargs -n1 sed -i "s|DEFAULT_INCLUDES = |DEFAULT_INCLUDES = -I/usr/include/db4|"
./configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir}/imap \
--mandir=%{_mandir} \
--libexecdir=%{_libexecdir}/courier-imap \
--datadir=%{_datadir}/courier-imap \
--localstatedir=/var/run \
--without-authdaemon \
--with-redhat
find . -name Makefile | xargs -n1 sed -i "s|-ldb|-ldb-4|"
make %{_smp_mflags}
%install
make install DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir}
for f in `find %{buildroot}%{_mandir}/man/man7 -type l`; do
rm $f
done
make install-configure DESTDIR=%{buildroot}
rm %{buildroot}%{_sysconfdir}/imap/*.dist
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/imap
mkdir -p %{buildroot}%{_initrddir}
cp %{SOURCE2} %{buildroot}%{_initrddir}/imapd
cp %{SOURCE3} %{buildroot}%{_initrddir}/imapd-ssl
cp %{SOURCE4} %{buildroot}%{_libexecdir}/courier-imap/
# avoid a conflict with QMail file
mv %{buildroot}%{_mandir}/man1/maildirmake.1 %{buildroot}%{_mandir}/man1/maildirmake-imap.1
pushd %{buildroot}
popd
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"/../perl-root
[ "%{buildroot}" != "/" ] && rm -rf "%{buildroot}"
%post
# new install
if [ $1 -eq 1 ]; then
source %{_initrddir}/ldap-functions
set_ldap_environment
sed -i "s|dc=example,dc=com|$LDAPBASEDN|" %{_sysconfdir}/imap/authldaprc
fi
%files
%defattr(-,root,root)
%attr(0700,root,root) %dir %{_sysconfdir}/imap/
%config(noreplace) %{_sysconfdir}/imap/*
%config(noreplace) %{_sysconfdir}/pam.d/imap
%attr(0755,root,root) %{_initrddir}/imapd
%attr(0755,root,root) %{_initrddir}/imapd-ssl
%dir %{_libexecdir}/courier-imap
%{_libexecdir}/courier-imap/*
%{_bindir}/*
%{_sbindir}/*
%{_sbindir}/mkimapdcert
%{_sbindir}/mkpop3dcert
%dir %{_datadir}/courier-imap
%{_datadir}/courier-imap/*
%{_mandir}/man1/*
%{_mandir}/man8/*
%changelog
* Tue Apr 13 2010 Automatic Build System <autodist@mambasoft.it> 4.7.0-1mamba
- automatic update by autodist
* Tue Jul 07 2009 Automatic Build System <autodist@mambasoft.it> 4.5.1-1mamba
- automatic update by autodist
* Thu May 28 2009 Automatic Build System <autodist@mambasoft.it> 4.5.0-1mamba
- automatic update by autodist
* Wed Feb 25 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1-1mamba
- automatic update by autodist
* Fri Oct 24 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.0-1mamba
- automatic update by autodist
* Sat Aug 25 2007 Tiziana Ferro <tiziana.ferro@email.it> 4.1.3-1mamba
- update to 4.1.3
* Mon Oct 11 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.2.20040207-4qilnx
- rebuilt to remove a dependency on libmisc
* Mon Oct 11 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.2.20040207-3qilnx
- added LDAP configuration on install
* Wed Feb 18 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.2.20040207-2qilnx
- fixed initscripts due to courierlogger directory change
* Mon Feb 16 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.2.20040207-1qilnx
- new version build
- fixed manual packaging problems
* Mon Sep 29 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.1.20030902-2qilnx
- added chkconfig support to initscript
* Tue Sep 11 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.1.20030902-1qilnx
- first build

View File

@ -0,0 +1,9 @@
#!/bin/bash
# generate a key
openssl genrsa -out /etc/imap/imap.key
# create a server certificate signing request
openssl req -new -key /etc/imap/imap.key -config /etc/imap/imapd.cnf -out /etc/imap/imap.csr -days 999
# sign the server certificate request
openssl ca -policy policy_anything -out /etc/imap/imap.crt -infiles /etc/imap/imap.csr
# merge private keys with signed certificate
cat /etc/imap/imap.key /etc/imap/imap.crt > /etc/imap/imap.pem

9
imap-pam Normal file
View File

@ -0,0 +1,9 @@
#%PAM-1.0
auth sufficient pam_ldap.so
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_limits.so
session optional pam_console.so

67
imapd-initscript Normal file
View File

@ -0,0 +1,67 @@
#! /bin/sh
# $Id: imapd.rc.in,v 1.22 2002/12/24 02:31:40 mrsam Exp $
#
# Copyright 1998 - 2002 Double Precision, Inc.
# See COPYING for distribution information.
#
# Modified by Silvan Calarco for QiLinux - silvan.calarco@qilinux.it
# 29-09-2003: added chkconfig support
#
# chkconfig: 2345 60 10
# description: Courier IMAP Server
#
prefix=/usr
exec_prefix=/usr
bindir=${exec_prefix}/bin
libexecdir=/usr/libexec/courier-imap
TLS_CACHEFILE=""
. /etc/imap/imapd-ssl
. /etc/imap/imapd
case $1 in
start)
LIBAUTHMODULES=""
for f in `echo $AUTHMODULES`
do
LIBAUTHMODULES="$LIBAUTHMODULES /usr/libexec/courier-imap/authlib/$f"
done
if test -x ${libexecdir}/authlib/authdaemond
then
/bin/env - ${libexecdir}/authlib/authdaemond start
fi
if test "$TLS_CACHEFILE" != ""
then
rm -f $TLS_CACHEFILE
fi
ulimit -v $IMAP_ULIMITD
/bin/env - /bin/sh -c " set -a ;
prefix=/usr ;
exec_prefix=/usr ;
bindir=${exec_prefix}/bin ;
libexecdir=/usr/libexec/courier-imap ;
. /etc/imap/imapd ; \
. /etc/imap/imapd-ssl ; \
IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
/usr/libexec/courier-imap/couriertcpd -address=$ADDRESS \
-stderrlogger=/usr/sbin/courierlogger \
-stderrloggername=imapd \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
-pid=$PIDFILE $TCPDOPTS \
$PORT ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \
${exec_prefix}/bin/imapd Maildir"
;;
stop)
/usr/libexec/courier-imap/couriertcpd -pid=$PIDFILE -stop
if test -x ${libexecdir}/authlib/authdaemond
then
${libexecdir}/authlib/authdaemond stop
fi
;;
esac
exit 0

67
imapd-ssl-initscript Normal file
View File

@ -0,0 +1,67 @@
#! /bin/sh
# $Id: imapd-ssl.rc.in,v 1.14 2002/12/24 02:31:40 mrsam Exp $
#
# Copyright 1998 - 2002 Double Precision, Inc.
# See COPYING for distribution information.
#
# Modified by Silvan Calarco for QiLinux - silvan.calarco@qilinux.it
# 29-09-2003: added chkconfig support
#
# chkconfig: 2345 60 10
# description: Courier SSL IMAP Server
#
prefix=/usr
exec_prefix=/usr
bindir=${exec_prefix}/bin
libexecdir=/usr/libexec/courier-imap
TLS_CACHEFILE=""
. /etc/imap/imapd
. /etc/imap/imapd-ssl
case $1 in
start)
LIBAUTHMODULES=""
for f in `echo $AUTHMODULES`
do
LIBAUTHMODULES="$LIBAUTHMODULES /usr/libexec/courier-imap/authlib/$f"
done
if test -x ${libexecdir}/authlib/authdaemond
then
/bin/env - ${libexecdir}/authlib/authdaemond start
fi
if test "$TLS_CACHEFILE" != ""
then
rm -f $TLS_CACHEFILE
fi
ulimit -v $IMAP_ULIMITD
/bin/env - /bin/sh -c " set -a ;
prefix=/usr ;
exec_prefix=/usr ;
bindir=${exec_prefix}/bin ;
libexecdir=/usr/libexec/courier-imap ;
. /etc/imap/imapd ; \
. /etc/imap/imapd-ssl ; \
IMAP_TLS=1; export IMAP_TLS; \
/usr/libexec/courier-imap/couriertcpd -address=$SSLADDRESS \
-stderrlogger=/usr/sbin/courierlogger \
-stderrloggername=imapd-ssl \
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
-pid=$SSLPIDFILE $TCPDOPTS \
$SSLPORT $COURIERTLS -server -tcpd \
${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \
${exec_prefix}/bin/imapd Maildir"
;;
stop)
/usr/libexec/courier-imap/couriertcpd -pid=$SSLPIDFILE -stop
if test -x ${libexecdir}/authlib/authdaemond
then
${libexecdir}/authlib/authdaemond stop
fi
;;
esac
exit 0