forked from QMailToaster/vpopmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpopmail.spec
410 lines (379 loc) · 17.2 KB
/
vpopmail.spec
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
Name: vpopmail
Summary: Vpopmail for QMail Toaster
Version: 5.4.33
Release: 0%{?dist}
License: GPL
Group: Networking/Other
Vendor: QmailToaster
Packager: Eric Shubert <[email protected]>
URL: http://www.inter7.com/%{name}
Source0: http://downloads.sourceforge.net/project/vpopmail/vpopmail-stable/5.4.33/%{name}-%{version}.tar.gz
Source1: vpopmail.mysql
Patch0: vpopmail-toaster-5.4.33.patch
Patch1: vpopmail-build-no-root-5.4.33.patch
Patch2: vpopmail-build-no-qmail-5.4.33.patch
Patch3: vpopmail-build-devel-5.4.33.patch
BuildRequires: automake
BuildRequires: libev-devel
BuildRequires: libvpopmail-static
BuildRequires: mysql-devel >= 5.0.22
Requires: libev
Requires: mysql-server >= 5.0.22
Obsoletes: vpopmail-toaster
Obsoletes: vpopmail-toaster-doc
Conflicts: set-toaster
Conflicts: checkpassword
BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release}.%{_arch}
%define debug_package %{nil}
%define vdir /home/vpopmail
#-------------------------------------------------------------------------------
%description
#-------------------------------------------------------------------------------
vpopmail (vchkpw) is a collection of programs and a library to automate
the creation and maintence of virtual domain email for qmail installations
using either a single UID/GID, or any valid UID/GID in /etc/passwd with a
home directory. All the features are provided in the library for other
applications which need to maintain virtual domain email accounts.
It supports named or IP based domains. It works with vqadmin, qmailadmin,
vqregister, sqwebmail, and dovecot.
It supports MySQL, Sybase, Oracle, LDAP, and file-based (DJB constant
database) authentication.
It handles 10 to 10 million users, and over 500K domains.
vpopmail 5.4.33
Current settings
---------------------------------------
vpopmail directory = /home/vpopmail
uid = 89
gid = 89
roaming users = OFF --disable-roaming-users (default)
password learning = OFF --disable-learn-passwords (default)
md5 passwords = ON --enable-md5-passwords (default)
file locking = ON --enable-file-locking (default)
vdelivermail fsync = OFF --disable-file-sync (default)
make seekable = ON --enable-make-seekable (default)
clear passwd = ON --enable-clear-passwd (default)
user dir hashing = OFF --disable-users-big-dir
address extensions = ON --enable-qmail-ext
ip alias = OFF --disable-ip-alias-domains (default)
auth module = mysql --enable-auth-module=mysql
mysql replication = OFF --disable-mysql-replication (default)
sql logging = OFF --disable-sql-logging (default)
mysql limits = OFF --disable-mysql-limits (default)
MySQL valias = ON --enable-valias
auth inc = -I/usr/include/mysql
auth lib = -L/usr/lib64/mysql -lmysqlclient -lz -lm
system passwords = OFF --disable-passwd (default)
pop syslog = log success and errors including passwords
--enable-logging=v
auth logging = ON --enable-auth-logging (default)
one domain per SQL table = --disable-many-domains
#-------------------------------------------------------------------------------
%prep
#-------------------------------------------------------------------------------
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------
autoreconf
%{__automake}
%{__autoconf}
./configure --prefix=%{vdir} \
--enable-vpopuser=vpopmail \
--enable-vpopgroup=vchkpw \
--enable-libdir=%{_libdir}/mysql \
--disable-roaming-users \
--enable-tcprules-prog=/usr/bin/tcprules \
--enable-tcpserver-file=/etc/tcprules.d/tcp.smtp \
--enable-make-seekable \
--enable-clear-passwd \
--disable-users-big-dir \
--enable-qmail-ext \
--disable-ip-alias-domains \
--enable-auth-module=mysql \
--disable-passwd \
--enable-logging=v \
--enable-log-name=vpopmail \
--disable-mysql-limits \
--enable-valias \
--disable-many-domains \
--enable-non-root-build
make
pushd vusaged
%{__autoconf}
./configure --with-vpopmail=%{_sysconfdir}/libvpopmail
make
popd
#-------------------------------------------------------------------------------
%install
#-------------------------------------------------------------------------------
%{__rm} -rf %{buildroot}
make DESTDIR=%{buildroot} install-strip
# Set defaults for vpopmail mysql
#-------------------------------------------------------------------------------
%{__mv} %{buildroot}%{vdir}/etc/vpopmail.mysql \
%{buildroot}%{vdir}/etc/vpopmail.mysql.dist
%{__install} -p %{SOURCE1} %{buildroot}%{vdir}/etc/
# Install domain quota messages
#-------------------------------------------------------------------------------
# install overquota.msg %{buildroot}%{vdir}/domains
%{__install} quotawarn.msg %{buildroot}%{vdir}/domains/.quotawarn.msg
# Remove devel files since they're in libvpopmail-devel now
#-------------------------------------------------------------------------------
%{__rm} %{buildroot}%{vdir}/etc/*_deps
rm -rf %{buildroot}%{vdir}/include \
%{buildroot}%{vdir}/lib
# Install vusaged
#-------------------------------------------------------------------------------
%{__install} -p vusaged/vusaged %{buildroot}%{vdir}/bin/
%{__install} -p vusaged/etc/vusaged.conf %{buildroot}%{vdir}/etc/
%{__install} -Dp vusaged/contrib/rc.vusaged %{buildroot}%{_initrddir}/vusaged
# TODO: vusaged.conf and vusagec.conf might need to be edited
#-------------------------------------------------------------------------------
%clean
#-------------------------------------------------------------------------------
%{__rm} -rf %{buildroot}
#-------------------------------------------------------------------------------
%pre
#-------------------------------------------------------------------------------
# Remove postfix user and group if they exist
#-------------------------------------------------------------------------------
rpm -q postfix >/dev/null 2>&1
rc=$?
if [ "$rc" == "0" ]; then
service postfix status >/dev/null 2>&1
rc=$?
if [ "$rc" == "0" ]; then
service postfix stop >/dev/null 2>&1
fi
chkconfig postfix off >/dev/null 2>&1
fi
if [ "`/usr/bin/id -u postfix 2>/dev/null`" == "89" ]; then
/usr/sbin/userdel postfix
fi
#-------------------------------------------------------------------------------
# Create group and user for vpopmail if they don't exist
#-------------------------------------------------------------------------------
if [ -z "`/usr/bin/id -g vchkpw 2>/dev/null`" ]; then
/usr/sbin/groupadd -g 89 -r vchkpw 2>&1 || :
fi
if [ -z "`/usr/bin/id -u vpopmail 2>/dev/null`" ]; then
/usr/sbin/useradd -u 89 -r -M -d %{vdir} -s /sbin/nologin -c "Vpopmail User" -g vchkpw vpopmail 2>&1 || :
fi
#-------------------------------------------------------------------------------
%preun
#-------------------------------------------------------------------------------
if [ "$1" = "0" ]; then
if [ ! -z "`/usr/bin/id -u vpopmail 2>/dev/null`" ]; then
userdel vpopmail 2> /dev/null
fi
if [ ! -z "`/usr/bin/id -g vchkpw 2>/dev/null`" ]; then
groupdel vchkpw 2> /dev/null
fi
fi
#-------------------------------------------------------------------------------
%post
#-------------------------------------------------------------------------------
if [ "$1" = "1" ]; then
chkconfig --add vusaged
# chkconfig vusaged on
# service vusaged start
fi
#-------------------------------------------------------------------------------
%files
#-------------------------------------------------------------------------------
%defattr (-,vpopmail,vchkpw)
%attr(0700,vpopmail,vchkpw) %dir %{vdir}
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/bin
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/etc
%attr(0700,vpopmail,vchkpw) %dir %{vdir}/domains
%attr(0751,vpopmail,vchkpw) %{vdir}/bin/*
%attr(0750,vpopmail,vchkpw) %{_initrddir}/vusaged
%attr(0644,vpopmail,vchkpw) %{vdir}/domains/.quotawarn.msg
#%attr(0644,vpopmail,vchkpw) %{vdir}/domains/.overquota.msg
%attr(0644,vpopmail,vchkpw) %{vdir}/etc/vusagec.conf
%attr(0644,vpopmail,vchkpw) %{vdir}/etc/vusaged.conf
%attr(0644,vpopmail,vchkpw) %config(noreplace) %{vdir}/etc/vlimits.default
%attr(0644,vpopmail,vchkpw) %config(noreplace) %{vdir}/etc/vpopmail.mysql
%attr(0644,vpopmail,vchkpw) %{vdir}/etc/vpopmail.mysql.dist
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/doc
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/doc/doc_html
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/doc/man_html
%attr(0444,vpopmail,vchkpw) %{vdir}/doc/doc_html/*
%attr(0444,vpopmail,vchkpw) %{vdir}/doc/man_html/*
#-------------------------------------------------------------------------------
%changelog
#-------------------------------------------------------------------------------
* Sun Dec 15 2013 Eric Shubert <[email protected]> 5.4.33-0.qt
- Split out libvpopmail package. This still needs more work to be clean.
* Thu Dec 06 2013 Eric Shubert <[email protected]> 5.4.33-0.qt
- Added script to secure and initialize mysql database
* Fri Nov 15 2013 Eric Shubert <[email protected]> 5.4.33-0.qt
- Migrated to github
- Removed -toaster designation
- Created vpopmail-build-no-root patch. Thanks go to Johannes Weberhofer.
- Added CentOS 6 support
- Removed unsupported cruft
- Created separate -devel package
* Wed Aug 1 2012 Eric Shubert <[email protected]> 5.4.33-1.4.0
- Bumped version to 1.4.0
* Fri Feb 25 2011 Jake Vickers <[email protected]> 5.4.33-1.3.8
- Updated vpopmail to 5.4.33
- Re-diffed the qmailtoaster patch for 5.4.33
* Fri Jun 12 2009 Jake Vickers <[email protected]> 5.4.17-1.3.7
- Added Fedora 11 support
- Added Fedora 11 x86_64 support
* Tue Jun 02 2009 Jake Vickers <[email protected]> 5.4.17-1.3.7
- Added Mandriva 2009 support
* Wed Apr 22 2009 Jake Vickers <[email protected]> 5.4.17-1.3.6
- Added Fedora 9 x86_64 and Fedora 10 x86_64 support
* Fri Feb 13 2009 Jake Vickers <[email protected]> 5.4.17-1.3.5
- Added Suse 11.1 support
* Sun Feb 08 2009 Jake Vickers <[email protected]> 5.4.17-1.3.5
- Added Fedora 9 and 10 support
* Sat Apr 14 2007 Nick Hemmesch <[email protected]> 5.4.17-1.3.4
- Update to vpopmail-5.4.17
- Added CentOS 5 i386 support
- Added CentOS 5 x86_64 support
* Wed Nov 01 2006 Erik A. Espinoza <[email protected]> 5.4.13-1.3.3
- Added Fedora Core 6 support
* Fri Jul 14 2006 Erik A. Espinoza <[email protected]> 5.4.13-1.3.2
- Added vpopmail-5.4.13-mysql patch, fixes mysql's gone away error
* Mon Jun 05 2006 Nick Hemmesch <[email protected]> 5.4.13-1.3.1
- Add SuSE 10.1 support
* Sat May 13 2006 Nick Hemmesch <[email protected]> 5.4.13-1.2.12
- Add Fedora Core 5 support
* Fri Apr 28 2006 Nick Hemmesch <[email protected]> 5.4.13-1.2.11
- Update to vpopmail-5.4.13
* Sun Nov 20 2005 Nick Hemmesch <[email protected]> 5.4.10-1.2.10
- Add SuSE 10.0 and Mandriva 2006.0 support
* Fri Oct 14 2005 Nick Hemmesch <[email protected]> 5.4.10-1.2.9
- Add Fedora Core 4 x86_64 support
- Make vlimits.default and vpopmail.mysql no replace config files
* Sat Oct 01 2005 Nick Hemmesch <[email protected]> 5.4.10-1.2.8
- Add CentOS 4 x86_64 support
* Wed Jun 29 2005 Nick Hemmesch <[email protected]> 5.4.10-1.2.7
- Add Fedora Core 4 support
* Fri Jun 03 2005 Torbjorn Turpeinen <[email protected]> 5.4.10-1.2.6
- Gnu/Linux Mandrake 10.0,10.1,10.2 support
* Fri May 20 2005 Nick Hemmesch <[email protected]> 5.4.10-1.2.5
- Update to vpopmail-5.4.10
- Create group and user
* Tue Mar 15 2005 Nick Hemmesch <[email protected]> 5.4.4-1.2.4
- Add patch to build vpopmail before qmail
- Fix domainquotas
* Sun Feb 27 2005 Nick Hemmesch <[email protected]> 5.4.4-1.2.3
- Add Fedora Core 3 support
- Add CentOS suport
* Wed Jun 02 2004 Nick Hemmesch <[email protected]> 5.4.4-1.2.2
- Update to vpopmail-5.4.4
- Add Fedora Core 2 support
* Tue May 04 2004 Nick Hemmesch <[email protected]> 5.4.3-1.2.1
- Major rebuild of spec file
- Update to vpopmail-5.4.3
- Make rpm patch and config patch
* Sun Feb 22 2004 Nick Hemmesch <[email protected]> 5.3.8-1.0.12
- By popular demand, make no roaming users the default install
- Allow roaming users with "roaming" switch
* Sun Feb 15 2004 Nick Hemmesch <[email protected]> 5.3.8-1.0.11
- Set roaming user clear time to 15 minutes
* Mon Jan 12 2004 Nick Hemmesch <[email protected]> 5.3.8-1.0.10
- Fix for Trustix 2.0 by Christian Dietrich
* Sat Jan 10 2004 Nick Hemmesch <[email protected]> 5.3.8-1.0.9
- Add Fedora Core 1 support
- Fix Trustix 2.0 - change dependency
- Add no roaming-users as an option
- Add 15 minute expiration for roaming users
* Sun Nov 23 2003 Nick Hemmesch <[email protected]> 5.3.8-1.0.8
- Add Trustix 2.0
- Fix cdb function
- New patch to fix vmysql.h configure and to allow rpm build
* Sat Apr 26 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.7
- Clean-ups on SPEC file: compilation banner, better gcc detects
- Detect gcc-3.2.3
- Red Hat Linux 9.0 support ([email protected])
- Gnu/Linux Mandrake 9.2 support
* Wed Apr 02 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.6
- Clean-ups
* Mon Mar 31 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.5
- Conectiva Linux 7.0 support
* Sun Feb 15 2003 Nick Hemmesch <[email protected]> 5.3.8-1.0.4
- Support for Red Hat 8.0
* Wed Feb 05 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.3
- Support for Red Hat 8.0 thanks to Andrew.J.Kay
* Sat Feb 01 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.2
- Redo Macros to prepare supporting larger RPM OS.
We could be able to compile (and use) packages under every RPM based
distribution: we just need to write right requirements.
* Sat Jan 25 2003 Miguel Beccari <[email protected]> 5.3.8-1.0.1
- Added MDK 9.1 support
- Try to use gcc-3.2.1
- Added very little patch to compile with newest GLIBC
- Support dor new RPM-4.0.4
* Sat Oct 05 2002 Miguel Beccari <[email protected]> 5.3.8-0.9.2
- Soft clean-ups
* Sun Sep 29 2002 Miguel Beccari <[email protected]> 5.3.8-0.9.1
- RPM macros to detect Mandrake, RedHat, Trustix are OK again. They are
very basic but they should work.
- Packages are named with their proper releases and bversion is from now
part of the rpm release: we will continue upgrading safely.
* Mon Sep 23 2002 Miguel Beccari <[email protected]> 0.8.5.3.8-1
- Rebuilded under 0.8 tree.
- Important comments translated from Italian to English.
- Written rpm rebuilds instruction at the top of the file (in english).
- Clean-ups
* Sun Sep 22 2002 Miguel Beccari <[email protected]> 0.7.5.3.8-3
- Now cron-job works 100%!!!
* Thu Aug 29 2002 Miguel Beccari <[email protected]> 0.7.5.3.8-2
- Deleted Mandrake Release Autodetection (creates problems)
* Fri Aug 16 2002 Miguel Beccari <[email protected]> 0.7.5.3.8-1
- New version: 0.7 toaster.
- Better macros to detect Mandrake Release
- Minor clean-ups.
* Thu Aug 13 2002 Miguel Beccari <[email protected]> 0.6.5.3.8-1
- New version: 0.6 toaster.
* Mon Aug 12 2002 Miguel Beccari <[email protected]> 0.5.5.3.8-1
- Doc package is standalone (someone does not ask for man pages)
- Checks for gcc-3.2 (default compiler from now)
- New version: 0.5 toaster.
* Tue Aug 08 2002 Miguel Beccari <[email protected]> 0.4.5.3.8-1
* Rebuild agains 0.4 toaster
- new version 5.3.8
* Thu Aug 06 2002 Miguel Beccari <[email protected]> 0.3.5.3.5-4
- Deleted userdel and groupdel in uninstallation (safe): if the user
wants to delete he has to do it manually (more safe)
* Wed Jul 31 2002 Miguel Beccari <[email protected]> 0.3.5.3.5-3
- Written a patch that makes vpopmail constantly reading from sql:
in this way tou can change on the fly sql values and we could build
binaries version of packages (because passwords are out of the code)
* Tue Jul 30 2002 Miguel Beccari <[email protected]> 0.3.5.3.5-2
- Now packages have got 'no sex': you can rebuild them with command line
flags for specifics targets that are: RedHat, Trustix, and of course
Mandrake (that is default)
* Sun Jul 28 2002 Miguel Beccari <[email protected]> 0.2.5.3.5.1mdk
- toaster v. 0.3: now it is possible upgrading safely because of 'pversion'
that is package version and 'version' that is toaster version
* Thu Jul 25 2002 Miguel Beccari <[email protected]> 0.2-5.3.5.1mdk
- toaster v. 0.2: Very soft clean-ups.
* Mon Jul 22 2002 Miguel Beccari <[email protected]> 0.1-5.3.5.4mdk
- Added useradd -r flag to create systems account. That is, an user with an
UID lower than value of UID_MIN defined in /etc/login.defs
* Thu Jul 18 2002 Miguel Beccari <[email protected]> 0.1-5.3.5.3mdk
- Added toaster version (we will need to mantain it too): is vtoaster 0.1
- Added cron.d files
- Added tests to make gcc to be 3.1.1
- Very soft clean-ups.
* Wed Jul 10 2002 Miguel Beccari <[email protected]> 5.3.5 2mdk
- Better dependecings (with ucspi-tcp)
- Changed the name in vpopmail-toaster beacuse we are going
building *-toaster packages.
* Mon Jul 08 2002 Miguel Beccari <[email protected]> 5.3.5 1mdk
- First package (needs a lot of work).
- However the package is able to:
* detect if user vpopmail exists (if not it creates)
* detect if group exists (if not it creates)
* apply a light patch stuff for 'make install' operations
* read /var/qmail/control/sql and patch vmysql.h