summaryrefslogtreecommitdiff
path: root/recipes/postfix/files
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/postfix/files')
-rw-r--r--recipes/postfix/files/install.patch63
-rw-r--r--recipes/postfix/files/internal_recipient2
-rw-r--r--recipes/postfix/files/main.cf_2.0101
-rw-r--r--recipes/postfix/files/makedefs.patch16
-rwxr-xr-xrecipes/postfix/files/postfix31
-rw-r--r--recipes/postfix/files/volatiles15
6 files changed, 228 insertions, 0 deletions
diff --git a/recipes/postfix/files/install.patch b/recipes/postfix/files/install.patch
new file mode 100644
index 0000000000..baffcce0e8
--- /dev/null
+++ b/recipes/postfix/files/install.patch
@@ -0,0 +1,63 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- postfix-2.0.15/postfix-install~install.patch
++++ postfix-2.0.15/postfix-install
+@@ -187,8 +187,8 @@
+ exit 1
+ }
+
+-test -x bin/postconf || {
+- echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2
++test -x $POSTCONF || {
++ echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2
+ exit 1
+ }
+
+@@ -336,7 +336,7 @@
+
+ : ${install_root=/}
+ : ${tempdir=`pwd`}
+-: ${config_directory=`bin/postconf -h -d config_directory`}
++: ${config_directory=`$POSTCONF -h -d config_directory`}
+
+ # Find out the location of installed configuration files.
+
+@@ -399,7 +399,7 @@
+ case "$junk" in
+ "") eval unset $name;;
+ esac
+- eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} ||
++ eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -h $name\`} ||
+ exit 1
+ done
+ }
+@@ -414,7 +414,7 @@
+ case "$junk" in
+ "") eval unset $name;;
+ esac
+- eval : \${$name=\`bin/postconf -d -h $name\`} || exit 1
++ eval : \${$name=\`$POSTCONF -d -h $name\`} || exit 1
+ done
+
+ # Override settings manually.
+@@ -521,6 +521,8 @@
+ SAMPLE_DIRECTORY=$install_root$sample_directory
+ README_DIRECTORY=$install_root$readme_directory
+
++test "x$POSTCONF" != "x" || POSTCONF="bin/postconf"
++
+ # Avoid repeated tests for existence of these; default permissions suffice.
+
+ test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
+@@ -639,7 +641,7 @@
+ # Postfix releases, and software should not suddenly be installed in
+ # the wrong place when Postfix is being upgraded.
+
+-bin/postconf -c $CONFIG_DIRECTORY -e \
++$POSTCONF -c $CONFIG_DIRECTORY -e \
+ "daemon_directory = $daemon_directory" \
+ "command_directory = $command_directory" \
+ "queue_directory = $queue_directory" \
diff --git a/recipes/postfix/files/internal_recipient b/recipes/postfix/files/internal_recipient
new file mode 100644
index 0000000000..0d11944beb
--- /dev/null
+++ b/recipes/postfix/files/internal_recipient
@@ -0,0 +1,2 @@
+root@ permit_mynetworks,reject
+
diff --git a/recipes/postfix/files/main.cf_2.0 b/recipes/postfix/files/main.cf_2.0
new file mode 100644
index 0000000000..1a6ddabbf3
--- /dev/null
+++ b/recipes/postfix/files/main.cf_2.0
@@ -0,0 +1,101 @@
+#!/bin/sh
+cat <<EOF
+# Configure your domain and accounts
+mydomain=sample.com
+mynetworks = 127.0.0.1/32 192.168.1.0/24
+
+virtual_mailbox_domains = sample.com, other.net
+virtual_mailbox_maps = hash:/etc/postfix/virtual
+virtual_alias_maps = hash:/etc/postfix/virtual_alias
+
+
+# You'll start with the following lines for maildir storage
+virtual_mailbox_base = /var/spool/vmail
+virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
+virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
+
+
+# You'll start with the following lines for IMAP storage
+#virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
+
+
+# General stuff here again
+config_directory = /etc/postfix
+sample_directory = /etc/postfix
+queue_directory = /var/spool/postfix
+mail_spool_directory = /var/spool/mail
+readme_directory = no
+command_directory = /usr/sbin
+daemon_directory = /usr/libexec/postfix
+mail_owner = postfix
+setgid_group = postdrop
+mydestination =
+unknown_local_recipient_reject_code = 450
+mynetworks_style = host
+debug_peer_level = 2
+sendmail_path = /usr/sbin/sendmail
+newaliases_path = /usr/bin/newaliases
+mailq_path = /usr/bin/mailq
+
+smtpd_data_restrictions =
+ permit_mynetworks,
+ reject_unauth_pipelining,
+ permit
+
+smtpd_client_restrictions =
+ permit_mynetworks,
+ # reject_unknown_client, # This can cause a lot of false rejects.
+ reject_invalid_hostname,
+ reject_rbl_client list.dsbl.org,
+ reject_rbl_client sbl.spamhaus.org,
+ reject_rbl_client cbl.abuseat.org,
+ reject_rbl_client dul.dnsbl.sorbs.net,
+ permit
+
+smtpd_helo_required = yes
+smtpd_helo_restrictions =
+ permit_mynetworks,
+ reject_unauth_pipelining,
+ # reject_non_fqdn_hostname, # This can cause a lot of false rejects.
+ # reject_unknown_hostname, # This can cause a lot of false rejects.
+ reject_invalid_hostname,
+ permit
+
+smtpd_sender_restrictions =
+ permit_mynetworks,
+ reject_non_fqdn_sender,
+ # check_sender_access hash:/etc/postfix/access_domains,
+ reject_unknown_sender_domain,
+ permit
+
+smtpd_recipient_restrictions =
+ permit_mynetworks,
+ permit_sasl_authenticated,
+ reject_unauth_destination,
+
+ # check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
+ # check_helo_access pcre:/etc/postfix/helo_checks.pcre,
+
+ # check_client_access hash:/etc/postfix/maps/access_client,
+ # check_client_access hash:/etc/postfix/maps/exceptions_client,
+ # check_helo_access hash:/etc/postfix/maps/access_helo,
+ # check_helo_access hash:/etc/postfix/maps/verify_helo,
+ # check_sender_access hash:/etc/postfix/maps/access_sender,
+ # check_sender_access hash:/etc/postfix/maps/verify_sender,
+ # check_recipient_access hash:/etc/postfix/maps/access_recipient,
+
+ # reject_multi_recipient_bounce,
+ reject_non_fqdn_recipient,
+ reject_unknown_recipient_domain,
+ # reject_unlisted_recipient,
+ #check_policy_service unix:private/policy,
+
+ # check_sender_access hash:/etc/postfix/maps/no_verify_sender,
+ # check_sender_access hash:/etc/postfix/access_domains,
+ # reject_unverified_sender,
+ # reject_unverified_recipient
+ check_recipient_access hash:/etc/postfix/internal_recipient
+
+disable_vrfy_command = yes
+
+EOF
diff --git a/recipes/postfix/files/makedefs.patch b/recipes/postfix/files/makedefs.patch
new file mode 100644
index 0000000000..433b171e5a
--- /dev/null
+++ b/recipes/postfix/files/makedefs.patch
@@ -0,0 +1,16 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- postfix-2.0.15/makedefs~makedefs
++++ postfix-2.0.15/makedefs
+@@ -189,7 +189,7 @@
+ echo "No <db.h> include file found." 1>&2
+ echo "Install the appropriate db*-devel package first." 1>&2
+ echo "See the RELEASE_NOTES file for more information." 1>&2
+- exit 1
++ #exit 1
+ fi
+ # GDBM locks the DBM .pag file after open. This breaks postmap.
+ # if [ -f /usr/include/gdbm-ndbm.h ]
diff --git a/recipes/postfix/files/postfix b/recipes/postfix/files/postfix
new file mode 100755
index 0000000000..2fd5ba7007
--- /dev/null
+++ b/recipes/postfix/files/postfix
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+case "$1" in
+
+ start)
+ echo "Starting Postfix..."
+ postfix start
+ ;;
+
+ stop)
+ echo "Stopping Postfix..."
+ postfix stop
+ ;;
+
+ reload)
+ echo "Reloading Postfix..."
+ postfix reload
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|reload|restart}"
+ exit 1
+ ;;
+esac
+
diff --git a/recipes/postfix/files/volatiles b/recipes/postfix/files/volatiles
new file mode 100644
index 0000000000..bc330c99bd
--- /dev/null
+++ b/recipes/postfix/files/volatiles
@@ -0,0 +1,15 @@
+d postfix nogroup 2755 /var/spool/mail none
+d root postfix 0755 /var/spool/postfix none
+d postfix root 0700 /var/spool/postfix/active none
+d postfix root 0700 /var/spool/postfix/bounce none
+d postfix root 0700 /var/spool/postfix/corrupt none
+d postfix root 0700 /var/spool/postfix/defer none
+d postfix root 0700 /var/spool/postfix/deferred none
+d postfix root 0700 /var/spool/postfix/flush none
+d postfix root 0700 /var/spool/postfix/hold none
+d postfix root 0700 /var/spool/postfix/incoming none
+d postfix postdrop 0730 /var/spool/postfix/maildrop none
+d root root 0755 /var/spool/postfix/pid none
+d postfix root 0700 /var/spool/postfix/private none
+d postfix postdrop 0710 /var/spool/postfix/public none
+d root root 0755 /var/spool/vmail none