%define name postfix %define version 20010228 %define release 6mdk Name: %{name} Summary: Postfix Mail Transport Agent Version: %{version} Release: %{release} URL: http://www.postfix.org/ Source0: ftp://postfix.cloud9.net/official/release-%{version}.tar.bz2 Source1: postfix.aliases Source2: postfix.cron Source3: postfix.init Patch: postfix-main.cf.patch.bz2 Copyright: IBM Public License Group: System/Servers Provides: smtpdaemon Conflicts: sendmail qmail Requires: procmail Prereq: /sbin/chkconfig, /usr/bin/wc BuildRequires: db3-devel BuildConflicts: BerkeleyDB-devel BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Postfix aims to be an alternative to the widely-used sendmail program. Sendmail is responsible for 70 percent of all e-mail delivered on the Internet. With an estimated 100 million users, that's an estimated 10 billion (10^10) messages daily. A stunning number. Although IBM supported the Postfix development, it abstains from control over its evolution. The goal is to have Postfix installed on as many systems as possible. To this end, the software is given away with no strings attached to it, so that it can evolve with input from and under control by its users. %prep %setup -q -n release-%{version} %patch -p1 %build %serverbuild make DEBUG="" OPT="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT rm -f html/Makefile.in install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily install -d $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -d $RPM_BUILD_ROOT%{_initrddir} install -d $RPM_BUILD_ROOT%{_bindir} install -d $RPM_BUILD_ROOT%{_libdir}/postfix install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} install -d $RPM_BUILD_ROOT%{_sbindir} install -d $RPM_BUILD_ROOT/var/spool/postfix install -m755 auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir} install -m755 bin/sendmail bin/post* $RPM_BUILD_ROOT%{_sbindir} # install -m755 `ls bin/*|egrep -v 'post|fsstone|smtp-|sendmail'` $RPM_BUILD_ROOT%{_libdir}/postfix install -m755 bin/*post* bin/*smtp-* bin/*sendmail* $RPM_BUILD_ROOT%{_libdir}/postfix install -m755 libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix install -m644 conf/access $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 conf/canonical $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 conf/main.cf $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 conf/master.cf $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m755 conf/postfix-script-nosgid $RPM_BUILD_ROOT%{_sysconfdir}/postfix/postfix-script install -m644 conf/relocated $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 conf/transport $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 conf/virtual $RPM_BUILD_ROOT%{_sysconfdir}/postfix install -m644 man/man1/* $RPM_BUILD_ROOT%{_mandir}/man1 install -m644 man/man5/* $RPM_BUILD_ROOT%{_mandir}/man5 install -m644 man/man8/* $RPM_BUILD_ROOT%{_mandir}/man8 install -d sample; install -m644 conf/sample* sample install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/postfix/aliases install -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/postfix install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/postfix ln -sf postfix/aliases $RPM_BUILD_ROOT%{_sysconfdir}/aliases ( cd $RPM_BUILD_ROOT/usr/bin ln -sf ../sbin/sendmail mailq ln -sf ../sbin/sendmail newaliases ) ( cd $RPM_BUILD_ROOT/usr/lib ln -sf ../sbin/sendmail sendmail ) for I in etc/postfix/{aliases,access,canonical,relocated,transport,virtual} do touch $RPM_BUILD_ROOT/$I{,.db} done %pre if [ `grep postfix /etc/passwd | wc -l` = 0 ]; then /usr/sbin/useradd -M -r -d /var/spool/postfix -s "" \ -c "postfix" postfix || : fi if [ `grep postfix /etc/group | wc -l` = 0 ]; then /usr/sbin/groupadd postfix fi %post %{_sbindir}/postalias %{_sysconfdir}/postfix/aliases ln -sf %{_sysconfdir}/postfix/aliases.db %{_sysconfdir}/aliases.db %_post_service postfix if [ ! -e %{_libdir}/sendmail ]; then ln -sf %{_sbindir}/sendmail %{_libdir}/sendmail fi chkconfig --del sendmail &> /dev/null||: %{_sbindir}/postfix check >/dev/null 2>&1 ||: %preun %_preun_service postfix %postun if [ $1 = 0 ]; then if [ `grep postfix /etc/passwd | wc -l` = 1 ]; then /usr/sbin/userdel postfix fi if [ `grep postfix /etc/group | wc -l` = 1 ]; then /usr/sbin/groupdel postfix fi if ! [ -f /var/lock/subsys/postfix ]; then rm -rf /var/lock/subsys/postfix fi fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc html sample 0README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES TODO %dir %{_sysconfdir}/postfix %config(noreplace) %{_sysconfdir}/cron.daily/postfix %config(noreplace) %{_sysconfdir}/postfix/aliases %config(noreplace) %{_sysconfdir}/postfix/access %config(noreplace) %{_sysconfdir}/postfix/canonical %config(noreplace) %{_sysconfdir}/postfix/main.cf %config(noreplace) %{_sysconfdir}/postfix/master.cf %config(noreplace) %{_sysconfdir}/postfix/relocated %config(noreplace) %{_sysconfdir}/postfix/transport %config(noreplace) %{_sysconfdir}/postfix/virtual %config %{_sysconfdir}/postfix/postfix-script %config %{_initrddir}/postfix %{_bindir}/* %{_sbindir}/* %{_sysconfdir}/aliases /var/spool/postfix %{_libdir}/postfix %{_libdir}/sendmail %attr(-,root,man) %{_mandir}/*/* %changelog * Tue Apr 17 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 20010228-6mdk - Do not stop postfix before installing, it will prevent us from restarting it. * Tue Apr 17 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 20010228-5mdk - Revert latest change, cause the DB are already re-generated in postfix.init at each startup. * Thu Apr 05 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 20010228-4mdk - When upgrading, always regenerate all .db file (except aliases) This fix bug #2260 (upgrade postfix need to recreate /etc/postfix/*.db files). This avoid problem when the DB file version change. thanks to Steffen Ullrich <coyote.frank@gmx.de> for reporting and helping fixing this bug. * Wed Apr 04 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 20010228-3mdk - Fix bug #1810 (postfix invokes procmail with options that cause a `>From ' line in the headers) by adding the -o options to the procmail call. * Thu Mar 29 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 20010228-2mdk - use post/preun service macros - user serverbuild for safer flags * Tue Mar 6 2001 Vincent Danen <vdanen@mandrakesoft.com> 20010228-1mdk - 20010228 release - macros - added conflicts: qmail - added buildrequires: db3-devel - added buildconflicts: BerkeleyDB-devel * Wed Jan 17 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl13-2mdk - install rmail script. * Wed Jan 17 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl13-1mdk - Upgrade to patch level 13. - add delay_warning_time option to main.cf (fix bug #1390). * Thu Nov 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 19991231_pl08-6mdk - Explicit compile with db1. * Tue Aug 29 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl08-5mdk - change license to IBM Public License * Tue Aug 29 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl08-4mdk - use noreplace - use %{_initrddir} * Tue Aug 29 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl08-3mdk - correct 2 shell syntax error in %postun * Wed Aug 2 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 19991231_pl08-2mdk - %config(noreplace) * Fri Jul 21 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231_pl08-1mdk - updated to postfix release 19991231-pl8. - small specfile cleanup. * Mon Jul 10 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 19991231-8mdk - let spechelper compress man-pages and strip binaries (hey guyes, we do this for a _long_ time) - use new macros * Sat Jul 08 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 19991231-7mdk - modified find statement to only find files (not directories) - moved BuildRoot to /var/tmp * Fri May 05 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231-6mdk - Fix an aliases.db problem... * Tue Mar 21 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 19991231-5mdk - Fix group. * Wed Mar 8 2000 Pixel <pixel@mandrakesoft.com> 19991231-4mdk - add prereq wc * Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com> - updated to 19991231 - added postfix group - corrected aliases.db bug * Mon Dec 27 1999 Jerome Dumonteil <jd@mandrakesoft.com> - Add postfix check in post to create sub dirs in spool * Mon Dec 20 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Add -a $DOMAIN -d $LOGNAME to procmail (philippe). - New banner. * Wed Nov 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - fix if conflicts with sendmail. * Sat Jun 5 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - install bins from libexec/ * Sat Jun 5 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com> - 19990601 - .spec cleanup for easier updates * Wed May 26 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - created link from /usr/sbin/sendmail to %{_libdir}/sendmail so it doesn't bug out when i rpm -e sendmail - Now removes /var/lock/subsys/postfix like a good little prog upon rpm -e * Fri Apr 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Mandrake adptations. * Tue Apr 13 1999 Arne Coucheron <arneco@online.no> [19990317-pl04-1] * Tue Mar 30 1999 Arne Coucheron <arneco@online.no> [19990317-pl03-2] - Castro, Castro, pay attention my friend. You're making it very hard maintaining the package if you don't follow the flow of the releases * Thu Mar 25 1999 Arne Coucheron <arneco@online.no> [19990317-pl02-1] * Tue Mar 23 1999 Arne Coucheron <arneco@online.no> [19990317-3] - added bugfix patch01 * Sat Mar 20 1999 Arne Coucheron <arneco@online.no> [19990317-2] - removed the mynetworks line in main.cf, let postfix figure it out - striping of the files in /usr/sbin - alias database moved to /etc/postfix and made a symlink to it in /etc - enabled procmail support in main.cf and added it to Requires: - check status on master instead of postfix in the init script - obsoletes postfix-beta - had to move some of my latest changelog entries up here since Edgard Castro didn't follow my releases * Thu Mar 18 1999 Edgard Castro <castro@usmatrix.net> [19990317] * Tue Mar 16 1999 Edgard Castro <castro@usmatrix.net> [alpha-19990315] * Tue Mar 9 1999 Edgard Castro <castro@usmatrix.net> [19990122-pl01-2] - shell and gecho information changed to complie with Red Hat stardand - changed the name of the rpm package to postfix, instead of postfix-beta * Tue Feb 16 1999 Edgard Castro <castro@usmatrix.net> [19990122-pl01-1] * Sun Jan 24 1999 Arne Coucheron <arneco@online.no> [19990122-1] - shell for postfix user changed to /bin/true to avoid logins to the account - files in /usr/libexec/postfix moved to %{_libdir}/postfix since this complies more with the Red Hat standard * Wed Jan 06 1999 Arne Coucheron <arneco@online.no> [19981230-2] - added URL for the source - added a cron job for daily check of errors - sample config files moved from /etc/postfix/sample to the docdir - dropped making of symlinks in /usr/sbin and instead installing the real files there - because of the previous they're not needed anymore in /usr/libexec/postfix, so they are removed from that place * Fri Jan 01 1999 Arne Coucheron <arneco@online.no> [19981230-1] * Tue Dec 29 1998 Arne Coucheron <arneco@online.no> [19981222-1] - first build of rpm version