# # Conditional build: %bcond_with fam # with fam support # Summary: Courier mail server Summary(pl): Serwer poczty Courier Name: courier Version: 0.46 Release: 1 License: GPL Group: Networking/Daemons Source0: http://aleron.dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2 # Source0-md5: f49eb33ee9853541471cdff2cba0f9a7 Patch0: %{name}-openssl-path.patch Patch1: %{name}-withoutfam.patch Patch2: %{name}-maildir.patch Patch3: %{name}-sendmail_dir.patch Patch4: %{name}-start_scripts.patch Patch5: %{name}-certs.patch URL: http://www.courier-mta.org/ BuildRequires: autoconf BuildRequires: automake BuildRequires: db-devel BuildRequires: expect BuildRequires: libstdc++-devel BuildRequires: libtool BuildRequires: mailcap BuildRequires: mysql-devel BuildRequires: openldap-devel BuildRequires: openssl-devel >= 0.9.7d BuildRequires: openssl-tools >= 0.9.7d BuildRequires: openssl-tools-perl >= 0.9.7d BuildRequires: pam-devel BuildRequires: perl-devel BuildRequires: postgresql-devel BuildRequires: sed >= 4.0 BuildRequires: sysconftool BuildRequires: zlib-devel %{?with_fam:BuildRequires: fam-devel} Requires(post,preun): /sbin/chkconfig Requires(post): openssl-tools >= 0.9.7d %{?with_fam:Requires: fam} Provides: smtpdaemon Obsoletes: exim Obsoletes: masqmail Obsoletes: nullmailer Obsoletes: omta Obsoletes: postfix Obsoletes: qmail Obsoletes: sendmail Obsoletes: sendmail-cf Obsoletes: sendmail-doc Obsoletes: smail Obsoletes: smtpdaemon Obsoletes: ssmtp Obsoletes: zmailer BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define apachedir /home/services/httpd %define _datadir %{_prefix}/share/courier %define _mandir /usr/share/man %define _libdir %{_prefix}/%{_lib}/courier %define _libexecdir %{_libdir} %define _localstatedir /var/spool/courier %define _sysconfdir /etc/courier %define _certsdir %{_sysconfdir}/certs %define initdir /etc/rc.d/init.d # Change the following if your DocumentRoot and cgibindir differ. This is # the default redhat build: %define _cgibindir %{apachedir}/cgi-bin %define _documentrootdir %{apachedir}/html %define _imageurl /webmail/ %description Courier is a fully functional mail server, that can completely take over the mail services normally provided by sendmail, Qmail, or any other mail server. Although Courier does not support all legacy features of existing mail servers, the number of obsoleted functions is very small, and there are better, and more robust, alternatives available. Courier implements many SMTP extensions: DSN, PIPELINING, 8BITMIME. Courier also implements several new SMTP extensions for mailing list management and spam filtering. %description -l pl Courier jest w pełni funkcjonalnym serwerem poczty, może całkowicie zastąpić usługi pocztowe dawane przez sendmail, Qmaila i inne serwery. Wprawdzie Courier nie ma wszystkich możliwości istniejących serwerów, ilość nie obsługiwanych funkcji jest bardzo mała, i są dostępne lepsze alternatywy. Courier zawiera wiele rozszerzeń SMTP: DSN, PIPELINING, 8BITMIME. Ma także nowe rozszerzenia SMTP dla pocztowych list dyskusyjnych i filtrowania spamu. %package pop3d Summary: Courier Integrated POP3 server Summary(pl): Zintegrowany serwer POP3 do Couriera Group: Networking/Daemons Requires: %{name} = %{version}-%{release} Requires(post): openssl-tools >= 0.9.7d %description pop3d This package installs Courier mail server's integrated POP3 server, which allows you to download mail from your mailbox using any POP3 client. Courier's POP3 server can only be used to download mail from maildir mailboxes. This server does not support mailbox files. If you do not need the ability to download your mail using a POP3 client, you do not need to install this package. %description pop3d -l pl Ten pakiet zawiera zintegrowany serwer POP3 do Couriera, pozwalający na ściąganie poczty ze skrzynki przy pomocy dowolnego klienta POP3. Serwer POP3 Couriera może być używany tylko ze skrzynkami Maildir, nie obsługuje skrzynek w postaci pojedynczych plików. %package imapd Summary: Courier Integrated IMAP server Summary(pl): Zintegrowany serwer IMAP do Couriera Group: Networking/Daemons Requires: %{name} = %{version}-%{release} Requires(post): openssl-tools >= 0.9.7d Obsoletes: courier-imap Obsoletes: courier-imap-common %description imapd This package installs Courier mail server's integrated IMAP server. If you do not need the ability to download your mail using an IMAP mail client, you do not need to install this package. Courier's IMAP server can only be used to download mail from maildir mailboxes. This server does not support mailbox files. This package requires that Courier must be already installed, this is NOT the standalone version of the Courier-IMAP server, and you cannot install both this package, and the standalone version of Courier-IMAP. If you have the standalone version of the Courier-IMAP server already installed, installing this package will automatically remove the standalone version. %description imapd -l pl Ten pakiet zawiera zintegrowany serwer IMAP do Couriera. Pozwala ściągać pocztę przy pomocy klienta IMAP. Serwer IMAP Couriera może być używany tylko ze skrzynami Maildir, nie obsługuje skrzynek w postaci pojedynczych plików. Ten pakiet wymaga serwera Courier, to NIE jest samodzielna wersja serwera Courier-IMAP. Nie można też instalować jednocześnie tego pakietu i samodzielnej wersji Courier-IMAP. Zainstalowanie tego pakietu automatycznie odinstaluje Courier-IMAP jeśli był zinstalowany. %package webadmin Summary: Courier Integrated HTTP administraton panel Summary(pl): Panel administracyjny przez HTTP dla Couriera Group: Networking/Daemons Requires: %{name} = %{version}-%{release} Requires: %{_cgibindir} Requires: webserver %description webadmin This is a web-based administration tool. Webadmin is a web CGI application. %description webadmin -l pl Webadmin jest narzędziem administracyjnym obsługiwanym przez WWW. %package webmail Summary: Courier Integrated HTTP (webmail) server Summary(pl): Zintegrowany serwer poczty przez HTTP (webmail) do Couriera Group: Networking/Daemons Requires: %{name} = %{version}-%{release} Requires: %{_cgibindir} Requires: %{_documentrootdir} %description webmail This package installs Courier mail server's integrated HTTP webmail server. If you do not need the ability to access your mail using a web browser, you do not need to install this package. Courier's webmail server can only be used to download mail from maildir mailboxes. This server does not support mailbox files. This is the same server that's distributed separately under the name of SqWebMail, however its configuration is customized for the Courier mail server. %description webmail -l pl Ten pakiet zawiera zintegrowany serwer poczty przez HTTP (webmail) dla Couriera, pozwalający na dostęp do poczty za pomocą przeglądarki WWW. Serwer webmail Couriera może być używany tylko ze skrzynkami Maildir, nie obsługuje skrzynek w postaci pojedynczych plików. Jest to ten sam serwer, co dystrybuowany oddzielnie pod nazwą SqWebMail, ale jego konfiguracja jest dostosowana do serwera Courier. %package maildir-tools Summary: Tools for mail folders in Maildir format Summary(pl): Narzędzia do zarządzania skrzynkami Maildir Group: Applications/Mail Requires: %{name} = %{version}-%{release} %description maildir-tools This package contains tools for mail folders in Maildir format. %description maildir-tools -l pl Ten pakiet zawiera narzędzia do zarządzania folderami w formacie Maildir. %package mlm Summary: Courier Integrated Mailing List Manager Summary(pl): Zintegrowany zarządca list dyskusyjnych do Couriera Group: Applications/Mail Requires: %{name} = %{version}-%{release} %description mlm This package installs couriermlm - a mailing list manager for the Courier mail server. If you do not need the ability to manage mailing lists, you do not need to install this package. couriermlm is used to set up, maintain, and run a mailing list. couriermlm automatically processes subscription and unsubscription requests, and removes undeliverable addresses from the subscription rolls. Mailing lists managed by couriermlm require zero human administrative oversight. couriermlm supports digests, write-only posting aliases, and moderated mailing lists. %description mlm -l pl Ten pakiet zawiera couriermlm - program do zarządzania listami dyskusyjnymi dla Couriera. couriermlm jest używany do konfigurowania, zarządzania i prowadzenia pocztowej listy dyskusyjnej. Automatycznie obsługuje żądania zapisywania i wypisywania oraz usuwa z listy niedziałające adresy subskrybentów. Listy obsługiwane przez couriermlm nie wymagają pracy administratora. couriermlm obsługuje digesty, aliasy pocztowe tylko do wysyłania i listy moderowane. %package maildrop Summary: Courier Integrated mail filter Summary(pl): Zintegrowany filtr poczty do Couriera Group: Applications/Mail Requires: %{name} = %{version}-%{release} %description maildrop This package installs Courier mail server's integrated mail filter. You need to install this package if you want to be able to filter your incoming mail. %description maildrop -l pl Ten pakiet zawiera zintegrowany filtr poczty dla Couriera. Jest potrzebny do filtrowania przychodzącej poczty. %package smtpauth Summary: Courier mail server authenticated ESMTP module Summary(pl): Moduł uwierzytelniania ESMTP (SMTP AUTH) do Couriera Group: Networking/Daemons Requires: %{name} = %{version}-%{release} %description smtpauth Authenticated ESMTP allows remote users to authenticate themselves and be able to relay outbound mail through the Courier mail server. %description smtpauth -l pl SMTP AUTH pozwala zdalnym użytkownikom na uwierzytelnianie i umożliwienie przekazania wychodzącej poczty poprzez serwer poczty Courier. %package authldap Summary: LDAP authentication daemon for Courier mail server Summary(pl): Demon autentykacji LDAP do Couriera Group: Networking/Daemons PreReq: %{name} = %{version}-%{release} %description authldap This package provides LDAP authentication for Courier. %description authldap -l pl Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courierze. %package authmysql Summary: MySQL authentication daemon for Courier mail server Summary(pl): Demon autentykacji MySQL do Couriera Group: Networking/Daemons PreReq: %{name} = %{version}-%{release} %description authmysql This package provides MySQL authentication for Courier. %description authmysql -l pl Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courierze. %package authpgsql Summary: PostgreSQL authentication daemon for Courier mail server Summary(pl): Demon autentykacji PostgreSQL do Couriera Group: Networking/Daemons PreReq: %{name} = %{version}-%{release} %description authpgsql This package provides PostgreSQL authentication for Courier. %description authpgsql -l pl Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courierze. %prep %setup -q %patch0 -p1 %{!?with_fam:%patch1 -p1} %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %build # we don't want fax module rm -rf courier/module.fax cp -f /usr/share/automake/config.sub webmail cd rootcerts %{__libtoolize} %{__aclocal} %{__autoconf} %{__automake} cd .. cd authlib %{__aclocal} %{__autoconf} %{__automake} cd .. %{__libtoolize} %{__aclocal} %{__autoconf} %{__automake} cd courier %{__aclocal} %{__autoconf} ln -s ../ltmain.sh . %{__automake} cd module.esmtp %{__aclocal} %{__autoconf} ln -s ../ltmain.sh . %{__automake} cd ../.. cd imap %{__aclocal} %{__autoconf} %{__automake} cd .. %configure \ --localstatedir=%{_localstatedir} \ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --enable-imageurl=%{_imageurl} \ --with-certsdir=%{_certsdir} \ --with-db=db \ --with-mailer=%{_sbindir}/sendmail %{__make} %{__make} check %install rm -rf $RPM_BUILD_ROOT umask 022 install -d -p $RPM_BUILD_ROOT{/etc/{cron.hourly,pam.d},%{initdir}} \ $RPM_BUILD_ROOT{%{_cgibindir},%{_documentrootdir},/usr/lib} \ $RPM_BUILD_ROOT%{_sysconfdir}/{hosteddomains,userdb} \ $RPM_BUILD_ROOT{/etc/cron.hourly,%{_certsdir}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT # fix pam problem rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.authpam for X in imap esmtp pop3 webmail calendar do cat > $RPM_BUILD_ROOT/etc/pam.d/$X < $RPM_BUILD_ROOT%{_mandir}/man1/dotforward.1 echo '.so sendmail.1' > $RPM_BUILD_ROOT%{_mandir}/man1/rmail.1 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authcram.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authdaemon.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authdaemond.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authldap.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authmysql.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authpgsql.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authpam.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authpwd.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authshadow.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authuserdb.7 echo '.so authlib.7' > $RPM_BUILD_ROOT%{_mandir}/man7/authvchkpw.7 echo '.so esmtpd.8' > $RPM_BUILD_ROOT%{_mandir}/man8/esmtpd-msa.8 echo '.so courierfilter.8' > $RPM_BUILD_ROOT%{_mandir}/man8/filterctl.8 echo '.so makesmtpaccess.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makesmtpaccess-msa.8 echo '.so courieruucp.8' > $RPM_BUILD_ROOT%{_mandir}/man8/makeuucpneighbors.8 echo '.so makeuserdb.8' > $RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8 echo '.so makeuserdb.8' > $RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8 echo '.so courierpop3d.8' > $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3login.8 %{__make} install-perms # Move webmail and webadmin to cgibindir mv -f $RPM_BUILD_ROOT%{_libexecdir}/courier/webmail/webmail \ $RPM_BUILD_ROOT%{_cgibindir}/webmail mv -f $RPM_BUILD_ROOT%{_libexecdir}/courier/webmail/webadmin \ $RPM_BUILD_ROOT%{_cgibindir}/webadmin # And here's why we delete all images from filelist.webmail: mv -f $RPM_BUILD_ROOT%{_datadir}/sqwebmail/images $RPM_BUILD_ROOT%{_documentrootdir}/webmail # install a cron job to clean out webmail's cache install webmail/cron.cmd $RPM_BUILD_ROOT/etc/cron.hourly/courier-webmail-cleancache # Move .html documentation back to build dir, so that RPM will move it to # the appropriate docdir rm -rf htmldoc mkdir htmldoc mv -f $RPM_BUILD_ROOT%{_datadir}/htmldoc/* htmldoc chmod a-w htmldoc/* # Manually set POP3DSTART and IMAPDSTART to yes, they'll go into a separate # package, so after it's installed they should be runnable. sed -i 's/^POP3DSTART.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist sed -i 's/^POP3DSSLSTART.*/POP3DSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist sed -i 's/^IMAPDSTART.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist sed -i 's/^IMAPDSSLSTART.*/IMAPDSSLSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist # Want to have esmtpd running by default sed -i 's/^ESMTPDSTART.*/ESMTPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/esmtpd.dist # run script from install-configure (make config files) for confdist in `awk ' $5 == "config" && $1 ~ /\.dist$/ { print $1 }' $RPM_BUILD_ROOT%{_sysconfdir}/bofh <$RPM_BUILD_ROOT/etc/profile.d/courier.sh <$RPM_BUILD_ROOT/etc/profile.d/courier.csh </etc/courier/me cat <