aboutsummaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
commit3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc (patch)
tree59f0163f13e99eefb959385243c564c5662bc5c2 /postfix
downloadslackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.gz
slackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.bz2
initial import
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'postfix')
-rw-r--r--postfix/postfix-anon-2.2.10.diff66
-rw-r--r--postfix/postfix-anon-2.2.3.diff63
-rwxr-xr-xpostfix/postfix.SlackBuild204
-rw-r--r--postfix/script_postfix.tgzbin0 -> 1182 bytes
-rw-r--r--postfix/slack-desc20
-rw-r--r--postfix/slack-required5
6 files changed, 358 insertions, 0 deletions
diff --git a/postfix/postfix-anon-2.2.10.diff b/postfix/postfix-anon-2.2.10.diff
new file mode 100644
index 00000000..056c2200
--- /dev/null
+++ b/postfix/postfix-anon-2.2.10.diff
@@ -0,0 +1,66 @@
+diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd.c postfix-2.2.10/src/smtpd/smtpd.c
+--- no_alter/postfix-2.2.10/src/smtpd/smtpd.c 2005-11-28 20:32:41.000000000 -0200
++++ postfix-2.2.10/src/smtpd/smtpd.c 2006-06-07 16:51:59.000000000 -0300
+@@ -858,6 +858,7 @@
+ char *var_smtpd_sasl_appname;
+ char *var_smtpd_sasl_realm;
+ char *var_smtpd_sasl_exceptions_networks;
++int sasl_authenticated;
+ char *var_filter_xport;
+ bool var_broken_auth_clients;
+ char *var_perm_mx_networks;
+@@ -1945,10 +1946,14 @@
+ * intermediate proxy.
+ */
+ if (!state->proxy || state->xforward.flags == 0) {
++ if (sasl_authenticated == 1) {
++ out_fprintf(out_stream, REC_TYPE_NORM, "Received: from localhost (localhost [127.0.0.1])");
++ } else {
+ out_fprintf(out_stream, REC_TYPE_NORM,
+ "Received: from %s (%s [%s])",
+ state->helo_name ? state->helo_name : state->name,
+ state->name, state->rfc_addr);
++ }
+ #ifdef USE_TLS
+ if (var_smtpd_tls_received_header && state->tls_context) {
+ out_fprintf(out_stream, REC_TYPE_NORM,
+diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c
+--- no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c 2004-12-10 23:16:39.000000000 -0200
++++ postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c 2006-06-07 16:54:44.000000000 -0300
+@@ -118,6 +118,8 @@
+
+ #ifdef USE_SASL_AUTH
+
++int sasl_authenticated;
++
+ /* smtpd_sasl_auth_cmd - process AUTH command */
+
+ int smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
+@@ -126,6 +128,7 @@
+ char *initial_response;
+ char *err;
+
++ sasl_authenticated = 0;
+ if (var_helo_required && state->helo_name == 0) {
+ state->error_mask |= MAIL_ERROR_POLICY;
+ smtpd_chat_reply(state, "503 Error: send HELO/EHLO first");
+@@ -169,6 +172,7 @@
+ return (-1);
+ }
+ smtpd_chat_reply(state, "235 Authentication successful");
++ sasl_authenticated = 1;
+ return (0);
+ }
+
+diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h
+--- no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h 2000-03-16 16:34:58.000000000 -0300
++++ postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h 2006-06-07 16:55:29.000000000 -0300
+@@ -17,6 +17,8 @@
+ extern void smtpd_sasl_mail_log(SMTPD_STATE *);
+ extern void smtpd_sasl_mail_reset(SMTPD_STATE *);
+
++extern int sasl_authenticated;
++
+ /* LICENSE
+ /* .ad
+ /* .fi
diff --git a/postfix/postfix-anon-2.2.3.diff b/postfix/postfix-anon-2.2.3.diff
new file mode 100644
index 00000000..fc1321fc
--- /dev/null
+++ b/postfix/postfix-anon-2.2.3.diff
@@ -0,0 +1,63 @@
+--- no_alter/postfix-2.2.3/src/smtpd/smtpd.c 2005-03-09 20:07:43.000000000 +0000
++++ postfix-2.2.3/src/smtpd/smtpd.c 2005-05-31 14:15:50.000000000 +0000
+@@ -858,6 +858,7 @@
+ char *var_smtpd_sasl_appname;
+ char *var_smtpd_sasl_realm;
+ char *var_smtpd_sasl_exceptions_networks;
++int sasl_authenticated;
+ char *var_filter_xport;
+ bool var_broken_auth_clients;
+ char *var_perm_mx_networks;
+@@ -1947,10 +1948,14 @@
+ * intermediate proxy.
+ */
+ if (!state->proxy || state->xforward.flags == 0) {
++ if (sasl_authenticated == 1) {
++ out_fprintf(out_stream, REC_TYPE_NORM, "Received: from localhost (localhost [127.0.0.1])");
++ } else {
+ out_fprintf(out_stream, REC_TYPE_NORM,
+ "Received: from %s (%s [%s])",
+ state->helo_name ? state->helo_name : state->name,
+ state->name, state->rfc_addr);
++ }
+ #ifdef USE_TLS
+ if (var_smtpd_tls_received_header && state->tls_context) {
+ out_fprintf(out_stream, REC_TYPE_NORM,
+--- no_alter/postfix-2.2.3/src/smtpd/smtpd_sasl_proto.c 2004-12-11 01:16:39.000000000 +0000
++++ postfix-2.2.3/src/smtpd/smtpd_sasl_proto.c 2005-05-31 14:17:47.000000000 +0000
+@@ -118,6 +118,8 @@
+
+ #ifdef USE_SASL_AUTH
+
++int sasl_authenticated;
++
+ /* smtpd_sasl_auth_cmd - process AUTH command */
+
+ int smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
+@@ -126,6 +128,7 @@
+ char *initial_response;
+ char *err;
+
++ sasl_authenticated = 0;
+ if (var_helo_required && state->helo_name == 0) {
+ state->error_mask |= MAIL_ERROR_POLICY;
+ smtpd_chat_reply(state, "503 Error: send HELO/EHLO first");
+@@ -169,6 +172,7 @@
+ return (-1);
+ }
+ smtpd_chat_reply(state, "235 Authentication successful");
++ sasl_authenticated = 1;
+ return (0);
+ }
+
+--- no_alter/postfix-2.2.3/src/smtpd/smtpd_sasl_proto.h 2000-03-16 19:34:58.000000000 +0000
++++ postfix-2.2.3/src/smtpd/smtpd_sasl_proto.h 2005-05-31 14:18:20.000000000 +0000
+@@ -17,6 +17,8 @@
+ extern void smtpd_sasl_mail_log(SMTPD_STATE *);
+ extern void smtpd_sasl_mail_reset(SMTPD_STATE *);
+
++extern int sasl_authenticated;
++
+ /* LICENSE
+ /* .ad
+ /* .fi
diff --git a/postfix/postfix.SlackBuild b/postfix/postfix.SlackBuild
new file mode 100755
index 00000000..d14da9a3
--- /dev/null
+++ b/postfix/postfix.SlackBuild
@@ -0,0 +1,204 @@
+#!/bin/sh
+#
+# original script from http://www.slacky.it/download/network/tool/postfix/2.2.10/src/postfix.SlackBuild
+# changes by rhatto at riseup.net
+#
+# TODO: atualizar para o postfix 2.3.0
+# slack-required
+# arrumar pasta de construcao
+#
+
+cat << EOECHO
+To build postfix with full capabilities (pcre, mysql, sasl, tls, ldap, vda and
+postfix-anon support, first build/install the following packages:
+
+ db3 and/or db4
+ libgpg-error
+ libgcrypt
+ courier-authlib
+ courier-imap
+ gnutls
+ cyrus-sasl
+ openldap-client
+
+Type ENTER you have those built and installed.
+EOECHO
+read
+
+CWD=`pwd`
+
+# default settings
+PACKAGE=postfix
+_VERSION="2.2.10"
+_ARCH="x86_64"
+_BUILD="2rha"
+_TMP="/tmp"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+if [ -z "$VERSION" ]; then
+ VERSION="$_VERSION"
+fi
+
+if [ -z "$ARCH" ]; then
+ ARCH="$_ARCH"
+fi
+
+if [ -z "$BUILD" ]; then
+ BUILD="$_BUILD"
+fi
+
+if [ "$ARCH" == "x86_64" ]; then
+ LIBDIR=/usr/lib64
+else
+ LIBDIR=/usr/lib
+fi
+
+if [ -z "$SRC" ]; then
+ SRC_DIR="$CWD"
+else
+ SRC_DIR="$SRC"
+fi
+
+if [ -z "$TMP" ]; then
+ TMP="$_TMP"
+fi
+
+# general definitions
+PACKAGE_EXT="gz"
+NAME=$PACKAGE
+DOCDIR=/usr/doc/${NAME}-${VERSION}
+READMEDIR=${DOCDIR}/README_FILES
+HTMLDIR=${DOCDIR}/HTML
+MANDIR=/usr/man
+PKGDIR=${TMP}/package-${NAME}
+SOURCEDIR=${TMP}/${NAME}-${VERSION}
+RTOOL="wget"
+SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
+
+# url definitions
+VDA="$PACKAGE-$VERSION-vda.patch.gz"
+VDA_URL="http://web.onda.com.br/nadal/postfix/VDA/$VDA"
+ANON="postfix-anon-$VERSION.diff"
+URL="ftp://ftp.pucpr.br/$PACKAGE/official/$SRC"
+
+# download sources
+if [ "$RTOOL" == "wget" ]; then
+ if [ ! -f "$SRC_DIR/$SRC" ]; then
+ wget "$URL" -O "$SRC_DIR/$SRC"
+ fi
+ if [ ! -f "$SRC_DIR/$VDA" ]; then
+ wget "$VDA_URL" -O "$SRC_DIR/$VDA"
+ fi
+ if [ ! -f "$SRC_DIR/$SRC.sig" ]; then
+ wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"
+ fi
+fi
+
+rm -rf ${PKGDIR}
+mkdir -p ${PKGDIR}
+
+cd ${PKGDIR}
+# install scripts
+
+if [ -e ${CWD}/script_${NAME}.tgz ]; then
+ tar zxvf ${CWD}/script_${NAME}.tgz
+else
+ mkdir -v install
+fi
+sleep 1
+if [ -e ${CWD}/slack-desc ];then
+ cat ${CWD}/slack-desc | grep ^${NAME} > ${PKGDIR}/install/slack-desc
+fi
+
+# Extract
+
+cd ${TMP}
+rm -rf ${NAME}-${VERSION} ${SOURCEDIR}
+tar xzvf $SRC_DIR/${NAME}-$VERSION.tar.gz
+# Patch
+
+if [ -f "$SRC_DIR/$VDA" ]; then
+ gzip -dc $SRC_DIR/$VDA | patch -p0
+fi
+
+if [ -f "$CWD/$ANON" ]; then
+ patch -p0 < $CWD/$ANON
+fi
+
+cd ${SOURCEDIR}
+sleep 1
+
+# Build
+
+# make -f Makefile.init makefiles \
+# 'CCARGS=-DUSE_TLS -DHAS_SSL -I/usr/include/openssl -DHAS_MYSQL -I/usr/include/mysql' \
+# 'AUXLIBS=-L/usr/lib -lssl -lcrypto -L/usr/lib/mysql -lmysqlclient -lz -lm'
+
+# db3 explicit
+# make -f Makefile.init makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl/ -DHAS_MYSQL -I/usr/include/mysql/ -I/usr/include -DHAS_LDAP -DUSE_TLS -I/usr/include/gnutls/ -DHAS_PCRE -I/usr/include -DHAS_DB -I/usr/include/db3" AUXLIBS="-L/usr/lib -lsasl2 -L/usr/lib/mysql/ -lmysqlclient -lz -lm -L/usr/lib -lssl -lcrypto -L/usr/lib -lpcre -L/usr/lib -lldap -L/usr/lib -llber -L/usr/include/db3 -ldb3"
+
+make -f Makefile.init makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl/ -DHAS_MYSQL -I/usr/include/mysql/ -I/usr/include -DHAS_LDAP -DUSE_TLS -I/usr/include/gnutls/ -DHAS_PCRE -I/usr/include" AUXLIBS="-L/usr/lib -lsasl2 -L/usr/lib/mysql/ -lmysqlclient -lz -lm -L/usr/lib -lssl -lcrypto -L/usr/lib -lpcre -L/usr/lib -lldap -L/usr/lib -llber"
+
+make
+sleep 1
+
+sh postfix-install \
+ install_root=${PKGDIR} \
+ tempdir=${SOURCE} \
+ manpage_directory=${MANDIR} \
+ readme_directory=${READMEDIR} \
+ html_directory=${HTMLDIR} \
+ config_directory=/etc/postfix \
+ sample_directory=/etc/postfix/sample \
+ daemon_directory=/usr/libexec/postfix \
+ command_directory=/usr/sbin/ \
+ queue_directory=/var/spool/postfix \
+ sendmail_path=/usr/sbin/sendmail \
+ newaliases_path=/usr/sbin/newaliases \
+ mailq_path=/usr/sbin/mailq \
+ mail_owner=postfix \
+ setgid_group=postdrop \
+ -non-interactive
+
+cd ${PKGDIR}/etc/postfix
+
+for a in access aliases canonical header_checks main.cf makedefs.out master.cf postfix-files relocated transport virtual; do
+ mv ${a} ${a}.new
+done
+
+sleep 2
+
+mkdir -p ${PKGDIR}/${DOCDIR}
+
+for file in AUTHORS COPYING HACKING NEWS README TODO INSTALL AAAREADME COMPATIBILITY COPYRIGHT HISTORY LICENSE RELEASE_NOTES* TLS_* US_PATENT_6321267; do
+ if [ -e "${SOURCEDIR}/${file}" ]; then
+ cp -v ${SOURCEDIR}/${file} ${PKGDIR}/${DOCDIR}/
+ fi
+done
+
+( cd $PKGDIR
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+find ${PKGDIR}/${DOCDIR} ${PKGDIR}/${MANDIR} -type f | xargs gzip -v
+
+find ${PKGDIR}/bin ${PKGDIR}/sbin ${PKGDIR}/usr/bin ${PKGDIR}/usr/sbin -type f | xargs chown -v root.bin
+# Build the package:
+cd $PKGDIR
+#requiredbuilder -v -y -s $CWD $PKGDIR
+/sbin/makepkg -l n -c n --prepend ${TMP}/${NAME}-${VERSION}-${ARCH}-${BUILD}.tgz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf ${SOURCE}
+ rm -rf ${PKGDIR}
+fi
+
diff --git a/postfix/script_postfix.tgz b/postfix/script_postfix.tgz
new file mode 100644
index 00000000..ec5f621e
--- /dev/null
+++ b/postfix/script_postfix.tgz
Binary files differ
diff --git a/postfix/slack-desc b/postfix/slack-desc
new file mode 100644
index 00000000..b81e3bb6
--- /dev/null
+++ b/postfix/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+postfix: Postfix (an alternative to the widely-used Sendmail program.)
+postfix:
+postfix: Postfix attempts to be fast, easy to administer, and secure, while at
+postfix: the same time being sendmail compatible enough to not upset existing
+postfix: users. Thus, the outside has a sendmail-ish flavor, but the inside is
+postfix: completely different.
+postfix:
+postfix: This is postfix compiled with pcre, mysql, sasl, tls, ldap and
+postfix: patched with VDA and postfix-anon.
+postfix:
+postfix:
+
diff --git a/postfix/slack-required b/postfix/slack-required
new file mode 100644
index 00000000..aaa0073c
--- /dev/null
+++ b/postfix/slack-required
@@ -0,0 +1,5 @@
+glibc-solibs >= 2.3.5-i486-5
+mysql >= 4.1.14-i486-1
+openssl >= 0.9.7g-i486-2 | openssl-solibs >= 0.9.7g-i486-2
+pcre >= 6.4-i486-1
+zlib >= 1.2.3-i486-1