A second qmail instance on SME Server, see https://wiki.contribs.org/AltQmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

215 lines
13 KiB

%define version 0.1.0
%define release 2
%define name smeserver-altqmail
Summary: Second qmail instance
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: e-smith-devtools
Requires: e-smith-base >= 5.2.0
Requires: qmail
%description
Provides a second qmail instance, with its own configuration
Usefull if you want to reduce the ConcurrencyRemote option
only for some domains
%changelog
* Fri Sep 19 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-3.sme
- Yet another permission fix on remote/19 and local/19
* Mon May 19 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-2.sme
- Fix permissions on info/19 subdir
* Wed May 7 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-1.sme
- Initial release
%prep
%setup -q -n %{name}-%{version}
%build
%{__mkdir_p} root/var/log/{altqmail,altqmail-smtpd}
perl createlinks
mkdir -p root/var/service/altqmail/root/var/qmail/{queue,control,bin}
# Create the chrooted qmail queue
pushd root/var/service/altqmail/root/var/qmail/queue
mkdir pid
mkdir mess
mkdir todo
mkdir bounce
for i in `seq 0 22`; do
mkdir -p mess/$i
done
cp -r mess info
cp -r mess intd
cp -r mess local
cp -r mess remote
mkdir lock
dd bs=1024 count=1 if=/dev/zero of=lock/tcpto
mkfifo lock/trigger
touch lock/sendmutex
popd
%install
/bin/rm -rf $RPM_BUILD_ROOT
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
/bin/rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--file /var/service/altqmail/run 'attr(0755,root,root)' \
--file /var/service/altqmail/finish 'attr(0755,root,root)' \
--file /var/service/altqmail/log/run 'attr(0755,root,root)' \
--file /var/service/altqmail-smtpd/run 'attr(0755,root,root)' \
--file /var/service/altqmail-smtpd/log/run 'attr(0755,root,root)' \
--dir /var/log/altqmail 'attr(0750,qmaill,root)' \
--dir /var/log/altqmail-smtpd 'attr(0750,qmaill,root)' \
--dir /var/service/altqmail/root/var/qmail/queue 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/bounce 'attr(0755,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/lock 'attr(0750,qmailq,qmail)' \
--file /var/service/altqmail/root/var/qmail/queue/lock/tcpto 'attr(0644,qmailr,qmail)' \
--file /var/service/altqmail/root/var/qmail/queue/lock/sendmutex 'attr(0600,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/0 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/1 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/2 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/3 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/4 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/5 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/6 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/7 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/8 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/9 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/10 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/11 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/12 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/13 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/14 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/15 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/16 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/17 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/18 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/19 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/20 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/21 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/intd/22 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/0 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/1 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/2 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/3 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/4 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/5 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/6 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/7 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/8 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/9 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/10 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/11 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/12 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/13 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/14 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/15 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/16 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/17 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/18 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/19 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/20 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/21 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/local/22 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/0 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/1 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/2 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/3 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/4 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/5 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/6 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/7 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/8 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/9 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/10 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/11 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/12 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/13 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/14 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/15 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/16 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/17 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/18 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/19 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/20 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/21 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/info/22 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/pid 'attr(0700,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/0 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/1 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/2 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/3 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/4 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/5 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/6 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/7 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/8 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/9 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/10 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/11 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/12 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/13 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/14 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/15 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/16 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/17 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/18 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/19 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/20 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/21 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/remote/22 'attr(0700,qmails,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/0 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/1 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/2 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/3 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/4 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/5 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/6 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/7 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/8 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/9 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/10 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/11 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/12 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/13 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/14 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/15 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/16 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/17 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/18 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/19 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/20 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/21 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/mess/22 'attr(0750,qmailq,qmail)' \
--dir /var/service/altqmail/root/var/qmail/queue/todo 'attr(0750,qmailq,qmail)' \
> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%post
%preun