automatic version update by autodist [release 2.11.1-1mamba;Thu May 08 2014]
This commit is contained in:
parent
8571062f66
commit
99cc4d07b6
@ -1,2 +1,5 @@
|
|||||||
# postfix
|
# postfix
|
||||||
|
|
||||||
|
Postfix attempts to be fast, easy to administer, and secure, while at the same time being sendmail compatible enough to not upset existing users.
|
||||||
|
Thus, the outside has a sendmail-ish flavor, but the inside is completely different.
|
||||||
|
|
||||||
|
100
postfix-initscript
Normal file
100
postfix-initscript
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# /etc/rc.d/init.d/postfix
|
||||||
|
#
|
||||||
|
# Copyright (c) 2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
#
|
||||||
|
# Start/stop the postscript mail daemon
|
||||||
|
#
|
||||||
|
# chkconfig: 345 30 60
|
||||||
|
# description: The postfix mail daemon
|
||||||
|
# processname: postfix
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
PROGNAME=postfix
|
||||||
|
test -x /usr/sbin/$PROGNAME || exit 0
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
|
||||||
|
#
|
||||||
|
# See how we were called.
|
||||||
|
#
|
||||||
|
|
||||||
|
start() {
|
||||||
|
echo -n "Starting $PROGNAME: "
|
||||||
|
/usr/sbin/$PROGNAME start
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$PROGNAME
|
||||||
|
evaluate_retval
|
||||||
|
echo
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
if [[ -f /var/lock/subsys/$PROGNAME ]]; then
|
||||||
|
echo -n "Stopping $PROGNAME: "
|
||||||
|
/usr/sbin/$PROGNAME stop
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROGNAME
|
||||||
|
evaluate_retval
|
||||||
|
echo
|
||||||
|
return $RETVAL
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
/usr/sbin/$PROGNAME reload
|
||||||
|
}
|
||||||
|
|
||||||
|
flush() {
|
||||||
|
/usr/sbin/$PROGNAME flush
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
/usr/sbin/$PROGNAME check
|
||||||
|
}
|
||||||
|
|
||||||
|
abort() {
|
||||||
|
/usr/sbin/$PROGNAME abort
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
reload
|
||||||
|
;;
|
||||||
|
abort)
|
||||||
|
abort
|
||||||
|
;;
|
||||||
|
flush)
|
||||||
|
flush
|
||||||
|
;;
|
||||||
|
check)
|
||||||
|
check
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
if [ -f /var/lock/subsys/$PROGNAME ]; then
|
||||||
|
restart
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status $PROGNAME
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
INITNAME=`basename $0`
|
||||||
|
echo "Usage: $INITNAME {start|stop|restart|reload|condrestart|abort|flush|check|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
99
postfix-mysql-tables.txt
Normal file
99
postfix-mysql-tables.txt
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
#
|
||||||
|
# Table structure for table admin
|
||||||
|
#
|
||||||
|
CREATE TABLE admin (
|
||||||
|
username varchar(255) NOT NULL default '',
|
||||||
|
password varchar(255) NOT NULL default '',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
modified datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
PRIMARY KEY (username),
|
||||||
|
KEY username (username)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Admins';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table alias
|
||||||
|
#
|
||||||
|
CREATE TABLE alias (
|
||||||
|
address varchar(255) NOT NULL default '',
|
||||||
|
goto text NOT NULL,
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
modified datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
PRIMARY KEY (address),
|
||||||
|
KEY address (address)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table domain
|
||||||
|
#
|
||||||
|
CREATE TABLE domain (
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
description varchar(255) NOT NULL default '',
|
||||||
|
aliases int(10) NOT NULL default '0',
|
||||||
|
mailboxes int(10) NOT NULL default '0',
|
||||||
|
maxquota int(10) NOT NULL default '0',
|
||||||
|
transport varchar(255) default NULL,
|
||||||
|
backupmx tinyint(1) NOT NULL default '0',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
modified datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
PRIMARY KEY (domain),
|
||||||
|
KEY domain (domain)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table domain_admins
|
||||||
|
#
|
||||||
|
CREATE TABLE domain_admins (
|
||||||
|
username varchar(255) NOT NULL default '',
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
KEY username (username)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table log
|
||||||
|
#
|
||||||
|
CREATE TABLE log (
|
||||||
|
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
username varchar(255) NOT NULL default '',
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
action varchar(255) NOT NULL default '',
|
||||||
|
data varchar(255) NOT NULL default '',
|
||||||
|
KEY timestamp (timestamp)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Log';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table mailbox
|
||||||
|
#
|
||||||
|
CREATE TABLE mailbox (
|
||||||
|
username varchar(255) NOT NULL default '',
|
||||||
|
password varchar(255) NOT NULL default '',
|
||||||
|
name varchar(255) NOT NULL default '',
|
||||||
|
maildir varchar(255) NOT NULL default '',
|
||||||
|
quota int(10) NOT NULL default '0',
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
modified datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
PRIMARY KEY (username),
|
||||||
|
KEY username (username)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table vacation
|
||||||
|
#
|
||||||
|
CREATE TABLE vacation (
|
||||||
|
email varchar(255) NOT NULL default '',
|
||||||
|
subject varchar(255) NOT NULL default '',
|
||||||
|
body text NOT NULL,
|
||||||
|
cache text NOT NULL,
|
||||||
|
domain varchar(255) NOT NULL default '',
|
||||||
|
created datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
active tinyint(1) NOT NULL default '1',
|
||||||
|
PRIMARY KEY (email),
|
||||||
|
KEY email (email)
|
||||||
|
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Vacation';
|
5
postfix-mysql_relay_domains_maps.cf
Normal file
5
postfix-mysql_relay_domains_maps.cf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
user = postfix
|
||||||
|
password = _mydbpassword_
|
||||||
|
hosts = localhost
|
||||||
|
dbname = postfix
|
||||||
|
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
|
5
postfix-mysql_virtual_alias_maps.cf
Normal file
5
postfix-mysql_virtual_alias_maps.cf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
user = postfix
|
||||||
|
password = _mydbpassword_
|
||||||
|
hosts = localhost
|
||||||
|
dbname = postfix
|
||||||
|
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
|
7
postfix-mysql_virtual_domains_maps.cf
Normal file
7
postfix-mysql_virtual_domains_maps.cf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
user = postfix
|
||||||
|
password = _mydbpassword_
|
||||||
|
hosts = localhost
|
||||||
|
dbname = postfix
|
||||||
|
query = SELECT domain FROM domain WHERE domain='%s'
|
||||||
|
#optional query to use when relaying for backup MX
|
||||||
|
#query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '0' and active = '1'
|
6
postfix-mysql_virtual_mailbox_limit_maps.cf
Normal file
6
postfix-mysql_virtual_mailbox_limit_maps.cf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
user = postfix
|
||||||
|
password = _mydbpassword_
|
||||||
|
hosts = localhost
|
||||||
|
dbname = postfix
|
||||||
|
query = SELECT quota FROM mailbox WHERE username='%s'
|
||||||
|
|
5
postfix-mysql_virtual_mailbox_maps.cf
Normal file
5
postfix-mysql_virtual_mailbox_maps.cf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
user = postfix
|
||||||
|
password = _mydbpassword_
|
||||||
|
hosts = localhost
|
||||||
|
dbname = postfix
|
||||||
|
query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = 1
|
1368
postfix-vda-v11-2.9.1.patch
Normal file
1368
postfix-vda-v11-2.9.1.patch
Normal file
File diff suppressed because it is too large
Load Diff
445
postfix.spec
Normal file
445
postfix.spec
Normal file
@ -0,0 +1,445 @@
|
|||||||
|
%define groupid 65030
|
||||||
|
%define userid 65030
|
||||||
|
%define vmail_groupid 64901
|
||||||
|
%define vmail_userid 64907
|
||||||
|
%define nobodygroupid 65013
|
||||||
|
%define nobodyuserid 65013
|
||||||
|
|
||||||
|
%define postdrop_groupid 65031
|
||||||
|
|
||||||
|
Name: postfix
|
||||||
|
Version: 2.11.1
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: A fast, easy to administer, and secure mail transfer agent
|
||||||
|
Group: System/Servers
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://www.postfix.org
|
||||||
|
Source: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
|
||||||
|
Source1: %{name}-initscript
|
||||||
|
Source2: %{name}-mysql_virtual_alias_maps.cf
|
||||||
|
Source3: %{name}-mysql_virtual_domains_maps.cf
|
||||||
|
Source4: %{name}-mysql_virtual_mailbox_maps.cf
|
||||||
|
Source5: %{name}-mysql_virtual_mailbox_limit_maps.cf
|
||||||
|
Source6: %{name}-mysql_relay_domains_maps.cf
|
||||||
|
Source7: %{name}-mysql-tables.txt
|
||||||
|
# patch path for download: http://vda.sourceforge.net/VDA/postfix-%{version}-vda-ng.patch.gz
|
||||||
|
Patch0: http://vda.sourceforge.net/VDA/%{name}-vda-v11-2.9.1.patch
|
||||||
|
License: IBM Public License
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libdb51-devel
|
||||||
|
BuildRequires: libmysql5-devel
|
||||||
|
BuildRequires: libopenldap-devel
|
||||||
|
BuildRequires: libpcre-devel
|
||||||
|
BuildRequires: libsasl-devel
|
||||||
|
BuildRequires: libz-devel
|
||||||
|
BuildRequires: mysql-client
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
Provides: mta
|
||||||
|
Provides: /usr/lib/sendmail
|
||||||
|
|
||||||
|
%description
|
||||||
|
Postfix attempts to be fast, easy to administer, and secure, while at the same time being sendmail compatible enough to not upset existing users.
|
||||||
|
Thus, the outside has a sendmail-ish flavor, but the inside is completely different.
|
||||||
|
|
||||||
|
%package virtualdomains-mysql
|
||||||
|
Summary: virtualdomains addon package for Postfix with mysql
|
||||||
|
Group: System/Servers
|
||||||
|
Requires: mysql >= 4.1.22
|
||||||
|
Requires: mysql-client
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Obsoletes: postfix-mysql
|
||||||
|
|
||||||
|
%description virtualdomains-mysql
|
||||||
|
virtualdomains addon package for Postfix with mysql. This package is intended for using Postfix with mysql for managing virtual domains.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
make CC=%{_host}-gcc makefiles \
|
||||||
|
CCARGS="-DHAS_LDAP -DHAS_MYSQL -I%{_includedir}/mysql \
|
||||||
|
-DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I%{_includedir}/sasl \
|
||||||
|
-DDEF_DAEMON_DIR=\\\"%{_libexecdir}/postfix/\\\"" \
|
||||||
|
AUXLIBS="-lldap -llber -lmysqlclient -lz -lm -lsasl2 -lssl -lcrypto"
|
||||||
|
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||||
|
sh ./postfix-install \
|
||||||
|
html_directory=%{_datadir}/%{name}-%{version}/html \
|
||||||
|
manpage_directory=%{_mandir} \
|
||||||
|
install_root=%{buildroot} \
|
||||||
|
-non-interactive
|
||||||
|
|
||||||
|
install -D -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/postfix
|
||||||
|
|
||||||
|
mv %{buildroot}%{_sysconfdir}/postfix/aliases %{buildroot}%{_sysconfdir}/
|
||||||
|
|
||||||
|
# create virtual users mailbox dir
|
||||||
|
install -m771 -d %{buildroot}%{_localstatedir}/spool/maildirs \
|
||||||
|
%{buildroot}%{_localstatedir}/spool/deleted-maildirs
|
||||||
|
|
||||||
|
# LSB: create symbolic link to /usr/lib/sendmail
|
||||||
|
install -d -m0755 %{buildroot}/usr/lib
|
||||||
|
ln -s /usr/sbin/sendmail %{buildroot}/usr/lib/sendmail
|
||||||
|
|
||||||
|
# configure for virtual domains and more
|
||||||
|
cat >> %{buildroot}%{_sysconfdir}/postfix/main.cf << _EOF
|
||||||
|
|
||||||
|
# use transport maps from file
|
||||||
|
transport_maps = hash:/etc/postfix/transport
|
||||||
|
|
||||||
|
# virtual domain configuration
|
||||||
|
virtual_gid_maps = static:%{vmail_groupid}
|
||||||
|
virtual_mailbox_base = %{_localstatedir}/spool/maildirs
|
||||||
|
virtual_mailbox_limit = 10000000
|
||||||
|
virtual_minimum_uid = 1001
|
||||||
|
virtual_transport = virtual
|
||||||
|
virtual_uid_maps = static:%{vmail_userid}
|
||||||
|
|
||||||
|
# virtual domain quota support
|
||||||
|
virtual_mailbox_limit_override = yes
|
||||||
|
virtual_overquota_bounce = yes
|
||||||
|
|
||||||
|
|
||||||
|
proxy_read_maps = \$local_recipient_maps \$mydestination \$virtual_alias_maps
|
||||||
|
\$virtual_alias_domains \$virtual_mailbox_maps \$virtual_mailbox_domains
|
||||||
|
\$relay_recipient_maps \$relay_domains \$canonical_maps \$sender_canonical_maps
|
||||||
|
\$recipient_canonical_maps \$relocated_maps \$transport_maps $mynetworks
|
||||||
|
\$virtual_mailbox_limit_maps
|
||||||
|
|
||||||
|
_EOF
|
||||||
|
|
||||||
|
install -m 0640 %{SOURCE2} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_alias_maps.cf
|
||||||
|
install -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_domains_maps.cf
|
||||||
|
install -m 0640 %{SOURCE4} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_mailbox_maps.cf
|
||||||
|
# FIXME?
|
||||||
|
install -m 0640 %{SOURCE5} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_mailbox_limits_relay_maps.cf
|
||||||
|
install -m 0640 %{SOURCE5} %{buildroot}%{_sysconfdir}/postfix/mysql_virtual_mailbox_limit_maps.cf
|
||||||
|
install -m 0640 %{SOURCE6} %{buildroot}%{_sysconfdir}/postfix/mysql_relay_domains_maps.cf
|
||||||
|
install -m 0640 %{SOURCE7} %{buildroot}%{_sysconfdir}/postfix/mysql-tables.txt
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
/usr/sbin/groupadd postfix -g %{groupid} 2>/dev/null
|
||||||
|
/usr/sbin/useradd -u %{userid} -c 'Postfix user' -d /dev/null -g postfix \
|
||||||
|
-s /bin/true postfix 2>/dev/null
|
||||||
|
/usr/sbin/groupadd postdrop -g %{postdrop_groupid} 2>/dev/null
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
/sbin/service postfix start
|
||||||
|
fi
|
||||||
|
if [ $1 -ge 1 ]; then
|
||||||
|
/usr/sbin/groupadd nobody -g %{nobodygroupid} 2>/dev/null
|
||||||
|
/usr/sbin/useradd -c nobody -u %{nobodyuserid} -d /dev/null -g nobody \
|
||||||
|
-s /bin/false nobody 2>/dev/null
|
||||||
|
|
||||||
|
/usr/sbin/postmap /etc/postfix/transport
|
||||||
|
/sbin/chkconfig --add postfix
|
||||||
|
|
||||||
|
postalias /etc/aliases
|
||||||
|
|
||||||
|
# new install
|
||||||
|
#if [ $1 -eq 1 ]; then
|
||||||
|
# sed -i "s|#myhostname .*|myhostname = `hostname -f`|;
|
||||||
|
# S|#mydomain .*|mydomain = `hostname -d`|" /etc/postfix/main.cf
|
||||||
|
#fi
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun
|
||||||
|
# erase
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
/sbin/service postfix stop
|
||||||
|
/sbin/chkconfig --del postfix
|
||||||
|
/usr/sbin/userdel postfix 2>/dev/null
|
||||||
|
/usr/sbin/groupdel %{postdrop_groupid} 2>/dev/null
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%pre virtualdomains-mysql
|
||||||
|
/usr/sbin/groupadd vmail -g %{vmail_groupid} 2>/dev/null
|
||||||
|
/usr/sbin/useradd -u %{vmail_userid} -c 'Virtual Mailboxes' -d /var/spool/maildirs -g vmail \
|
||||||
|
-s /bin/false vmail 2>/dev/null
|
||||||
|
:
|
||||||
|
|
||||||
|
%post virtualdomains-mysql
|
||||||
|
eval `grep -m1 'password =' /etc/postfix/mysql_virtual_mailbox_maps.cf | sed "s|[[:space:]]||g"`
|
||||||
|
|
||||||
|
if [ ! "$password" -a "$password" != "_mydbpassword_" ]; then
|
||||||
|
|
||||||
|
# create mysql database
|
||||||
|
mysqlshow postfix >/dev/null 2>/dev/null || {
|
||||||
|
|
||||||
|
RANDOM_PASSWD=`/usr/bin/mkpasswd -l 10 -s 0`
|
||||||
|
|
||||||
|
# create mysql database
|
||||||
|
mysqladmin create postfix
|
||||||
|
cat << EOF | mysql -u root postfix
|
||||||
|
grant INSERT,SELECT on root.* to postfix@localhost;
|
||||||
|
SET PASSWORD FOR postfix@localhost=PASSWORD('$RANDOM_PASSWD');
|
||||||
|
grant CREATE,INSERT,SELECT,DELETE,UPDATE on postfix.* to postfix@localhost;
|
||||||
|
grant CREATE,INSERT,SELECT,DELETE,UPDATE on postfix.* to postfix;
|
||||||
|
exit
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# create tables
|
||||||
|
mysql -u postfix --password=$RANDOM_PASSWD postfix < %{_sysconfdir}/postfix/mysql-tables.txt
|
||||||
|
# configure password in postfix configuration files for mysql
|
||||||
|
sed -i "s|_mydbpassword_|$RANDOM_PASSWD|" \
|
||||||
|
%{_sysconfdir}/postfix/mysql_*.cf
|
||||||
|
|
||||||
|
cat >> %{_sysconfdir}/postfix/main.cf << _EOF
|
||||||
|
|
||||||
|
# configuration for mysql maps
|
||||||
|
relay_domains = proxy:mysql:%{_sysconfdir}/postfix/mysql_relay_domains_maps.cf
|
||||||
|
virtual_alias_maps = proxy:mysql:%{_sysconfdir}/postfix/mysql_virtual_alias_maps.cf
|
||||||
|
virtual_mailbox_domains = proxy:mysql:%{_sysconfdir}/postfix/mysql_virtual_domains_maps.cf
|
||||||
|
|
||||||
|
virtual_mailbox_maps = proxy:mysql:%{_sysconfdir}/postfix/mysql_virtual_mailbox_maps.cf
|
||||||
|
virtual_mailbox_limit_maps = proxy:mysql:%{_sysconfdir}/postfix/mysql_virtual_mailbox_limit_maps.cf
|
||||||
|
_EOF
|
||||||
|
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_sysconfdir}/postfix
|
||||||
|
%config(noreplace) %{_sysconfdir}/aliases
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/access
|
||||||
|
%{_sysconfdir}/postfix/bounce.cf.default
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/canonical
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/generic
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/header_checks
|
||||||
|
%{_sysconfdir}/postfix/LICENSE
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/main.cf
|
||||||
|
%{_sysconfdir}/postfix/main.cf.default
|
||||||
|
%{_sysconfdir}/postfix/makedefs.out
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/master.cf
|
||||||
|
#%{_sysconfdir}/postfix/postfix-files
|
||||||
|
#%{_sysconfdir}/postfix/postfix-script
|
||||||
|
#%{_sysconfdir}/postfix/post-install
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/relocated
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/transport
|
||||||
|
%attr(-,root,postfix) %config(noreplace) %{_sysconfdir}/postfix/virtual
|
||||||
|
%{_sysconfdir}/postfix/TLS_LICENSE
|
||||||
|
%{_initrddir}/postfix
|
||||||
|
%{_bindir}/mailq
|
||||||
|
%{_bindir}/newaliases
|
||||||
|
%{_libexecdir}/postfix/*
|
||||||
|
/usr/lib/sendmail
|
||||||
|
%{_sbindir}/postalias
|
||||||
|
%{_sbindir}/postcat
|
||||||
|
%{_sbindir}/postconf
|
||||||
|
%attr(2755,root,postdrop) %{_sbindir}/postdrop
|
||||||
|
%{_sbindir}/postfix
|
||||||
|
%{_sbindir}/postkick
|
||||||
|
%{_sbindir}/postlock
|
||||||
|
%{_sbindir}/postlog
|
||||||
|
%{_sbindir}/postmap
|
||||||
|
%{_sbindir}/postmulti
|
||||||
|
%attr(2755,root,postdrop) %{_sbindir}/postqueue
|
||||||
|
%{_sbindir}/postsuper
|
||||||
|
%{_sbindir}/sendmail
|
||||||
|
%{_datadir}/%{name}-%{version}/html/*
|
||||||
|
%{_mandir}/man1/*
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
%attr(-,postfix,root) %dir %{_localstatedir}/lib/postfix
|
||||||
|
%dir %{_localstatedir}/spool/postfix
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/active
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/bounce
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/corrupt
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/defer
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/deferred
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/flush
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/hold
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/incoming
|
||||||
|
%attr(-,postfix,postdrop) /var/spool/postfix/maildrop
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/pid
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/private
|
||||||
|
%attr(-,postfix,postdrop) /var/spool/postfix/public
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/saved
|
||||||
|
%attr(-,postfix,root) /var/spool/postfix/trace
|
||||||
|
%doc AAAREADME LICENSE RELEASE_NOTES
|
||||||
|
|
||||||
|
%files virtualdomains-mysql
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%config(noreplace) %attr(640,root,postfix) %{_sysconfdir}/postfix/mysql_*.cf
|
||||||
|
%{_sysconfdir}/postfix/mysql-tables.txt
|
||||||
|
%attr(0771,vmail,vmail) %dir %{_localstatedir}/spool/maildirs
|
||||||
|
%attr(0771,vmail,vmail) %dir %{_localstatedir}/spool/deleted-maildirs
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu May 08 2014 Automatic Build System <autodist@mambasoft.it> 2.11.1-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Wed May 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.11.0-2mamba
|
||||||
|
- x86_64: provide /usr/lib/sendmail symlink, not /usr/lib64/sendmail
|
||||||
|
|
||||||
|
* Thu Jan 16 2014 Automatic Build System <autodist@mambasoft.it> 2.11.0-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Fri Sep 06 2013 Automatic Build System <autodist@mambasoft.it> 2.10.2-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sun Jun 23 2013 Automatic Build System <autodist@mambasoft.it> 2.10.1-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Mar 02 2013 Automatic Build System <autodist@mambasoft.it> 2.10.0-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Feb 05 2013 Automatic Build System <autodist@mambasoft.it> 2.9.6-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Thu Dec 13 2012 Automatic Build System <autodist@mambasoft.it> 2.9.5-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Thu Aug 02 2012 Automatic Build System <autodist@mambasoft.it> 2.9.4-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Jul 21 2012 Automatic Build System <autodist@mambasoft.it> 2.9.3-1mamba
|
||||||
|
- update to 2.9.3
|
||||||
|
|
||||||
|
* Wed May 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.1-2mamba
|
||||||
|
- virtualdomains-mysql: remove obsolete virtual_mailbox_* settings from default configuration
|
||||||
|
|
||||||
|
* Wed Apr 11 2012 Automatic Build System <autodist@mambasoft.it> 2.9.1-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon Apr 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.9-1mamba
|
||||||
|
- update to 2.8.9
|
||||||
|
|
||||||
|
* Sun Nov 06 2011 Automatic Build System <autodist@mambasoft.it> 2.8.7-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon Oct 24 2011 Automatic Build System <autodist@mambasoft.it> 2.8.6-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Sep 06 2011 Automatic Build System <autodist@mambasoft.it> 2.8.5-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Aug 23 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.4-2mamba
|
||||||
|
- create nobody user and group upon installation
|
||||||
|
|
||||||
|
* Thu Jul 07 2011 Automatic Build System <autodist@mambasoft.it> 2.8.4-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Mon May 09 2011 Automatic Build System <autodist@mambasoft.it> 2.8.3-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Tue Mar 22 2011 Automatic Build System <autodist@mambasoft.it> 2.8.2-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Mon Mar 07 2011 Automatic Build System <autodist@mambasoft.it> 2.8.1-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Fri Jan 21 2011 Automatic Build System <autodist@mambasoft.it> 2.8.0-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Wed Nov 24 2010 Automatic Build System <autodist@mambasoft.it> 2.7.2-1mamba
|
||||||
|
- automatic update to 2.7.2 by autodist
|
||||||
|
|
||||||
|
* Wed Jun 09 2010 Automatic Build System <autodist@mambasoft.it> 2.7.1-1mamba
|
||||||
|
- automatic update to 2.7.1 by autodist
|
||||||
|
|
||||||
|
* Fri Apr 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.0-1mamba
|
||||||
|
- update to 2.7.0
|
||||||
|
|
||||||
|
* Sat Aug 29 2009 Automatic Build System <autodist@mambasoft.it> 2.6.5-1mamba
|
||||||
|
- automatic update to 2.6.5 by autodist
|
||||||
|
|
||||||
|
* Wed Aug 26 2009 Automatic Build System <autodist@mambasoft.it> 2.6.4-1mamba
|
||||||
|
- automatic update to 2.6.4 by autodist
|
||||||
|
|
||||||
|
* Mon Aug 03 2009 Automatic Build System <autodist@mambasoft.it> 2.6.3-1mamba
|
||||||
|
- automatic update to 2.6.3 by autodist
|
||||||
|
|
||||||
|
* Thu Jun 04 2009 Automatic Build System <autodist@mambasoft.it> 2.6.2-1mamba
|
||||||
|
- automatic update to 2.6.2 by autodist
|
||||||
|
|
||||||
|
* Wed May 20 2009 Automatic Build System <autodist@mambasoft.it> 2.6.1-1mamba
|
||||||
|
- automatic update to 2.6.1 by autodist
|
||||||
|
|
||||||
|
* Mon May 18 2009 Automatic Build System <autodist@mambasoft.it> 2.6.0-1mamba
|
||||||
|
- automatic update to 2.6.0 by autodist
|
||||||
|
|
||||||
|
* Tue Apr 28 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.6-3mamba
|
||||||
|
- enabled and start service by default
|
||||||
|
|
||||||
|
* Wed Mar 18 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.6-2mamba
|
||||||
|
- rebuilt with TLS support
|
||||||
|
|
||||||
|
* Sun Jan 04 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.6-1mamba
|
||||||
|
- automatic update to 2.5.6 by autodist
|
||||||
|
|
||||||
|
* Wed Sep 03 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.5-1mamba
|
||||||
|
- update to 2.5.5
|
||||||
|
|
||||||
|
* Sun Aug 31 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.4-3mamba
|
||||||
|
- remove requirement for mysql in main package; leave in virtualdomains-mysql
|
||||||
|
|
||||||
|
* Sat Aug 30 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.4-2mamba
|
||||||
|
- remove parametric version in VDA patch and add full path
|
||||||
|
- add exit 0 to post script
|
||||||
|
- add directory /var/lib/postfix with proper permissions
|
||||||
|
|
||||||
|
* Sat Aug 30 2008 Fabio Giani <fabio.giani@gmail.com> 2.5.4-1mamba
|
||||||
|
- update to 2.5.4
|
||||||
|
- update vda patch to 2.5.4
|
||||||
|
- update buildrequirements list
|
||||||
|
|
||||||
|
* Mon Feb 11 2008 Fabio Giani <fabio.giani@gmail.com> 2.5.0-1mamba
|
||||||
|
- update to 2.5.0
|
||||||
|
|
||||||
|
* Tue Apr 24 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-1mamba
|
||||||
|
- update to version 2.4.1 by autospec
|
||||||
|
|
||||||
|
* Sat Mar 17 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.8-3qilnx
|
||||||
|
- mysql package renamed to virtualdomains-mysql
|
||||||
|
|
||||||
|
* Tue Mar 13 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.8-2qilnx
|
||||||
|
- added with mysql map support
|
||||||
|
- added sasl support
|
||||||
|
- patch0: added VDA patch for quota support
|
||||||
|
|
||||||
|
* Sun Mar 04 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.8-1qilnx
|
||||||
|
- update to version 2.3.8 by autospec
|
||||||
|
|
||||||
|
* Thu Mar 01 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.7-3qilnx
|
||||||
|
- add /usr/lib/sendmail symlink
|
||||||
|
- add mta virtual provide
|
||||||
|
|
||||||
|
* Fri Feb 02 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.7-2qilnx
|
||||||
|
- move aliases file from /etc/postfix to /etc
|
||||||
|
- don't overwrite configuration files on update
|
||||||
|
|
||||||
|
* Wed Jan 31 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.7-1qilnx
|
||||||
|
- update to version 2.3.7 by autospec
|
||||||
|
- added initscript
|
||||||
|
|
||||||
|
* Thu Nov 09 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.3.4-1qilnx
|
||||||
|
- update to version 2.3.4 by autospec
|
||||||
|
|
||||||
|
* Wed Jan 11 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.8-1qilnx
|
||||||
|
- update to version 2.2.8 by autospec
|
||||||
|
|
||||||
|
* Wed Jun 22 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.4-1qilnx
|
||||||
|
- update to version 2.2.4 by autospec
|
||||||
|
|
||||||
|
* Sat Apr 16 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.2-1qilnx
|
||||||
|
- package created by autospec
|
Loading…
Reference in New Issue
Block a user