From f89d10345186aa666ac5faefe9835602ab87d78c Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Thu, 6 Nov 2008 21:39:11 -0500 Subject: [PATCH] Add an xvm-mail-config package that bounces all mail to xvm-root@ svn path=/trunk/packages/xvm-mail-config/; revision=1540 --- aliases.xvm | 3 +++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 14 +++++++++++++ debian/copyright | 17 ++++++++++++++++ debian/rules | 10 ++++++++++ debian/xvm-mail-config.install | 2 ++ debian/xvm-mail-config.postinst | 42 +++++++++++++++++++++++++++++++++++++++ debian/xvm-mail-config.preinst | 42 +++++++++++++++++++++++++++++++++++++++ main.cf.xvm | 6 ++++++ 10 files changed, 142 insertions(+) create mode 100644 aliases.xvm create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/xvm-mail-config.install create mode 100644 debian/xvm-mail-config.postinst create mode 100644 debian/xvm-mail-config.preinst create mode 100644 main.cf.xvm diff --git a/aliases.xvm b/aliases.xvm new file mode 100644 index 0000000..c4f98f9 --- /dev/null +++ b/aliases.xvm @@ -0,0 +1,3 @@ +# See man 5 aliases for format +postmaster: root +root: |/usr/bin/formail -i "To: SIPB XVM " diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ea53a3b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +xvm-mail-config (0.0.1) unstable; urgency=low + + * Initial Release. + + -- Evan Broder Thu, 06 Nov 2008 20:09:50 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4d5e45d --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: xvm-mail-config +Section: servers +Priority: extra +Maintainer: SIPB XVM Project +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 index 0000000..381dc35 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,17 @@ +This software was written for the XVM project +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 index 0000000..376b783 --- /dev/null +++ b/debian/rules @@ -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 index 0000000..aeac11d --- /dev/null +++ b/debian/xvm-mail-config.install @@ -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 index 0000000..234449f --- /dev/null +++ b/debian/xvm-mail-config.postinst @@ -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: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# 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 index 0000000..f84583c --- /dev/null +++ b/debian/xvm-mail-config.preinst @@ -0,0 +1,42 @@ +#!/bin/sh +# preinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# 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 <&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 index 0000000..15943bb --- /dev/null +++ b/main.cf.xvm @@ -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 = + -- 1.7.9.5