1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
Name: relay-ctrl
Summary: SMTP Relaying Control for qmail & tcpserver
Version: 2.5
Release: 1
Copyright: GPL
Group: Utilities/System
Source: http://em.ca/~bruceg/relay-ctrl/relay-ctrl-2.5.tar.gz
BuildRoot: /tmp/relay-ctrl-root
URL: http://em.ca/~bruceg/relay-ctrl/
Packager: Bruce Guenter <bruceg@em.ca>
Requires: qmail >= 1.03+patches
Requires: ucspi-tcp >= 0.84
Requires: vixie-cron >= 3.0
Obsoletes: open-smtp
%description
This package allows SMTP relaying for any host that authenticates with POP3.
%prep
%setup
%build
make CFLAGS="$RPM_OPT_FLAGS -DTCPRULES=\\\"/usr/bin/tcprules\\\"" LDFLAGS="-s" prefix=/usr
%install
rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/{etc/cron.d,etc/relay-ctrl,usr/sbin,var/spool/relay-ctrl}
make prefix=$RPM_BUILD_ROOT/usr install
echo '* * * * * root /usr/sbin/relay-ctrl-age' >$RPM_BUILD_ROOT/etc/cron.d/relay-ctrl
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ "$1" = 1 ]; then
cpfile=/etc/qmail/control/checkpassword
if [ -f $cpfile ]; then
cp=`cat $cpfile`
else
cp=checkpassword
fi
echo "$cp /usr/sbin/relay-ctrl-allow" > $cpfile
fi
%preun
if [ "$1" = 0 ]; then
cpfile=/etc/qmail/control/checkpassword
cp=`sed -e 's| /usr/sbin/relay-ctrl-allow||' $cpfile`
echo "$cp" >$cpfile
# Remove old relay-ctrl entries
rm -f /var/spool/relay-ctrl/*
/usr/sbin/relay-ctrl-age
fi
%files
%defattr(-,root,root)
%doc COPYING ChangeLog README NEWS YEAR2000
%config /etc/cron.d/*
%dir /etc/relay-ctrl
# %config /etc/relay-ctrl/*
/usr/sbin/relay-ctrl-age
%attr(4711,root,root) /usr/sbin/relay-ctrl-allow
%dir /var/spool/relay-ctrl
/usr/man/man8/*
|