1
0
forked from ports/opt

postfix: new import, version 3.5.9

This commit is contained in:
Matt Housh 2021-03-07 21:17:02 -06:00
parent 8f2cb5e9b5
commit 68275a0332
8 changed files with 384 additions and 0 deletions

179
postfix/.footprint Normal file
View File

@ -0,0 +1,179 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/postfix/
-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/main.cf.proto
-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/master.cf.proto
-rw-r--r-- root/root etc/postfix/mime_header_checks (EMPTY)
-rw-r--r-- root/root etc/postfix/postfix-files
drwxr-xr-x root/root etc/postfix/postfix-files.d/
-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/dnsblog
-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/post-install
-rwxr-xr-x root/root usr/lib/postfix/postfix-script
-rwxr-xr-x root/root usr/lib/postfix/postfix-tls-script
-rwxr-xr-x root/root usr/lib/postfix/postfix-wrapper
-rwxr-xr-x root/root usr/lib/postfix/postlogd
-rwxr-xr-x root/root usr/lib/postfix/postmulti-script
-rwxr-xr-x root/root usr/lib/postfix/postscreen
-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/tlsproxy
-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/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-xr-x root/root usr/sbin/postmulti
-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 usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/mailq.1.gz
-rw-r--r-- root/root usr/share/man/man1/newaliases.1.gz
-rw-r--r-- root/root usr/share/man/man1/postalias.1.gz
-rw-r--r-- root/root usr/share/man/man1/postcat.1.gz
-rw-r--r-- root/root usr/share/man/man1/postconf.1.gz
-rw-r--r-- root/root usr/share/man/man1/postdrop.1.gz
-rw-r--r-- root/root usr/share/man/man1/postfix-tls.1.gz
-rw-r--r-- root/root usr/share/man/man1/postfix.1.gz
-rw-r--r-- root/root usr/share/man/man1/postkick.1.gz
-rw-r--r-- root/root usr/share/man/man1/postlock.1.gz
-rw-r--r-- root/root usr/share/man/man1/postlog.1.gz
-rw-r--r-- root/root usr/share/man/man1/postmap.1.gz
-rw-r--r-- root/root usr/share/man/man1/postmulti.1.gz
-rw-r--r-- root/root usr/share/man/man1/postqueue.1.gz
-rw-r--r-- root/root usr/share/man/man1/postsuper.1.gz
-rw-r--r-- root/root usr/share/man/man1/sendmail.1.gz
drwxr-xr-x root/root usr/share/man/man5/
-rw-r--r-- root/root usr/share/man/man5/access.5.gz
-rw-r--r-- root/root usr/share/man/man5/aliases.5.gz
-rw-r--r-- root/root usr/share/man/man5/body_checks.5.gz
-rw-r--r-- root/root usr/share/man/man5/bounce.5.gz
-rw-r--r-- root/root usr/share/man/man5/canonical.5.gz
-rw-r--r-- root/root usr/share/man/man5/cidr_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/generic.5.gz
-rw-r--r-- root/root usr/share/man/man5/header_checks.5.gz
-rw-r--r-- root/root usr/share/man/man5/ldap_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/lmdb_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/master.5.gz
-rw-r--r-- root/root usr/share/man/man5/memcache_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/mysql_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/nisplus_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/pcre_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/pgsql_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/postconf.5.gz
-rw-r--r-- root/root usr/share/man/man5/postfix-wrapper.5.gz
-rw-r--r-- root/root usr/share/man/man5/regexp_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/relocated.5.gz
-rw-r--r-- root/root usr/share/man/man5/socketmap_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/sqlite_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/tcp_table.5.gz
-rw-r--r-- root/root usr/share/man/man5/transport.5.gz
-rw-r--r-- root/root usr/share/man/man5/virtual.5.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/anvil.8.gz
-rw-r--r-- root/root usr/share/man/man8/bounce.8.gz
-rw-r--r-- root/root usr/share/man/man8/cleanup.8.gz
-rw-r--r-- root/root usr/share/man/man8/defer.8.gz
-rw-r--r-- root/root usr/share/man/man8/discard.8.gz
-rw-r--r-- root/root usr/share/man/man8/dnsblog.8.gz
-rw-r--r-- root/root usr/share/man/man8/error.8.gz
-rw-r--r-- root/root usr/share/man/man8/flush.8.gz
-rw-r--r-- root/root usr/share/man/man8/lmtp.8.gz
-rw-r--r-- root/root usr/share/man/man8/local.8.gz
-rw-r--r-- root/root usr/share/man/man8/master.8.gz
-rw-r--r-- root/root usr/share/man/man8/oqmgr.8.gz
-rw-r--r-- root/root usr/share/man/man8/pickup.8.gz
-rw-r--r-- root/root usr/share/man/man8/pipe.8.gz
-rw-r--r-- root/root usr/share/man/man8/postlogd.8.gz
-rw-r--r-- root/root usr/share/man/man8/postscreen.8.gz
-rw-r--r-- root/root usr/share/man/man8/proxymap.8.gz
-rw-r--r-- root/root usr/share/man/man8/qmgr.8.gz
-rw-r--r-- root/root usr/share/man/man8/qmqpd.8.gz
-rw-r--r-- root/root usr/share/man/man8/scache.8.gz
-rw-r--r-- root/root usr/share/man/man8/showq.8.gz
-rw-r--r-- root/root usr/share/man/man8/smtp.8.gz
-rw-r--r-- root/root usr/share/man/man8/smtpd.8.gz
-rw-r--r-- root/root usr/share/man/man8/spawn.8.gz
-rw-r--r-- root/root usr/share/man/man8/tlsmgr.8.gz
-rw-r--r-- root/root usr/share/man/man8/tlsproxy.8.gz
-rw-r--r-- root/root usr/share/man/man8/trace.8.gz
-rw-r--r-- root/root usr/share/man/man8/trivial-rewrite.8.gz
-rw-r--r-- root/root usr/share/man/man8/verify.8.gz
-rw-r--r-- root/root usr/share/man/man8/virtual.8.gz
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/

8
postfix/.signature Normal file
View File

@ -0,0 +1,8 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/TvvjPvPsJkxrLgU9HHj0eqDxYpEekRqBN1ICITURpSG3WdjCUiydCDcjZk8IbKJB4c0a+MFNwIzMXLUkXlaGgQ=
SHA256 (Pkgfile) = 55e8acdb5c59b565f47f4930213456d4d1c5365bfb60075dcca142089c28bc4e
SHA256 (.footprint) = b1662bbb10f743e2602ba9c5cfcd4d7c5ea117e559601b13b7fb28940f76fa63
SHA256 (postfix-3.5.9.tar.gz) = 51ced5a3165a415beba812b6c9ead0496b7172ac6c3beb654d2ccd9a1b00762b
SHA256 (aliases) = b6de629cce43ed5dc06086c5742ebe85ccc7b59d085f0fec71d97e0e73a50271
SHA256 (postfix.rc) = 78059f334abcf0f1662107f5b9542fba26f489d2cb0ca05cdc61a816f4e96dc7
SHA256 (postfix.patch) = 5329a979c7c91f71aad27eec54ed0747bb51ed687e5180851296e45166d1bca6

62
postfix/Pkgfile Normal file
View File

@ -0,0 +1,62 @@
# Description: Postfix Mail Transport Agent (MTA)
# URL: http://www.postfix.org/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: cyrus-sasl
name=postfix
version=3.5.9
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 -i $SRC/postfix.patch
# enable building on recent kernels
#sed -i 's:\(Linux\.\[34\):\15:1' makedefs
#sed -i 's:\(|| defined(LINUX4)\):\1 || defined(LINUX5):g' src/util/sys_defs.h
make tidy
make makefiles \
DEBUG="" \
OPT="${CFLAGS}" \
CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS -I/usr/include/openssl" \
AUXLIBS="-L/usr/lib -lsasl2 -lssl -lcrypto"
make
make non-interactive-package install_root=${PKG} \
mail_owner=mail \
setgid_group=postdrop \
config_directory=/etc/postfix \
manpage_directory=/usr/share/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
#
chown mail ${PKG}/var/spool/postfix/*
chgrp postdrop ${PKG}/var/spool/postfix/{maildrop,public}
chgrp postdrop ${PKG}/usr/sbin/post{drop,queue}
chmod g+s ${PKG}/usr/sbin/post{drop,queue}
chown mail ${PKG}/var/lib/postfix
rm -f $PKG/etc/postfix/*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}
}
# vim: set ts=4 et:

35
postfix/aliases Normal file
View File

@ -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

26
postfix/post-install Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
cd /usr/lib/postfix
/bin/sh post-install \
daemon_directory=/usr/lib/postfix \
manpage_directory=/usr/share/man \
command_directory=/usr/sbin \
config_directory=/etc/postfix \
setgid_group=postdrop \
mail_owner=mail \
upgrade-package
/bin/sh post-install \
daemon_directory=/usr/lib/postfix \
command_directory=/usr/sbin \
config_directory=/etc/postfix \
setgid_group=postdrop \
mail_owner=mail \
create-missing
/usr/sbin/postalias /etc/postfix/aliases
for hashfile in virtual relocated access transport; do
/usr/sbin/postmap hash:/etc/postfix/"$hashfile"
done

19
postfix/postfix.patch Normal file
View File

@ -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)
#

52
postfix/postfix.rc Normal file
View File

@ -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 $?

3
postfix/pre-install Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
getent group postdrop || /usr/sbin/groupadd postdrop