[CentOS-devel] vpopmail-mysql package

Feizhou feizhou at graffiti.net
Fri Nov 24 13:07:35 UTC 2006


I am taking a shot at vpopmail with mysql support for centos in a 
environment where qmail will not be used as the receiving mta.

First will be a vpopmail package setup for mysql support only. Attached 
is the spec file. I have attached the source rpm to the howto.


-------------- next part --------------
%define vdir /home/vpopmail
Name: vpopmail-mysql
Summary:  A vpopmail package with mysql backend support
Version: 5.4.17
Release: centos4.1.mysql.manydomains
License: GPL
Group: System Environment/Daemons
URL: http://www.inter7.com/
Source0: vpopmail-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: mysql
Prereq: /var/qmail/bin/qmail-newu
BuildPrereq: mysql-devel

This package provides a virtual mail system complete with user account and domain management tools. The user account and domain information is stored in a mysql database and emails are stored in maildir format. vpopmail is designed for qmail so you will need other software to act as a LDA if you use MTA software other than qmail. This package supports mysql master/slave environments for clustering.

%setup -q -n vpopmail-5.4.17

%configure --enable-mysql-replication --enable-sql-logging --enable-auth-module=mysql --disable-users-big-dir --enable-valias --enable-libdir=%{_libdir}/mysql

rm -fr %{buildroot}
make DESTDIR=%{buildroot} install-strip

rm -fr %{buildroot}

#Add user and group account if necessary
if [ -z "`/usr/bin/id -g vchkpw 2>/dev/null`" ]; then
        /usr/sbin/groupadd -g 91 -r vchkpw 2>&1 || :

if [ -z "`/usr/bin/id -u vpopmail 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 91 -r -M -d %{vdir} -s /sbin/nologin -c "Vpopmail
User" -g vchkpw vpopmail 2>&1 || :

%defattr (-,vpopmail,vchkpw)
%attr(0755,vpopmail,vchkpw) %dir %{vdir}
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/bin
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/etc
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/include
%attr(0755,vpopmail,vchkpw) %dir %{vdir}/lib
%attr(0700,vpopmail,vchkpw) %dir %{vdir}/domains

%attr(0751,vpopmail,vchkpw) %{vdir}/bin/*
%attr(0444,vpopmail,vchkpw) %{vdir}/include/*
%attr(0600,vpopmail,vchkpw) %{vdir}/lib/*
%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/inc_deps
%attr(0644,vpopmail,vchkpw) %{vdir}/etc/lib_deps

%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/*

More information about the CentOS-devel mailing list