Add an xvm-mail-config package that bounces all mail to xvm-root@
authorEvan Broder <broder@mit.edu>
Fri, 7 Nov 2008 02:39:11 +0000 (21:39 -0500)
committerEvan Broder <broder@mit.edu>
Fri, 7 Nov 2008 02:39:11 +0000 (21:39 -0500)
svn path=/trunk/packages/xvm-mail-config/; revision=1540

aliases.xvm [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/xvm-mail-config.install [new file with mode: 0644]
debian/xvm-mail-config.postinst [new file with mode: 0644]
debian/xvm-mail-config.preinst [new file with mode: 0644]
main.cf.xvm [new file with mode: 0644]

diff --git a/aliases.xvm b/aliases.xvm
new file mode 100644 (file)
index 0000000..c4f98f9
--- /dev/null
@@ -0,0 +1,3 @@
+# See man 5 aliases for format
+postmaster:    root
+root:         |/usr/bin/formail -i "To: SIPB XVM <xvm@mi.edu>"
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..ea53a3b
--- /dev/null
@@ -0,0 +1,5 @@
+xvm-mail-config (0.0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Evan Broder <broder@mit.edu>  Thu, 06 Nov 2008 20:09:50 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..4d5e45d
--- /dev/null
@@ -0,0 +1,14 @@
+Source: xvm-mail-config
+Section: servers
+Priority: extra
+Maintainer: SIPB XVM Project <xvm@mit.edu>
+Build-Depends: cdbs, debhelper (>= 5), config-package-dev
+Standards-Version: 3.8.0
+
+Package: xvm-mail-config
+Architecture: all
+Pre-Depends: debconf
+Depends: ${shlibs:Depends}, ${misc:Depends}, postfix, procmail
+Description: Configure mail forwarding on XVM Servers
+ Configure an MTA for all servers. Accept mail on the 10.5.128/24
+ backend network. Forward all mail for root to xvm-root@mit.edu
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..381dc35
--- /dev/null
@@ -0,0 +1,17 @@
+This software was written for the XVM project <xvm@mit.edu>
+of the MIT Student Information Processing Board.
+
+Copyright :
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file /usr/share/common-licenses/GPL.
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..376b783
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+DEB_DIVERT_EXTENSION = .xvm
+
+DEB_DIVERT_FILES_xvm-mail-config += \
+       /etc/postfix/main.cf.xvm \
+       /etc/aliases.xvm
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk
diff --git a/debian/xvm-mail-config.install b/debian/xvm-mail-config.install
new file mode 100644 (file)
index 0000000..aeac11d
--- /dev/null
@@ -0,0 +1,2 @@
+main.cf.xvm etc/postfix
+aliases.xvm etc
diff --git a/debian/xvm-mail-config.postinst b/debian/xvm-mail-config.postinst
new file mode 100644 (file)
index 0000000..234449f
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        newaliases
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+exit 0
+
+
diff --git a/debian/xvm-mail-config.preinst b/debian/xvm-mail-config.preinst
new file mode 100644 (file)
index 0000000..f84583c
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# preinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+        # Pre-seed debconf with the option to shut up postfix's
+        # debconf frontend
+        debconf-set-selections <<EOF
+postfix        postfix/main_mailer_type        select  No configuration
+EOF
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/main.cf.xvm b/main.cf.xvm
new file mode 100644 (file)
index 0000000..15943bb
--- /dev/null
@@ -0,0 +1,6 @@
+# Note that these are the only settings we need to put in - everything
+# else has a reasonable default
+relayhost = outgoing.mit.edu
+mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.5.128.0/24
+mailbox_size_limit = 0
+recipient_delimiter = +