Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
qmail-ldap
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 6
[-]
[+]
Added
qmail-ldap.spec
@@ -0,0 +1,770 @@ +# +# spec file for package qmail-ldap (Version 1.03) +# +# Copyright (c) 2005 Scorpio IT, Deidesheim, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself + +%if %{?rel:0}%{!?rel:1} +%define rel 1 +%endif + +%define qdir /var/qmail +%define qlog /var/log/qmail +%define schemadir %{_sysconfdir}/openldap/schema +%define LOCALNET 192.168.101. + +# who should get mails originally addressed to root +%define ALIAS_USER admin + +# defining Group-ID's +# define GID for qmail-Group +%define QMGID 200 +# define GID for nofiles-Group +%define NFGID 201 + +# defining USER-ID's +# define UID for qmailq +%define QMQID 200 + +# define UID for qmailr +%define QMRID 201 + +# define UID for qmails +%define QMSID 202 + +# define UID for qmaild +%define QMDID 203 + +# define UID for qmaill +%define QMLID 204 + +# define UID for qmailp +%define QMPID 205 + +# define UID for alias +%define QALID 206 + +# vmail hoem-dir +%define VM_HOME /srv/maildirs + +# define UID for vmail "maildirowner" +%define VMID 303 + +# define GID for vmail "maildirowner" +%define VMGID 303 + +# LDAP specific stuff +%define ldapbasedn dc=net +%define ldapserver localhost:389 +%define ldaplogin cn=Manager,dc=net +%define ldappassword secret +%define ldaplocaldelivery 1 +%define ldapuid %{VMID} +%define ldapgid %{VMGID} +%define ldapdefaultdotmode both +%define ldapmessagestore %{VM_HOME} +%define defaultquotasize 100000000 +%define defaultquotacount 1000 + +# rootforbuild + +Distribution: %dist +Packager: Christian Wittmer <rpm@scorpio-it.net> +Vendor: Scorpio IT + +Name: qmail-ldap +Summary: qmail Mail Transfer Agent +Version: 1.03 +#Release: %{rel}.%suse_ver.SIT +Release: 1 +License: GNU +Group: Productivity/Networking/Email/Servers +URL: http://www.qmail.org/ +Source: qmail-%{version}.tar.bz2 +Patch: qmail-%{version}-ldap-20060201.diff +Patch2: %{name}-%{version}-20060201-Make.diff +Source1: qmail-%{version}-supervise.tar.bz2 +Source2: qmail-%{version}-binfiles.tar.bz2 +Buildroot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: openssl-devel krb5-devel openldap2-devel +Conflicts: sendmail, exim, smail, postfix, qmail +Requires: ucspi-tcp >= 0.88 openssl openldap2-client +Provides: smtp_daemon smtp /usr/sbin/sendmail + +#---------------------------------------------------------------------------------- +%description +#---------------------------------------------------------------------------------- +qmail is a small, fast, secure replacement for the sendmail package, which is +the program that actually receives, routes, and delivers electronic mail. + +All relevant files resides in %{qdir} such as building from source. +Exceptions are: + - man-/cat-files, they reside in %{_mandir}[man*|cat*] as defined in FHS + (Filesystem Hierarchy Standard) <http://www.pathname.com/fhs>. + - log-files, which are generated through multilog resides in %{qlog} + +For administration of %{name} I suggest phpQLAdmin <http://phpqladmin.com> +If you want to have all control files of %{name} inside your LDAP and want to +manage it with phpQLAdmin, then have a look at <http://www.bayour.com> for +qmail-ldap-control patch. +!!! qmail-ldap-control patch is not included in this release !!! + +This package is patched to %{name}-1.03 distribution of qmail. It is comprised +of qmail-1.03 <http://cr.yp.to/qmail.html> plus a ldap-patch file (20060201). +More information is available at: + - qmail <http://cr.yp.to> + - NRG4U %{name}.patch <http://www.nrg4u.com> + - Qmail-LDAP Homepage <http://www.qmail-ldap.org/wiki/Main_Page> + - Life with qmail <http://www.lifewithqmail.org/lwq.html> + - Life With qmail-ldap <http://www.lifewithqmail.org/ldap> + + Author: D. J. Bernstein <http://cr.yp.to/djb.html> + Copyright: D. J. Bernstein + + LDAP-Patch provided by: André Oppermann <oppermann@pipeline.ch> + +---------------------------------------------------------------------------------- + +#---------------------------------------------------------------------------------- +%package pop3d +#---------------------------------------------------------------------------------- +Summary: POP3 daemon for qmail +Group: Productivity/Networking/Email/Servers +Requires: ucspi-tcp >= 0.88 openssl openldap2-client +Requires: %{name} >= %{version}-%{release} + +#---------------------------------------------------------------------------------- +%description pop3d +#---------------------------------------------------------------------------------- +The qmail-pop3d packages provides POP3 support for qmail mail servers. If +you need to be able to use POP3 with your qmail server, you should install +this package. +If you want to run POP3D with tcpserver and authenticate only against LDAP then +install this package. +Otherwise you want to prefer POP3D coming with courier-imap :) +<http://www.courier-mta.org/imap> + +---------------------------------------------------------------------------------- + +#---------------------------------------------------------------------------------- +%prep +#---------------------------------------------------------------------------------- +%setup -n qmail-%{version} -a 1 -a 2 +%patch -p1 +%patch2 -p1 + +#---------------------------------------------------------------------------------- +%build +#---------------------------------------------------------------------------------- +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT + +# Add users and groups as per Life With Qmail +#---------------------------------------------------------------------------------- +# groups: qmail nofiles vmail +if [ -z "`%__grep "^qmail:" /etc/group 2>/dev/null`" ]; then + %{_sbindir}/groupadd -r -g %{QMGID} qmail +fi +if [ -z "`%__grep "^nofiles:" /etc/group 2>/dev/null`" ]; then + %{_sbindir}/groupadd -r -g %{NFGID} nofiles +fi +if [ -z "`%__grep "^vmail:" /etc/group 2>/dev/null`" ]; then + %{_sbindir}/groupadd -r -g %{VMGID} vmail +fi + +# user qmailq qmailr qmails qmaild qmaill qmailp alias vmail +if [ -z "`%__grep "^qmailq" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail queue" -d %{qdir} -g qmail -u %{QMQID} -r -s /bin/false qmailq +fi +if [ -z "`%__grep "^qmailr" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail remote" -d %{qdir} -g qmail -u %{QMRID} -r -s /bin/false qmailr +fi +if [ -z "`%__grep "^qmails" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail send" -d %{qdir} -g qmail -u %{QMSID} -r -s /bin/false qmails +fi +if [ -z "`%__grep "^qmaild" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail daemon" -d %{qdir} -g nofiles -u %{QMDID} -r -s /bin/false qmaild +fi +if [ -z "`%__grep "^qmaill" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail logger" -d %{qdir} -g nofiles -u %{QMLID} -r -s /bin/false qmaill +fi +if [ -z "`%__grep "^qmailp" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail passwd" -d %{qdir} -g nofiles -u %{QMPID} -r -s /bin/false qmailp +fi +if [ -z "`%__grep "^alias" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "qmail alias" -d %{qdir}/alias -g nofiles -u %{QALID} -r -s /bin/false alias +fi +if [ -z "`%__grep "^vmail" /etc/passwd 2>/dev/null`" ]; then + %{_sbindir}/useradd -c "maildirs chef" -d %{VM_HOME} -g %{VMGID} -u %{VMID} -r -s /bin/false vmail