summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorTassilo Erlewein <tassilo.erlewein@erfrakon.de>2003-01-28 22:24:03 (GMT)
committerTassilo Erlewein <tassilo.erlewein@erfrakon.de>2003-01-28 22:24:03 (GMT)
commit59c86cb9df69ab828535357f96c56b97516cff8f (patch)
tree383e3571308c9f64e2ed758c8be64d8cf64ef1be /postfix
parent0fd4d55ff35a3319f80c8d65af43f294ffa146cf (diff)
downloadserver-59c86cb9df69ab828535357f96c56b97516cff8f.tar.gz
Adapted new Openpkg Postfix 2 Package1.0-beta2
Problems/Changes were: - include sasl2 support by default - include tls support by default - make fsl optional and exclude it by default as it still has issues Postfix 2.0.3 is up to date
Diffstat (limited to 'postfix')
-rw-r--r--postfix/etc.tarbin20480 -> 20480 bytes
-rw-r--r--postfix/fsl.postfix2
-rw-r--r--postfix/pflogsumm.patch20
-rw-r--r--postfix/postfix.spec200
-rw-r--r--postfix/rc.postfix2
5 files changed, 116 insertions, 108 deletions
diff --git a/postfix/etc.tar b/postfix/etc.tar
index c23cb44..9380b02 100644
--- a/postfix/etc.tar
+++ b/postfix/etc.tar
Binary files differ
diff --git a/postfix/fsl.postfix b/postfix/fsl.postfix
index f036db5..bb53a47 100644
--- a/postfix/fsl.postfix
+++ b/postfix/fsl.postfix
@@ -12,5 +12,5 @@ ident (postfix/.+)/.+ q{
append=1, perm=0644
)
}
-}
+};
diff --git a/postfix/pflogsumm.patch b/postfix/pflogsumm.patch
new file mode 100644
index 0000000..54dbabe
--- /dev/null
+++ b/postfix/pflogsumm.patch
@@ -0,0 +1,20 @@
+--- pflogsumm.pl.orig Tue Dec 31 19:30:43 2002
++++ pflogsumm.pl Fri Jan 10 13:07:39 2003
+@@ -557,7 +557,7 @@
+ @{$connTime{$1}} =
+ ($msgYr, $msgMon + 1, $msgDay, $msgHr, $msgMin, $msgSec);
+ } elsif(/: disconnect from /o) {
+- my ($pid, $hostID) = /\/smtpd\[(\d+)\]: disconnect from (.+)$/o;
++ my ($pid, $hostID) = /\/smtpd\[(\d+)\]: disconnect from (.+)$/o || next;
+ if(exists($connTime{$pid})) {
+ $hostID = gimme_domain($hostID);
+ my($d, $h, $m, $s) = Delta_DHMS(@{$connTime{$pid}},
+@@ -1267,7 +1267,7 @@
+ }
+ my ($t_mday, $t_mon) = (localtime($time))[3,4];
+
+- return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
++ return sprintf("%s %02d", $monthNames[$t_mon], $t_mday);
+ }
+
+ # if there's a real domain: uses that. Otherwise uses the first
diff --git a/postfix/postfix.spec b/postfix/postfix.spec
index 8a430b1..76895f1 100644
--- a/postfix/postfix.spec
+++ b/postfix/postfix.spec
@@ -1,8 +1,8 @@
##
## postfix.spec -- OpenPKG RPM Specification
-## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
-## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
-## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
+## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
+## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
@@ -23,24 +23,10 @@
## SUCH DAMAGE.
##
-# involved versions
-%define V_postfix 1.1.12
-%define V_tls 0.8.12-1.1.12-0.9.6h
-%define V_pflogsumm 1.0.4
-
-# build options
-%ifndef with_tls
-%define with_tls no
-%endif
-%ifndef with_sasl
-%define with_sasl no
-%endif
-%ifndef with_mysql
-%define with_mysql no
-%endif
-%ifndef with_fsl
-%define with_fsl no
-%endif
+# package versions
+%define V_postfix 2.0.3
+%define V_tls 0.8.13-2.0.3-0.9.7
+%define V_pflogsumm 1.0.7
# package information
Name: postfix
@@ -52,42 +38,47 @@ Distribution: OpenPKG [BASE]
Group: Mail
License: IPL
Version: %{V_postfix}
-Release: 20021204
+Release: 1.2.0
+
+# package options
+%option with_tls yes
+%option with_sasl yes
+%option with_mysql no
+%option with_fsl no
# list of sources
%define url ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%{V_postfix}.tar.gz
Source0: %( [ ! -f %{SOURCE postfix-%{V_postfix}.tar.gz} ] && wget -c %url; echo %url )
%define url ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-%{V_tls}.tar.gz
Source1: %( [ ! -f %{SOURCE pfixtls-%{V_tls}.tar.gz} ] && wget -c %url; echo %url )
-Source2: fsl.postfix
+%define url http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.tar.gz
+Source2: %( [ ! -f %{SOURCE pflogsumm-%{V_pflogsumm}.tar.gz} ] && wget -c %url; echo %url )
Source3: etc.tar
-%define url http://jimsun.linxnet.com/downloads/pflogsumm-%{V_pflogsumm}.pl
-Source4: %( [ ! -f %{SOURCE pflogsumm-%{V_pflogsumm}.pl} ] && wget -c %url; echo %url )
+Source4: fsl.postfix
Source5: rc.postfix
-Source6: postfix-sasl2.patch
-Source7: Makefile
-#Patch0: postfix-db4.patch
+Patch0: pflogsumm.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 1.1.0, perl
-PreReq: OpenPKG, openpkg >= 1.1.0, perl, procmail, perl-time
-BuildPreReq: db, pcre
+BuildPreReq: OpenPKG, openpkg >= 1.2.0, perl, pcre, db
+%if "%{with_fsl}" == "yes"
+BuildPreReq: fsl
+%endif
+PreReq: OpenPKG, openpkg >= 1.2.0, perl, procmail, perl-time
+%if "%{with_fsl}" == "yes"
+PreReq: fsl
+%endif
%if "%{with_tls}" == "yes"
-BuildPreReq: openssl, patch
+BuildPreReq: openssl
%endif
%if "%{with_sasl}" == "yes"
BuildPreReq: sasl
PreReq: sasl
%endif
-%if "%{with_fsl}" == "yes"
-BuildPreReq: fsl
-PreReq: fsl
-%endif
%if "%{with_mysql}" == "yes"
-BuildPreReq: mysql
-PreReq: mysql
+BuildPreReq: MYSQL
+PreReq: MYSQL
%endif
AutoReq: no
AutoReqProv: no
@@ -95,77 +86,74 @@ Provides: MTA
Conflicts: sendmail, ssmtp, exim
%description
- Postfix is a new-generation Mail Transfer Agent (MTA) able to
- fully replace the Sendmail MTA.
+ Postfix is a new-generation Mail Transfer Agent (MTA) able to 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 Berkeley-DB lookup table support
- o Optional MySQL support
- o Optional PCRE matching support
- o Optional SASL2 authentication support
-
- Options:
- --define 'with_mysql %{with_mysql}' \
- --define 'with_sasl %{with_sasl}' \
- --define 'with_tls %{with_tls}'
+ o Berkeley-DB lookup table support
+ o PCRE matching support
+ o Optional STARTTLS support (see package options below)
+ o Optional SASL2 authentication support (see package options below)
+ o Optional MySQL support (see package options below)
%prep
- %setup0 -q -c -a 0
-# %patch0 -p0
+ # unpack distribution files
+ %setup0 -q
%if "%{with_tls}" == "yes"
%setup1 -q -T -D -a 1
%endif
+ %setup2 -q -T -D -a 2
%setup3 -q -T -D -a 3
- cd postfix-%{V_postfix}
+
+ # apply external TLS patches
%if "%{with_tls}" == "yes"
- %{l_patch} -p1 < ../pfixtls-%{V_tls}/pfixtls.diff
-%endif
-%if "%{with_sasl}" == "yes"
- %{l_patch} -p1 < %{SOURCE postfix-sasl2.patch}
+ %{l_patch} -p1 <pfixtls-%{V_tls}/pfixtls.diff
%endif
+
+ # apply pflogsumm patch
+ ( cd pflogsumm-%{V_pflogsumm}; %{l_patch} -p0 <%{SOURCE pflogsumm.patch} )
+
+%build
+ # configure Postfix (hard-core part I)
%{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*
+ conf/postfix-script
%{l_shtool} subst \
-e 's;/usr/include;%{l_prefix}/include;g' \
makedefs
- %{l_shtool} subst \
- -e 's;#define HAS_DBM;#define HAS_DBM_DISABLED;' \
- -e 's;#define HAS_DB;#define HAS_DB_DISABLED;' \
- src/util/sys_defs.h
-%build
- # configure Postfix
- cd postfix-%{V_postfix}
+ # configure Postfix (regular part)
unset LD_LIBRARY_PATH || true
CCARGS=""
CCARGS="$CCARGS %{l_cflags -O}"
CCARGS="$CCARGS -I%{l_prefix}/include"
- CCARGS="$CCARGS -DDEF_CONFIG_DIR=\\\\\\\"%{l_prefix}/etc/postfix\\\\\\\""
- AUXLIBS="-L%{l_prefix}/lib -ldl"
+ CCARGS="$CCARGS -DDEF_CONFIG_DIR=\\\"%{l_prefix}/etc/postfix\\\""
+ AUXLIBS=""
+ AUXLIBS="$AUXLIBS -L%{l_prefix}/lib"
CCARGS="$CCARGS -DHAS_DB"
- AUXLIBS="$AUXLIBS %{l_prefix}/lib/libdb.a"
+ AUXLIBS="$AUXLIBS -ldb"
CCARGS="$CCARGS -DHAS_PCRE"
- AUXLIBS="$AUXLIBS %{l_prefix}/lib/libpcre.a"
+ AUXLIBS="$AUXLIBS -lpcre"
%if "%{with_mysql}" == "yes"
CCARGS="$CCARGS -DHAS_MYSQL -I%{l_prefix}/include/mysql"
AUXLIBS="$AUXLIBS -L%{l_prefix}/lib/mysql -lmysqlclient -lz -lm"
%endif
%if "%{with_sasl}" == "yes"
CCARGS="$CCARGS -DUSE_SASL_AUTH -I%{l_prefix}/include/sasl"
- AUXLIBS="$AUXLIBS %{l_prefix}/lib/libsasl2.a"
+ AUXLIBS="$AUXLIBS -lsasl2 -lcrypt"
+ if [ -f /usr/lib/libdl.so -o -f /usr/lib/libdl.a ]; then
+ AUXLIBS="$AUXLIBS -ldl"
+ fi
%endif
%if "%{with_tls}" == "yes"
CCARGS="$CCARGS -DHAS_SSL"
- AUXLIBS="$AUXLIBS %{l_prefix}/lib/libssl.a %{l_prefix}/lib/libcrypto.a"
+ AUXLIBS="$AUXLIBS -lssl -lcrypto"
%endif
%if "%{with_fsl}" == "yes"
AUXLIBS="$AUXLIBS `%{l_prefix}/bin/fsl-config --all --ldflags --libs`"
@@ -173,6 +161,12 @@ Conflicts: sendmail, ssmtp, exim
%{l_make} %{l_mflags} makefiles \
CC="%{l_cc}" CCARGS="$CCARGS" AUXLIBS="$AUXLIBS"
+ # configure Postfix (hard-core part II)
+ %{l_shtool} subst \
+ -e 's;#define HAS_DBM;#define HAS_DBM_DISABLED;' \
+ -e 's;#define HAS_DB;#define HAS_DB_DISABLED;' \
+ src/util/sys_defs.h
+
# build Postfix
%{l_make} %{l_mflags}
@@ -180,25 +174,22 @@ Conflicts: sendmail, ssmtp, exim
rm -rf $RPM_BUILD_ROOT
# perform standard installation procedure
- (
- 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 \
- manpage_directory=%{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
- )
+ %{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 \
+ manpage_directory=%{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
# post-adjust binaries
rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/mailq
@@ -227,8 +218,7 @@ Conflicts: sendmail, ssmtp, exim
relocated sample-* transport virtual \
main.cf master.cf main.cf.default; do
mv $cfg sample/
- done
- )
+ done )
# install default configuration
%{l_shtool} install -c -m 644 \
@@ -243,17 +233,20 @@ Conflicts: sendmail, ssmtp, exim
# pre-create variable stuff
( cd $RPM_BUILD_ROOT%{l_prefix}/var/postfix
- %{l_shtool} mkdir -f -p -m 700 active bounce corrupt defer deferred \
- flush incoming private saved
+ %{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
- )
+ %{l_shtool} mkdir -f -p -m 755 log pid )
# install addons
- %{l_shtool} install -c -m 755 \
- -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
- %{SOURCE4} $RPM_BUILD_ROOT%{l_prefix}/sbin/pflogsumm
+ ( cd pflogsumm-%{V_pflogsumm}
+ %{l_shtool} install -c -m 755 \
+ -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
+ pflogsumm.pl $RPM_BUILD_ROOT%{l_prefix}/sbin/pflogsumm
+ %{l_shtool} install -c -m 644 \
+ pflogsumm.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ )
# install run-command script
%{l_shtool} mkdir -f -p -m 755 \
@@ -266,28 +259,23 @@ Conflicts: sendmail, ssmtp, exim
%{SOURCE rc.postfix} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# OSSP fsl support
-%if "%{with_fsl}" == "yes"
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE fsl.postfix} \
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
-%endif
# adjust installation to avoid file name conflicts
( cd $RPM_BUILD_ROOT%{l_prefix}/man/man8
- mv master.8 postfix_master.8
- )
+ mv master.8 postfix_master.8 )
# generate file list
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%attr(-,root,%{l_mgrp}) %{l_prefix}/etc/postfix' \
-%if "%{with_fsl}" == "yes"
'%config %{l_prefix}/etc/fsl/fsl.postfix' \
'%not %dir %{l_prefix}/etc/fsl' \
-%endif
'%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}' \
diff --git a/postfix/rc.postfix b/postfix/rc.postfix
index 3286a43..920ccf5 100644
--- a/postfix/rc.postfix
+++ b/postfix/rc.postfix
@@ -48,7 +48,7 @@
@l_prefix@/sbin/pflogsumm -d yesterday -h 10 -u 10 -i \
--iso_date_time --problems_first --smtpd_stats --verbose_msg_detail \
${postfix_sum_flags} \
- ${logfiles} >@l_prefix@/var/postfix/log/postfix.sum
+ ${logfiles} >@l_prefix@/var/postfix/log/postfix.sum 2>/dev/null
# rotate logfile
shtool rotate -f \