Summary: Courier mail server Summary(pl): Serwer poczty Courier Name: courier Version: 0.35.1 Release: 1 License: GPL Group: Applications/Mail Source: http://ftp1.sourceforge.net/courier/%{name}-%{version}.tar.gz URL: http://www.courier-mta.org/ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) Provides: smtpdaemon #AutoProv: no Prereq: /sbin/chkconfig %define apachedir /home/httpd %define _prefix /usr/lib/courier %define _localstatedir /var/spool/courier %define _sysconfdir /etc/courier %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 jesgt 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 sendmail-wrapper Summary: Courier soft links for sendmail Summary(pl): Wrapper sendmail do Couriera Group: Applications/Mail Requires: %{name} = %{version} %description sendmail-wrapper This package contains two soft links from /usr/sbin/sendmail and /usr/lib/sendmail to %{_bindir}/sendmail. This allows application that use sendmail to transparently use Courier for sending mail. %description sendmail-wrapper -l pl Ten pakiet zawiera symlinki z /usr/sbin/sendmail i /usr/lib/sendmail do %{_bindir}/sendmail. Pozwala to aplikacjom używającym sendmaila korzystać z Couriera. # acc. FHS these symlinks should be in main package... %package pop3d Summary: Courier Integrated POP3 server Summary(pl): Zintegrowany serwer POP3 do Couriera Group: Applications/Mail Requires: %{name} = %{version} %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: Applications/Mail Requires: %{name} = %{version} 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 webmail Summary: Courier Integrated HTTP (webmail) server Summary(pl): Zintegrowany serwer poczty przez HTTP (webmail) do Couriera Group: Applications/Mail Requires: %{name} = %{version} 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 mlm Summary: Courier Integrated Mailing List Manager Summary(pl): Zintegrowany menadżer list dyskusyjnych do Couriera Group: Applications/Mail Requires: %{name} = %{version} %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 - menadżer list dyskusyjnych dla Couriera. couriermlm jest używany do skonfigurowania, zarządzania i prowadzenia pocztowej listy dyskusyjnej. Automatycznie obsługuje żądania zapisywania i wypisywania i usuwa niedziałające adresy z listy 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} %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 maildrop-wrapper Summary: Courier soft links for maildrop Summary(pl): Wrapper maildrop do Couriera Group: Applications/Mail Requires: %{name}-maildrop = %{version} %description maildrop-wrapper This package installs several soft links from the /usr/local/bin directory to Courier's integrated maildrop mail filter. Maildrop is available as a standalone package, which installs in %{_bindir}. If you have applications that expect to find maildrop in /usr/local/bin you can install this package to create soft links that point to Courier's integrated maildrop version instead, in order to continue to use those applications, without needing to reconfigure them. %description maildrop-wrapper -l pl Ten pakiet zawiera symlinki z katalogu /usr/local/bin do filtru maildrop Couriera. maildrop jest dostępnym w oddzielnym pakiecie, instalującym się w %{_bindir}. Przydaje się aplikacjom szukającym maildropa w /usr/local/bin do używania z Courierem bez rekonfigurowania. # hmmm ??? to be removed... %package smtpauth Summary: Courier mail server authenticated ESMTP module Summary(pl): Moduł autentykacji ESMTP (SMTP AUTH) do Couriera Group: Applications/Mail Requires: %{name} = %{version} %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 autentykację i umożliwienie przekazania wychodzącej poczty poprzez serwer poczty Courier. %prep %setup %configure2_13 \ --localstatedir=%{_localstatedir} \ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --enable-imageurl=%{_imageurl} cat >README.REDHAT <>permissions.dat echo '/etc/profile.d/courier.sh 755 bin bin config' >>permissions.dat echo '/etc/profile.d/courier.csh 755 bin bin config' >>permissions.dat echo '%{initdir}/courier 755 bin bin config' >>permissions.dat # # Translate permissions.dat to spec file filelist. # perl -e ' $buildroot=$ENV{"RPM_BUILD_ROOT"}; $prefix="%{_prefix}"; $exec_prefix="%{_exec_prefix}"; while (<>) { chop if /\n$/; ($file,$mode,$uid,$gid,$special)=split(/ +/); $file=$prefix if $file eq "$prefix/."; next if $special eq "doc"; next if $file eq "$prefix/doc"; # Ignore dir/. entries next if $file =~ /\/\.$/; # Ignore man directories next if $file eq "%{_mandir}"; next if substr($file, 0, length("%{_mandir}")) eq "%{_mandir}" && substr($file, length("%{_mandir}")) =~ /^\/man[1-9]$/; $mode = "-" if $special eq "%doc"; $special="%config" if $special eq "config"; $special="%dir" if ! -l "$buildroot/$file" && -d "$buildroot/$file"; if ($special eq "man") { if ( -l "$buildroot/$file" ) { print STDERR "ln -s " . readlink("$buildroot$file") . ".gz $buildroot/$file.gz\n"; symlink readlink("$buildroot$file") . ".gz", "$buildroot/$file.gz"; } else { print STDERR "gzip <$buildroot$file >$buildroot$file.gz\n"; system("gzip <$buildroot$file >$buildroot$file.gz ; rm -f $buildroot$file"); } $file="$file.gz" } $special="" unless $special =~ /%/; $special="%attr($mode, $uid, $gid) $special"; print "$special $file\n"; } ' filelist1 || exit 1 sed -n '/imap[\.a-z0-9]*$/p;/imapd-ssl/p' filelist.imap sed -n '/pop3[\.a-z0-9]*$/p' filelist.pop3 sed -n '/couriermlm/p' filelist.mlm sed -n '/authstart$/p;/authend$/p' filelist.auth sed -n '/maildrop[^/]*$/p;/reformail[^/]*$/p;/reformime[^/]*$/p' filelist.maildrop sed '/imap[\.a-z0-9]*$/d;/imapd-ssl/d;/pop3[\.a-z0-9]*$/d;/couriermlm/d;/webmail/d;/ldapaddressbook$/d;/maildrop[^/]*$/d;/reformail[^/]*$/d;/reformime[^/]*$/d;/authstart$/d;/authend$/d' filelist sed -n '/sqwebmail/p;/webmail.authpam/p;/webmail-logincache/p;/ldapaddressbook$/p' filelist.webmail # Note that we delete all 'webmail's, but copy over only 'sqwebmail's. # This removes all webmail-related stuff from the main filelist, # and adds everything except the executable, webmail, to filelist.webmail. # Here's why: install -d $RPM_BUILD_ROOT%{_cgibindir} cp -f $RPM_BUILD_ROOT%{_libexecdir}/courier/webmail/webmail \ $RPM_BUILD_ROOT%{_cgibindir}/webmail # And here's why we delete all images from filelist.webmail: install -d $RPM_BUILD_ROOT%{_documentrootdir} mv -f $RPM_BUILD_ROOT%{_datadir}/sqwebmail/images $RPM_BUILD_ROOT%{_documentrootdir}/webmail # Do we need to install a cron job to clean out webmail's cache? if test -f webmail/cron.cmd then install -d $RPM_BUILD_ROOT/etc/cron.hourly cp webmail/cron.cmd $RPM_BUILD_ROOT/etc/cron.hourly/courier-webmail-cleancache echo "%attr(555, root, wheel) /etc/cron.hourly/courier-webmail-cleancache" >>filelist.webmail fi # # Move .html documentation back to build dir, so that RPM will move it to # the appropriate docdir # rm -rf htmldoc mkdir htmldoc cp -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 's/^POP3DSTART.*/POP3DSTART=YES/' <$RPM_BUILD_ROOT%{_sysconfdir}/pop3d >$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.new mv -f $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.new $RPM_BUILD_ROOT%{_sysconfdir}/pop3d sed 's/^IMAPDSTART.*/IMAPDSTART=YES/' <$RPM_BUILD_ROOT%{_sysconfdir}/imapd >$RPM_BUILD_ROOT%{_sysconfdir}/imapd.new mv -f $RPM_BUILD_ROOT%{_sysconfdir}/imapd.new $RPM_BUILD_ROOT%{_sysconfdir}/imapd sed 's/^IMAPDSSLSTART.*/IMAPDSSLSTART=YES/' <$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl >$RPM_BUILD_ROOT%{_sysconfdir}/imapd.new-ssl mv -f $RPM_BUILD_ROOT%{_sysconfdir}/imapd.new-ssl $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl # # Red Hat init.d file # install -d $RPM_BUILD_ROOT%{initdir} cp -f courier.sysvinit $RPM_BUILD_ROOT%{initdir}/courier # # Red Hat /etc/profile.d scripts # install -d $RPM_BUILD_ROOT/etc/profile.d cat >$RPM_BUILD_ROOT/etc/profile.d/courier.sh <$RPM_BUILD_ROOT/etc/profile.d/courier.csh <>filelist echo "%attr(755, $mailuser, $mailgroup) %dir %{_localstatedir}/tmp/broken" >>filelist %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add courier %{_sbindir}/makealiases 2>/dev/null || true %{_sbindir}/makesmtpaccess 2>/dev/null || true # If we do not have a certificate, make one up. if test ! -f %{_datadir}/esmtpd.pem then %{_sbindir}/mkesmtpdcert fi %preun %{initdir}/courier stop if test "$1" = "0" then /sbin/chkconfig --del courier fi %post imapd # If we do not have a certificate, make one up. if test ! -f %{_datadir}/imapd.pem then %{_sbindir}/mkimapdcert fi %preun imapd %{_sbindir}/imapd stop %{_sbindir}/imapd-ssl stop %preun pop3d %{_sbindir}/pop3d stop %post smtpauth %{_sbindir}/esmtpd stop %{_sbindir}/esmtpd start %postun smtpauth %{_sbindir}/esmtpd stop %{_sbindir}/esmtpd start %files -f filelist %attr(555, bin, bin) %doc README.REDHAT AUTHORS COPYING %attr(555, bin, bin) %doc htmldoc/* %files sendmail-wrapper %attr(-, bin, bin) /usr/sbin/sendmail %attr(-, bin, bin) /usr/bin/sendmail %attr(-, bin, bin) /usr/lib/sendmail %files maildrop-wrapper %attr(-, bin, bin) /usr/local/bin/* %files pop3d -f filelist.pop3 %attr(644, root, wheel) /etc/pam.d/pop3 %files imapd -f filelist.imap %attr(644, root, wheel) /etc/pam.d/imap %files webmail -f filelist.webmail %attr(4511, root, wheel) %{_cgibindir}/webmail %attr(644, root, wheel) /etc/pam.d/webmail %attr(755, bin, bin) %dir %{_documentrootdir}/webmail %attr(444, bin, bin) %{_documentrootdir}/webmail/* %files maildrop -f filelist.maildrop %files mlm -f filelist.mlm %files smtpauth -f filelist.auth