From: Jose V Beneyto Date: Tue, 16 Nov 2010 08:51:24 +0000 (+0100) Subject: postfix: initial import (verified compilation) X-Git-Url: http://gitweb/?a=commitdiff_plain;h=b28fd6a82c5f8e7320293f7e3f5a024a24c69f6e;p=attic%2Fports%2Fopt-cross.git postfix: initial import (verified compilation) --- diff --git a/postfix/.footprint b/postfix/.footprint new file mode 100644 index 0000000..ddd92aa --- /dev/null +++ b/postfix/.footprint @@ -0,0 +1,157 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/postfix/ +-rw-r--r-- root/root etc/postfix/TLS_LICENSE +-rw-r--r-- root/root etc/postfix/access +-rw-r--r-- root/root etc/postfix/access.db (EMPTY) +-rw-r--r-- root/root etc/postfix/aliases +-rw-r--r-- root/root etc/postfix/aliases.db (EMPTY) +-rw-r--r-- root/root etc/postfix/body_checks (EMPTY) +-rw-r--r-- root/root etc/postfix/bounce.cf.default +-rw-r--r-- root/root etc/postfix/canonical +-rw-r--r-- root/root etc/postfix/canonical.db (EMPTY) +-rw-r--r-- root/root etc/postfix/generic +-rw-r--r-- root/root etc/postfix/header_checks +-rw-r--r-- root/root etc/postfix/main.cf +-rw-r--r-- root/root etc/postfix/main.cf.default +-rw-r--r-- root/root etc/postfix/makedefs.out +-rw-r--r-- root/root etc/postfix/master.cf +-rw-r--r-- root/root etc/postfix/mime_header_checks (EMPTY) +-rwxr-xr-x root/root etc/postfix/post-install +-rw-r--r-- root/root etc/postfix/postfix-files +-rwxr-xr-x root/root etc/postfix/postfix-script +-rw-r--r-- root/root etc/postfix/relay_domains (EMPTY) +-rw-r--r-- root/root etc/postfix/relocated +-rw-r--r-- root/root etc/postfix/relocated.db (EMPTY) +-rw-r--r-- root/root etc/postfix/transport +-rw-r--r-- root/root etc/postfix/transport.db (EMPTY) +-rw-r--r-- root/root etc/postfix/virtual +-rw-r--r-- root/root etc/postfix/virtual.db (EMPTY) +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/postfix +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +lrwxrwxrwx root/root usr/bin/mailq -> ../../usr/sbin/sendmail +lrwxrwxrwx root/root usr/bin/newaliases -> ../../usr/sbin/sendmail +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/postfix/ +-rwxr-xr-x root/root usr/lib/postfix/anvil +-rwxr-xr-x root/root usr/lib/postfix/bounce +-rwxr-xr-x root/root usr/lib/postfix/cleanup +-rwxr-xr-x root/root usr/lib/postfix/discard +-rwxr-xr-x root/root usr/lib/postfix/error +-rwxr-xr-x root/root usr/lib/postfix/flush +-rwxr-xr-x root/root usr/lib/postfix/lmtp +-rwxr-xr-x root/root usr/lib/postfix/local +-rwxr-xr-x root/root usr/lib/postfix/master +-rwxr-xr-x root/root usr/lib/postfix/nqmgr +-rwxr-xr-x root/root usr/lib/postfix/oqmgr +-rwxr-xr-x root/root usr/lib/postfix/pickup +-rwxr-xr-x root/root usr/lib/postfix/pipe +-rwxr-xr-x root/root usr/lib/postfix/proxymap +-rwxr-xr-x root/root usr/lib/postfix/qmgr +-rwxr-xr-x root/root usr/lib/postfix/qmqpd +-rwxr-xr-x root/root usr/lib/postfix/scache +-rwxr-xr-x root/root usr/lib/postfix/showq +-rwxr-xr-x root/root usr/lib/postfix/smtp +-rwxr-xr-x root/root usr/lib/postfix/smtpd +-rwxr-xr-x root/root usr/lib/postfix/spawn +-rwxr-xr-x root/root usr/lib/postfix/tlsmgr +-rwxr-xr-x root/root usr/lib/postfix/trivial-rewrite +-rwxr-xr-x root/root usr/lib/postfix/verify +-rwxr-xr-x root/root usr/lib/postfix/virtual +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man1/ +-rw-r--r-- root/root usr/man/man1/mailq.1.gz +-rw-r--r-- root/root usr/man/man1/newaliases.1.gz +-rw-r--r-- root/root usr/man/man1/postalias.1.gz +-rw-r--r-- root/root usr/man/man1/postcat.1.gz +-rw-r--r-- root/root usr/man/man1/postconf.1.gz +-rw-r--r-- root/root usr/man/man1/postdrop.1.gz +-rw-r--r-- root/root usr/man/man1/postfix.1.gz +-rw-r--r-- root/root usr/man/man1/postkick.1.gz +-rw-r--r-- root/root usr/man/man1/postlock.1.gz +-rw-r--r-- root/root usr/man/man1/postlog.1.gz +-rw-r--r-- root/root usr/man/man1/postmap.1.gz +-rw-r--r-- root/root usr/man/man1/postqueue.1.gz +-rw-r--r-- root/root usr/man/man1/postsuper.1.gz +-rw-r--r-- root/root usr/man/man1/sendmail.1.gz +drwxr-xr-x root/root usr/man/man5/ +-rw-r--r-- root/root usr/man/man5/access.5.gz +-rw-r--r-- root/root usr/man/man5/aliases.5.gz +-rw-r--r-- root/root usr/man/man5/body_checks.5.gz +-rw-r--r-- root/root usr/man/man5/bounce.5.gz +-rw-r--r-- root/root usr/man/man5/canonical.5.gz +-rw-r--r-- root/root usr/man/man5/cidr_table.5.gz +-rw-r--r-- root/root usr/man/man5/generic.5.gz +-rw-r--r-- root/root usr/man/man5/header_checks.5.gz +-rw-r--r-- root/root usr/man/man5/ldap_table.5.gz +-rw-r--r-- root/root usr/man/man5/master.5.gz +-rw-r--r-- root/root usr/man/man5/mysql_table.5.gz +-rw-r--r-- root/root usr/man/man5/nisplus_table.5.gz +-rw-r--r-- root/root usr/man/man5/pcre_table.5.gz +-rw-r--r-- root/root usr/man/man5/pgsql_table.5.gz +-rw-r--r-- root/root usr/man/man5/postconf.5.gz +-rw-r--r-- root/root usr/man/man5/regexp_table.5.gz +-rw-r--r-- root/root usr/man/man5/relocated.5.gz +-rw-r--r-- root/root usr/man/man5/tcp_table.5.gz +-rw-r--r-- root/root usr/man/man5/transport.5.gz +-rw-r--r-- root/root usr/man/man5/virtual.5.gz +drwxr-xr-x root/root usr/man/man8/ +-rw-r--r-- root/root usr/man/man8/anvil.8.gz +-rw-r--r-- root/root usr/man/man8/bounce.8.gz +-rw-r--r-- root/root usr/man/man8/cleanup.8.gz +-rw-r--r-- root/root usr/man/man8/defer.8.gz +-rw-r--r-- root/root usr/man/man8/discard.8.gz +-rw-r--r-- root/root usr/man/man8/error.8.gz +-rw-r--r-- root/root usr/man/man8/flush.8.gz +-rw-r--r-- root/root usr/man/man8/lmtp.8.gz +-rw-r--r-- root/root usr/man/man8/local.8.gz +-rw-r--r-- root/root usr/man/man8/master.8.gz +-rw-r--r-- root/root usr/man/man8/oqmgr.8.gz +-rw-r--r-- root/root usr/man/man8/pickup.8.gz +-rw-r--r-- root/root usr/man/man8/pipe.8.gz +-rw-r--r-- root/root usr/man/man8/proxymap.8.gz +-rw-r--r-- root/root usr/man/man8/qmgr.8.gz +-rw-r--r-- root/root usr/man/man8/qmqpd.8.gz +-rw-r--r-- root/root usr/man/man8/scache.8.gz +-rw-r--r-- root/root usr/man/man8/showq.8.gz +-rw-r--r-- root/root usr/man/man8/smtp.8.gz +-rw-r--r-- root/root usr/man/man8/smtpd.8.gz +-rw-r--r-- root/root usr/man/man8/spawn.8.gz +-rw-r--r-- root/root usr/man/man8/tlsmgr.8.gz +-rw-r--r-- root/root usr/man/man8/trace.8.gz +-rw-r--r-- root/root usr/man/man8/trivial-rewrite.8.gz +-rw-r--r-- root/root usr/man/man8/verify.8.gz +-rw-r--r-- root/root usr/man/man8/virtual.8.gz +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/postalias +-rwxr-xr-x root/root usr/sbin/postcat +-rwxr-xr-x root/root usr/sbin/postconf +-rwxr-sr-x root/postdrop usr/sbin/postdrop +-rwxr-xr-x root/root usr/sbin/postfix +-rwxr-xr-x root/root usr/sbin/postkick +-rwxr-xr-x root/root usr/sbin/postlock +-rwxr-xr-x root/root usr/sbin/postlog +-rwxr-xr-x root/root usr/sbin/postmap +-rwxr-sr-x root/postdrop usr/sbin/postqueue +-rwxr-xr-x root/root usr/sbin/postsuper +-rwxr-xr-x root/root usr/sbin/sendmail +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwx------ mail/root var/lib/postfix/ +drwxr-xr-x root/root var/spool/ +drwxr-xr-x root/root var/spool/postfix/ +drwx------ mail/root var/spool/postfix/active/ +drwx------ mail/root var/spool/postfix/bounce/ +drwx------ mail/root var/spool/postfix/corrupt/ +drwx------ mail/root var/spool/postfix/defer/ +drwx------ mail/root var/spool/postfix/deferred/ +drwx------ mail/root var/spool/postfix/flush/ +drwx------ mail/root var/spool/postfix/hold/ +drwx------ mail/root var/spool/postfix/incoming/ +drwx-wx--- mail/postdrop var/spool/postfix/maildrop/ +drwxr-xr-x mail/root var/spool/postfix/pid/ +drwx------ mail/root var/spool/postfix/private/ +drwx--x--- mail/postdrop var/spool/postfix/public/ +drwx------ mail/root var/spool/postfix/saved/ +drwx------ mail/root var/spool/postfix/trace/ diff --git a/postfix/.md5sum b/postfix/.md5sum new file mode 100644 index 0000000..fa04e63 --- /dev/null +++ b/postfix/.md5sum @@ -0,0 +1,4 @@ +be543b65525f544386a2d8395ea19cdf aliases +231e3242df5f41601d88527917de05fd postfix-2.5.10.tar.gz +8bee559587e2ccbaf0aadd88b6ca339a postfix.patch +d18be5c17604f9c712a28339ff0f61cb postfix.rc diff --git a/postfix/Pkgfile b/postfix/Pkgfile new file mode 100644 index 0000000..f3d6f11 --- /dev/null +++ b/postfix/Pkgfile @@ -0,0 +1,85 @@ +# Description: Postfix Mail Transport Agent (MTA) +# URL: http://www.postfix.org +# Packager: Victor, victord at users dot berlios dot de +# Maintainer: Thomas Penteker, tek at serverop dot de +# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu +# Depends on: cyrus-sasl openssl db + +name=postfix +version=2.5.10 +release=1 +source=(ftp://ftp.porcupine.org/mirrors/postfix-release/official/$name-$version.tar.gz + aliases postfix.rc postfix.patch) + +build() { + cd $name-$version + + patch -p1 < $SRC/postfix.patch + + # build native tools + export SAVED_CC="$CC" SAVED_CXX="$CXX" + export SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS" + unset CC CXX CFLAGS CXXFLAGS + + make DEBUG="" OPT="" + install -D -m 0755 bin/postconf aux/postconf-host + + # now crossbuild + make clean + + export CC="$SAVED_CC" CXX="$SAVED_CXX" + export CFLAGS="$SAVED_CFLAGS" CXXFLAGS="$SAVED_CXXFLAGS" + + _CCARGS="$CCARGS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I$CLFS/usr/include/sasl -DUSE_TLS -I$CLFS/usr/include/openssl" + _AUXLIBS="-L$CLFS/usr/lib -lsasl2 -lssl -lcrypto" + + make tidy + make makefiles DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS" + make DEBUG="" OPT="$CFLAGS" CCARGS="$_CCARGS" AUXLIBS="$_AUXLIBS" AR="$AR" RANLIB="$RANLIB" + + sed -i postfix-install \ + -e 's|bin/postconf|aux/postconf-host|' + + make non-interactive-package \ + install_root=$PKG \ + mail_owner=mail \ + setgid_group=postdrop \ + config_directory=/etc/postfix \ + manpage_directory=/usr/man \ + daemon_directory=/usr/lib/postfix \ + data_directory=/var/lib/postfix \ + command_directory=/usr/sbin \ + queue_directory=/var/spool/postfix \ + sendmail_path=/usr/sbin/sendmail \ + newaliases_path=/usr/bin/newaliases \ + mailq_path=/usr/bin/mailq + + # + # Set proper permissions + # + ( cd $PKG/var/spool/postfix + chown mail * + chgrp postdrop public maildrop ) + + ( cd $PKG/usr/sbin + chgrp postdrop postqueue postdrop + chmod g+s postqueue postdrop ) + + ( cd $PKG/var/lib + chown mail postfix ) + + # + # Add .gz extensions to manpages (pkgmk compresses them) + # Remove LICENSE (will be removed) + # + ( cd $PKG/etc/postfix + cp postfix-files temp-files + grep -v LICENSE temp-files | sed 's#\(/man[0-9]/[a-zA-Z0-9_-]\+\.[0-9]\):#\1\.gz:#' > postfix-files + rm -f temp-files LICENSE ) + + install -D -m 00644 ../aliases $PKG/etc/postfix/aliases + install -D -m 00755 ../postfix.rc $PKG/etc/rc.d/postfix + + touch $PKG/etc/postfix/{aliases,access,canonical,relocated,transport,virtual}.db + touch $PKG/etc/postfix/{relay_domains,body_checks,mime_header_checks} +} diff --git a/postfix/README b/postfix/README new file mode 100644 index 0000000..d453322 --- /dev/null +++ b/postfix/README @@ -0,0 +1,54 @@ + +REQUIREMENTS + + 1. Remove exim. Postfix and exim can NOT coexist. + + 2. Group "postdrop" MUST exist and MUST be empty. + +PRE-INSTALL + + pkgrm exim + groupadd postdrop + + NOTICE: If upgrading from 1.x.x / 2.0 / 2.1 series: STOP postfix + before update. + + AFTER upgrading from an older release DO NOT copy the old + master.cf/main.cf files over the new files. Instead, you MUST + let the Postfix installation procedure update the existing + configuration files with new service entries. + + Please consult postfix release notes on Postfix website for + further update details. + +POST-INSTALL + + cd /etc/postfix + + sh post-install \ + manpage_directory=/usr/man \ + command_directory=/usr/sbin \ + config_directory=/etc/postfix \ + setgid_group=postdrop \ + mail_owner=mail \ + upgrade-package + + sh post-install \ + command_directory=/usr/sbin \ + config_directory=/etc/postfix \ + setgid_group=postdrop \ + mail_owner=mail \ + create-missing + + Rebuild hash maps: + + /usr/sbin/postalias /etc/postfix/aliases + /usr/sbin/postmap hash:/etc/postfix/{virtual,relocated,access,transport} + +MISCELLANEOUS + + The packager of this port (Victor) also supplied an example + configuration and some notes. I've separated them from this port. You + can get them here: + + http://hometux.de/crux/postfix_victor.tar.gz diff --git a/postfix/aliases b/postfix/aliases new file mode 100644 index 0000000..551dc93 --- /dev/null +++ b/postfix/aliases @@ -0,0 +1,35 @@ +###################################################################### +# Run "newaliases" after updating this file. +###################################################################### + +###################################################################### +# Basic system aliases +###################################################################### +MAILER-DAEMON: postmaster +postmaster: root +hostmaster: root + +###################################################################### +# General redirections for pseudo accounts and common names +###################################################################### +abuse: postmaster +bin: root +daemon: root +decode: root +games: root +mail: root +named: root +nobody: root +system: root +uucp: root +ftp: root +postfix: root +manager: root +dumper: root +operator: root +webmaster: root + +###################################################################### +# Person who should get root's mail. +###################################################################### +#root: user@hostname diff --git a/postfix/post-install b/postfix/post-install new file mode 100755 index 0000000..23dcc15 --- /dev/null +++ b/postfix/post-install @@ -0,0 +1,21 @@ +#!/bin/sh + +cd /etc/postfix + +/bin/sh post-install \ + manpage_directory=/usr/man \ + command_directory=/usr/sbin \ + config_directory=/etc/postfix \ + setgid_group=postdrop \ + mail_owner=mail \ + upgrade-package + +/bin/sh post-install \ + command_directory=/usr/sbin \ + config_directory=/etc/postfix \ + setgid_group=postdrop \ + mail_owner=mail \ + create-missing + +/usr/sbin/postalias /etc/postfix/aliases +/usr/sbin/postmap hash:/etc/postfix/{virtual,relocated,access,transport} diff --git a/postfix/postfix.patch b/postfix/postfix.patch new file mode 100644 index 0000000..a163983 --- /dev/null +++ b/postfix/postfix.patch @@ -0,0 +1,19 @@ +diff -Nru postfix-2.4.5/conf/main.cf postfix-2.4.5-new/conf/main.cf +--- postfix-2.4.5/conf/main.cf 2006-03-25 03:38:54.000000000 +0100 ++++ postfix-2.4.5-new/conf/main.cf 2007-08-11 14:51:26.000000000 +0200 +@@ -376,6 +376,7 @@ + #alias_maps = hash:/etc/aliases + #alias_maps = hash:/etc/aliases, nis:mail.aliases + #alias_maps = netinfo:/aliases ++alias_maps = hash:/etc/postfix/aliases + + # The alias_database parameter specifies the alias database(s) that + # are built with "newaliases" or "sendmail -bi". This is a separate +@@ -386,6 +387,7 @@ + #alias_database = dbm:/etc/mail/aliases + #alias_database = hash:/etc/aliases + #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases ++alias_database = $alias_maps + + # ADDRESS EXTENSIONS (e.g., user+foo) + # diff --git a/postfix/postfix.rc b/postfix/postfix.rc new file mode 100644 index 0000000..925885e --- /dev/null +++ b/postfix/postfix.rc @@ -0,0 +1,52 @@ +#!/bin/sh +###################################################################### +# postfix: starts/stops postfix daemon +# description: Postfix is a Mail Transport Agent, which is the program +# that moves mail from one machine to another. +###################################################################### + +daemon="/usr/sbin/postfix" +config="/etc/postfix" + +###################################################################### +# Sanity Check +###################################################################### +[ -x $daemon ] || exit 1 + +###################################################################### +# Uncomment these if you want to rebuild aliases on restart +###################################################################### +#/usr/sbin/postalias hash:$config/aliases +#/usr/sbin/postmap hash:$config/{access,canonical,relocated,transport,virtual} +#/usr/sbin/postmap hash:$config/access.{client,helo,sender,recpnt} + +###################################################################### +# Start/Stop/Reload/Status Functions +###################################################################### +status() { + base=${daemon##*/} + dpid=`pidof -o $$ -o $PPID -o %PPID -x ${base}` + if [ "$dpid" != "" ]; then + echo "${base} (pid $dpid) is running..." + elif [ -s /var/run/${base}.pid ]; then + echo "${base} is dead but pid file exists..." + else + echo "${base} is stopped." + fi + return +} +###################################################################### +# See how we were called +###################################################################### +case "$1" in + start) $daemon start ;; + stop) $daemon stop ;; + reload) $daemon reload ;; + restart) $daemon reload ;; + status) status ;; + abort) $daemon abort ;; + flush) $daemon flush ;; + check) $daemon check ;; + *) echo "Usage: $0 {start|stop|reload|restart|status|abort|flush|check}" ; exit 1 ;; +esac +exit $? diff --git a/postfix/pre-install b/postfix/pre-install new file mode 100755 index 0000000..b804819 --- /dev/null +++ b/postfix/pre-install @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/sbin/groupadd postdrop