浏览代码

upgrade to Postfix 1.1.3

master
父节点
当前提交
2498085112
  1. 二进制
      postfix/etc.tar
  2. 164
      postfix/postfix.spec
  3. 14
      postfix/rc.postfix

二进制
postfix/etc.tar

二进制文件未显示。

164
postfix/postfix.spec

@ -23,25 +23,15 @@
## SUCH DAMAGE.
##
# select branch ("stable" or "unstable")
%define branch stable
# the currently used versions
%define V_here 20010228.8
%define V_real 20010228-pl08
%define V_postfix 1.1.3
%define V_ipv6 20010228pl04-v6-20010913a
%define V_tls 0.7.13-20010228-pl08-0.9.6b
%define V_pflogsumm 1.0.3
%define V_unstable 20011127
# build options
# (attention: ipv6 and tls at the same time conflicts!)
%define with_db yes
%define with_pcre yes
%if "%{branch}" == "stable"
%define with_ipv6 no
%define with_tls no
%endif
# package information
Name: postfix
@ -52,34 +42,24 @@ Packager: The OpenPKG Project
Distribution: OpenPKG [REL]
Group: Mail
License: IPL
%if "%{branch}" == "stable"
Version: %{V_here}
%else
Version: %{V_unstable}
%endif
Release: 20011201
Version: %{V_postfix}
Release: 20020205
# list of sources
Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_real}.tar.gz
Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_postfix}.tar.gz
Source1: ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-%{V_tls}.tar.gz
Source2: fakesyslog.tar.gz
Source3: ftp://ftp.kame.net/pub/kame/misc/postfix-%{V_ipv6}.diff.gz
Source4: http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.pl
Source5: rc.postfix
Source6: ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/snapshot-%{V_unstable}.tar.gz
Source7: etc.tar
Source6: etc.tar
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20011227, perl
PreReq: OpenPKG, openpkg >= 20011227, perl
%if "%{with_db}" == "yes"
BuildPreReq: db
%endif
%if "%{with_pcre}" == "yes"
BuildPreReq: pcre
%endif
BuildPreReq: OpenPKG, openpkg >= 20020204, perl
PreReq: OpenPKG, openpkg >= 20020204, perl, procmail
BuildPreReq: db, pcre
%if "%{with_tls}" == "yes"
BuildPreReq: openssl
%endif
@ -95,28 +75,21 @@ Provides: MTA
fully replace the Sendmail MTA.
Local specifics in this OpenPKG version:
o Postfix delivers locally via Procmail
o Postfix logs directly to the filesystem and not via syslog(3)
o Optional IPv6 support
o Optional STARTTLS support
o Optional Berkely-DB lookup table support
o Optional Berkeley-DB lookup table support
o Optional PCRE matching support
%prep
%if "%{branch}" == "stable"
%setup0 -q -c -a 0
%else
%setup6 -q -c -a 6
%endif
%if "%{with_tls}" == "yes"
%setup1 -q -T -D -a 1
%endif
%setup2 -q -T -D -a 2
%setup7 -q -T -D -a 7
%if "%{branch}" == "stable"
cd postfix-%{V_real}
%else
cd snapshot-%{V_unstable}
%endif
%setup6 -q -T -D -a 6
cd postfix-%{V_postfix}
%if "%{with_ipv6}" == "yes"
%{l_gzip} -d -c %{SOURCE postfix-%{V_ipv6}.diff.gz} |\
%{l_perl} -e 'my $c = ""; $c .= $_ while (<STDIN>);
@ -127,15 +100,19 @@ Provides: MTA
%if "%{with_tls}" == "yes"
%{l_patch} -p1 < ../pfixtls-%{V_tls}/pfixtls.diff
%endif
%{l_rpmtool} subst \
's/var_config_dir, /var_command_dir, /' \
-- src/postfix/postfix.c
%{l_rpmtool} subst \
's;config_directory/postfix-script;command_directory/postfix-script;' \
-- conf/postfix-script*
%{l_rpmtool} subst \
's;/usr/include;%{l_prefix}/include;g' \
-- makedefs
%{l_shtool} subst \
-e 's/var_config_dir, /var_command_dir, /' \
src/postfix/postfix.c
%{l_shtool} subst \
-e 's;config_directory/postfix-script;command_directory/postfix-script;' \
-e 's;config_directory/post-install;command_directory/postfix-install;' \
conf/postfix-script*
%{l_shtool} subst \
-e 's;/usr/include;%{l_prefix}/include;g' \
makedefs
%{l_shtool} subst \
-e 's;#define HAS_DB;;' \
src/util/sys_defs.h
%build
@ -150,11 +127,7 @@ Provides: MTA
)
# configure Postfix
%if "%{branch}" == "stable"
cd postfix-%{V_real}
%else
cd snapshot-%{V_unstable}
%endif
cd postfix-%{V_postfix}
unset LD_LIBRARY_PATH || true
CCARGS=""
CCARGS="$CCARGS %{l_cflags -O}"
@ -162,14 +135,10 @@ Provides: MTA
CCARGS="$CCARGS -DDEF_CONFIG_DIR=\\\\\\\"%{l_prefix}/etc/postfix\\\\\\\""
AUXLIBS=""
AUXLIBS="$AUXLIBS -L%{l_prefix}/lib"
%if "%{with_db}" == "yes"
CCARGS="$CCARGS -DHAS_DB"
AUXLIBS="$AUXLIBS -ldb"
%endif
%if "%{with_pcre}" == "yes"
CCARGS="$CCARGS -DHAS_PCRE"
AUXLIBS="$AUXLIBS -lpcre"
%endif
%if "%{with_tls}" == "yes"
CCARGS="$CCARGS -DHAS_SSL"
AUXLIBS="$AUXLIBS -lssl -lcrypto"
@ -186,24 +155,20 @@ Provides: MTA
# perform standard installation procedure
(
%if "%{branch}" == "stable"
cd postfix-%{V_real}
%else
cd snapshot-%{V_unstable}
%endif
%{l_rpmtool} subst "s;chown;true;" -- INSTALL.sh
install_root=$RPM_BUILD_ROOT \
config_directory=%{l_prefix}/etc/postfix \
daemon_directory=%{l_prefix}/libexec/postfix \
command_directory=%{l_prefix}/sbin \
queue_directory=%{l_prefix}/var/postfix \
sendmail_path=%{l_prefix}/sbin/sendmail \
newaliases_path=%{l_prefix}/sbin/newaliases \
mailq_path=%{l_prefix}/sbin/mailq \
mail_user=%{l_fsusr} \
manpages=%{l_prefix}/man \
setgid=no \
sh INSTALL.sh </dev/null
cd postfix-%{V_postfix}
%{l_shtool} subst -e "s;chown;true;" postfix-install
sh postfix-install -non-interactive \
install_root=$RPM_BUILD_ROOT \
config_directory=%{l_prefix}/etc/postfix \
daemon_directory=%{l_prefix}/libexec/postfix \
command_directory=%{l_prefix}/sbin \
queue_directory=%{l_prefix}/var/postfix \
sendmail_path=%{l_prefix}/sbin/sendmail \
newaliases_path=%{l_prefix}/sbin/newaliases \
mailq_path=%{l_prefix}/sbin/mailq \
manpages=%{l_prefix}/man \
mail_user=%{l_musr} \
setgid_group=%{l_rgrp}
%{l_shtool} install -c -m 755 \
-e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
auxiliary/rmail/rmail $RPM_BUILD_ROOT%{l_prefix}/sbin/rmail
@ -220,15 +185,16 @@ Provides: MTA
strip $RPM_BUILD_ROOT%{l_prefix}/libexec/postfix/* >/dev/null 2>&1 || true
# post-adjust configuration
%{l_rpmtool} subst \
"s;^\\(mail_owner[^=]*=\\).*;\\1 %{l_fsusr};" \
-- $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/main.cf
%{l_shtool} subst \
-e "s;^\\(mail_owner[^=]*=\\).*;\\1 %{l_musr};" \
$RPM_BUILD_ROOT%{l_prefix}/etc/postfix/main.cf
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/*.orig
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/LICENSE
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/install.cf
mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script \
$RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-script
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/postfix-script*
mv $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/post-install \
$RPM_BUILD_ROOT%{l_prefix}/sbin/postfix-install
( cd $RPM_BUILD_ROOT%{l_prefix}/etc/postfix
%{l_shtool} mkdir -f -p -m 755 sample
for cfg in access aliases canonical pcre_table regexp_table \
@ -241,20 +207,21 @@ Provides: MTA
# install default configuration
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_fsusr@;%{l_fsusr};g' \
-e 's;@l_npusr@;%{l_npusr};g' \
-e 's;@l_musr@;%{l_musr};g' \
-e 's;@l_mgrp@;%{l_mgrp};g' \
-e 's;@l_rusr@;%{l_rusr};g' \
-e 's;@l_rgrp@;%{l_rgrp};g' \
-e 's;@l_nusr@;%{l_nusr};g' \
-e 's;@l_ngrp@;%{l_ngrp};g' \
etc/* $RPM_BUILD_ROOT%{l_prefix}/etc/postfix/
# pre-create variable stuff
( cd $RPM_BUILD_ROOT%{l_prefix}/var/postfix
%{l_shtool} mkdir -f -p -m 700 \
incoming active bounce defer deferred flush saved corrupt private
%{l_shtool} mkdir -f -p -m 755 \
log pid public
%{l_shtool} install -c -m 755 \
/dev/null log/postfix.log
%{l_shtool} install -c -m 755 \
/dev/null log/postfix.sum
%{l_shtool} mkdir -f -p -m 700 active bounce corrupt defer deferred \
flush incoming private saved
%{l_shtool} mkdir -f -p -m 730 maildrop
%{l_shtool} mkdir -f -p -m 710 public
%{l_shtool} mkdir -f -p -m 755 log pid
)
# install addons
@ -267,18 +234,21 @@ Provides: MTA
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} install -c -m 755 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_fsusr@;%{l_fsusr};g' \
-e 's;@l_fsgrp@;%{l_fsgrp};g' \
%{SOURCE5} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
-e 's;@l_susr@;%{l_susr};g' \
-e 's;@l_musr@;%{l_musr};g' \
-e 's;@l_mgrp@;%{l_mgrp};g' \
%{SOURCE rc.postfix} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# generate file list
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%attr(-,root,%{l_fsgrp}) %{l_prefix}/etc/postfix' \
'%config %attr(-,root,%{l_fsgrp}) %{l_prefix}/etc/postfix/*' \
'%attr(-,root,%{l_fsgrp}) %{l_prefix}/libexec/postfix/*' \
'%dir %attr(-,root,%{l_fsgrp}) %{l_prefix}/libexec/postfix' \
'%dir %attr(-,root,%{l_fsgrp}) %{l_prefix}/var/postfix'
'%attr(-,root,%{l_mgrp}) %{l_prefix}/etc/postfix' \
'%config %attr(-,root,%{l_mgrp}) %{l_prefix}/etc/postfix/*' \
'%attr(-,root,%{l_mgrp}) %{l_prefix}/libexec/postfix/*' \
'%attr(2755,%{l_musr},%{l_rgrp}) %{l_prefix}/sbin/{postdrop,postqueue}' \
'%dir %attr(-,root,%{l_mgrp}) %{l_prefix}/libexec/postfix' \
'%dir %attr(-,root,%{l_mgrp}) %{l_prefix}/var/postfix' \
'%dir %attr(-,%{l_musr},%{l_rgrp}) %{l_prefix}/var/postfix/{maildrop,public}'
%files -f files

14
postfix/rc.postfix

@ -15,31 +15,31 @@
postfix_log_complevel="9"
postfix_sum_flags=""
%start -p 200 -u root
%start -p 200 -u @l_susr@
opServiceEnabled postfix || exit 0
@l_prefix@/sbin/postfix start
%stop -p 200 -u root
%stop -p 200 -u @l_susr@
opServiceEnabled postfix || exit 0
@l_prefix@/sbin/postfix stop
%restart -u root
%restart -u @l_susr@
opServiceEnabled postfix || exit 0
@l_prefix@/sbin/postfix stop
sleep 2
@l_prefix@/sbin/postfix start
%reload -u root
%reload -u @l_susr@
opServiceEnabled postfix || exit 0
@l_prefix@/sbin/postfix reload
%daily -u root
%daily -u @l_susr@
opServiceEnabled postfix || exit 0
# generate logfile summary
shtool rotate -f \
-n${postfix_log_numfiles} -s0 \
-z${postfix_log_complevel} -o@l_fsusr@ -g@l_fsgrp@ -m644 \
-z${postfix_log_complevel} -o@l_musr@ -g@l_mgrp@ -m644 \
@l_prefix@/var/postfix/log/postfix.sum
logfiles="@l_prefix@/var/postfix/log/postfix.log"
if [ -f "@l_prefix@/var/postfix/log/postfix.log.0" ]; then
@ -53,7 +53,7 @@
# rotate logfile
shtool rotate -f \
-n${postfix_log_numfiles} -s${postfix_log_minsize} -d \
-z${postfix_log_complevel} -o@l_fsusr@ -g@l_fsgrp@ -m644 \
-z${postfix_log_complevel} -o@l_musr@ -g@l_mgrp@ -m644 \
-P "$postfix_log_prolog" \
-E "@l_prefix@/sbin/postfix reload; $postfix_log_epilog" \
@l_prefix@/var/postfix/log/postfix.log

正在加载...
取消
保存