# Automatically edited; change at your own high risk %define destdir %buildroot Buildprereq: shadow-utils Buildroot: /tmp/var-qmail-root Conflicts: sendmail exim smail Copyright: Check with djb@cr.yp.to ExclusiveOS: Linux Group: Utilities/System Name: qmail ###Obsoletes: qmail Packager: mw@csi.hu Provides: MTA smtpdaemon ### For now, commented # Provides: qmail Release: 109memphis Requires: shadow-utils Source: var-qmail-1.03.tar.gz Summary: qmail Mail Transfer Agent URL: http://cr.yp.to/qmail.html Version: 1.03 %description qmail is a small, fast, secure replacement for the sendmail package, which is the program that actually receives, routes, and delivers electronic mail. *** Note: Be sure and read the documentation as there are some small but very significant differences between sendmail and qmail and the programs that interact with them. %prep ### remove argument to -n when qmail can be changed to var-qmail %setup -n var-qmail-1.03 %install rm -rf %destdir make # these are needed/useful after installation cp config config-fast dnsfq dnsip dnsptr hostname \ instcheck ipmeprint /tmp/var-qmail-root/var/qmail/bin %clean rm -rf %destdir %pre export PATH=/command:/usr/local/bin:$PATH # Try to stop qmail daemons for those who do not # read READMEs for i in "" -smtpd -pop3d -qmtpd -qmqpd; do if [ -f /etc/rc.d/init.d/qmail${i}.init ]; then /etc/rc.d/init.d/qmail${i}.init stop fi if [ -f /service/qmail${i} ]; then svc -d /service/qmail${i} fi done if [ -f /etc/rc.d/init.d/rblsmtpd.init ]; then /etc/rc.d/init.d/rblsmtpd.init stop fi if [ -L /service/rblsmtpd ]; then svc -d /service/rblsmtpd fi %preun export PATH=/command:/usr/local/bin:$PATH # Try to stop qmail daemons for those who do not # read READMEs for i in "" -smtpd -pop3d -qmtpd -qmqpd; do if [ -f /etc/rc.d/init.d/qmail${i}.init ]; then /etc/rc.d/init.d/qmail${i}.init stop fi if [ -L /service/qmail${i} ]; then svc -d /service/qmail${i} fi done if [ -f /etc/rc.d/init.d/rblsmtpd.init ]; then /etc/rc.d/init.d/rblsmtpd.init stop fi if [ -L /service/rblsmtpd ]; then svc -d /service/rblsmtpd fi %post # set up files in /var/qmail/control only if we are not upgrading if [ $1 = "1" ]; then ( cd /var/qmail/bin ./config-fast $(hostname -f) ) fi ( cd /var/qmail/bin ./instcheck ) %postun # If qmail is removed (so not upgraded): if [ $1 = 0 ]; then # this is needed for user* and group* programs export PATH=$PATH:/usr/sbin echo "" echo "Removing qmail users (if they exist):" function user_del() { if id -u $1 >/dev/null 2> /dev/null ; then echo " Removing $1 user ..." userdel $1 fi } for i in alias qmaild qmaill qmailp qmailq qmailr qmails; do user_del $i done ## update nis database if /sbin/pidof ypserv >/dev/null 2>/dev/null; then (cd /var/yp; make) fi echo "" echo "Removing qmail groups (if they exist):" function group_del() { if groupmod $1 >/dev/null 2> /dev/null; then echo " Removing $1 group ..." groupdel $1 fi } for i in nofiles qmail; do group_del $i done ## update nis database if /sbin/pidof ypserv >/dev/null 2>/dev/null; then (cd /var/yp; make) fi fi %files %config /var/qmail/boot/* %doc doc/* %dir /var/qmail %dir /var/qmail/alias %dir /var/qmail/boot %dir /var/qmail/control %dir /var/qmail/users /var/qmail/bin /var/qmail/doc /var/qmail/man /var/qmail/queue /var/qmail/rc %changelog * Thu May 2 2002 Mate Wierdl - updated for daemontools stop * Wed Aug 11 1999 -- put in %pre and %preun to try to stop the daemons.