1 |
slords |
1.1 |
Summary: Routing messages by user |
2 |
|
|
%define name smeserver-mailrouting |
3 |
|
|
Name: %{name} |
4 |
|
|
%define version 0.0.1 |
5 |
|
|
%define release 0 |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release}%{?dist} |
8 |
|
|
License: GPL |
9 |
|
|
Group: Mail |
10 |
|
|
Source: %{name}-%{version}.tar.gz |
11 |
|
|
BuildRoot: /var/tmp/%{name}-buildroot/ |
12 |
|
|
BuildArch: noarch |
13 |
|
|
Requires: smeserver-qpsmtpd qmail |
14 |
|
|
AutoReqProv: no |
15 |
|
|
|
16 |
|
|
%changelog |
17 |
|
|
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
18 |
|
|
- Clean up spec so package can be built by koji/plague |
19 |
|
|
|
20 |
|
|
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
21 |
|
|
- Update to new release naming. No functional changes. |
22 |
|
|
- Make Packager generic |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
* Thu Sep 1 2005 Michael Weinberger <mweinber@neddix.de> |
26 |
|
|
- Initial release |
27 |
|
|
|
28 |
|
|
%description |
29 |
|
|
for SME7 only! |
30 |
|
|
Routes mail to another server by the recipient name |
31 |
|
|
Routed recipient don't need a local account. |
32 |
|
|
Mailrouting is disabled, when "internal mail server" (smtproutes) is set. |
33 |
|
|
|
34 |
|
|
How to set up: |
35 |
|
|
/sbin/e-smith/db /home/e-smith/mailrouting set ADDRESS mailrouting MailroutingAddress MAILROUTINGADDRESS |
36 |
|
|
|
37 |
|
|
Example: Route messages for joe.sixpack here (foo.com) to server mail2.foo.com |
38 |
|
|
/sbin/e-smith/db /home/e-smith/mailrouting set joe.sixpack@foo.com mailrouting MailroutingAddress Joe.Sixpack@mail2.foo.com |
39 |
|
|
/etc/rc.d/rc7.d/S85qpsmtpd restart |
40 |
|
|
/etc/rc.d/rc7.d/S85sqpsmtpd restart |
41 |
|
|
/etc/rc.d/rc7.d/S80qmail restart |
42 |
|
|
|
43 |
|
|
Note the lower-case for the key (joe.sixpack@foo.com)! |
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
%prep |
48 |
|
|
%setup |
49 |
|
|
%setup -q -n %{name}-%{version} |
50 |
|
|
|
51 |
|
|
%build |
52 |
|
|
|
53 |
|
|
%install |
54 |
|
|
rm -rf $RPM_BUILD_ROOT |
55 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
56 |
|
|
rm -f %{name}-%{version}-filelist |
57 |
|
|
find $RPM_BUILD_ROOT -depth -type f -print |\ |
58 |
|
|
sed -e "s@^$RPM_BUILD_ROOT@@g" \ |
59 |
|
|
-e "s@^/etc/e-smith/templates/@%attr(0644,root,root) &@"\ |
60 |
|
|
-e "s@^/var/qmail/control/@%attr(0644,root,root) &@"\ |
61 |
|
|
-e "s@^/var/qmail/alias/@%attr(0644,alias,qmail) &@"\ |
62 |
|
|
-e "s@^/var/qmail/bin/@%attr(0755,root,qmail) &@"\ |
63 |
|
|
-e "s@^/home/e-smith/qmail/@%attr(0640,root,qmail) &@"\ |
64 |
|
|
>> %{name}-%{version}-filelist |
65 |
|
|
find $RPM_BUILD_ROOT -depth -type l -print |\ |
66 |
|
|
sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist |
67 |
|
|
|
68 |
|
|
%clean |
69 |
|
|
rm -rf $RPM_BUILD_ROOT |
70 |
|
|
|
71 |
|
|
%pre |
72 |
|
|
%preun |
73 |
|
|
%post |
74 |
|
|
|
75 |
|
|
touch -a /home/e-smith/mailrouting |
76 |
|
|
chown root.admin /home/e-smith/mailrouting |
77 |
|
|
chmod 644 /home/e-smith/mailrouting |
78 |
|
|
|
79 |
|
|
if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then |
80 |
|
|
/sbin/e-smith/signal-event email-update |
81 |
|
|
/etc/rc.d/rc7.d/S85qpsmtpd restart |
82 |
|
|
/etc/rc.d/rc7.d/S85sqpsmtpd restart |
83 |
|
|
/etc/rc.d/rc7.d/S80qmail restart |
84 |
|
|
fi |
85 |
|
|
%postun |
86 |
|
|
if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then |
87 |
|
|
if [ $1 = 0 ] ; then # uninstall |
88 |
|
|
/sbin/e-smith/signal-event email-update |
89 |
|
|
/etc/rc.d/rc7.d/S85qpsmtpd restart |
90 |
|
|
/etc/rc.d/rc7.d/S85sqpsmtpd restart |
91 |
|
|
/etc/rc.d/rc7.d/S80qmail restart |
92 |
|
|
fi |
93 |
|
|
fi |
94 |
|
|
|
95 |
|
|
%files -f %{name}-%{version}-filelist |
96 |
|
|
%defattr(-,root,root) |