Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Setup of postfix (part 1)

  • Loading branch information...
commit 0e7c57925bb9f5382ef5ac165178c3c7aebf21aa 1 parent fe7a61a
@jcdubacq authored
View
5 enforce_config
@@ -5,6 +5,7 @@ cd /etc
# settings
ACCOUNT=jcdubacq
+HOSTINSTALL=fiona
ACCOUNTHOME=$(getent passwd $ACCOUNT|cut -f6 -d:)
INSTALL=${ACCOUNTHOME}/INSTALL
printf '[user]\n\tname = Jean-Christophe Dubacq (as root)\n\temail = jean-christophe.dubacq@ens-lyon.org\n' > /root/.gitconfig
@@ -16,7 +17,7 @@ else
touch $INSTALL/modified
fi
-export ACCOUNT ACCOUNTHOME INSTALL REVERT
+export ACCOUNT ACCOUNTHOME INSTALL REVERT HOSTINSTALL
# run
@@ -88,10 +89,12 @@ if [ "$REVERT" = 0 ]; then
runit fix-groups
runit repository-dubacq
runit repository-sidexp
+ runit postfix
fi
if [ "$REVERT" = 1 ]; then
runit superusers
runit fix-groups
+ runit postfix
runit repository-dubacq
runit repository-sidexp
runit record-manual
View
1  lib/postfix/README
@@ -0,0 +1 @@
+Set up postfix
View
17 lib/postfix/_postfix.debconf
@@ -0,0 +1,17 @@
+postfix postfix/root_address string
+postfix postfix/rfc1035_violation boolean false
+postfix postfix/mydomain_warning boolean
+postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+postfix postfix/mailname string /etc/mailname
+postfix postfix/tlsmgr_upgrade_warning boolean
+postfix postfix/recipient_delim string +
+postfix postfix/main_mailer_type select No configuration
+postfix postfix/destinations string
+postfix postfix/retry_upgrade_warning boolean
+postfix postfix/kernel_version_warning boolean
+postfix postfix/sqlite_warning boolean
+postfix postfix/mailbox_limit string 0
+postfix postfix/relayhost string
+postfix postfix/procmail boolean
+postfix postfix/protocols select
+postfix postfix/chattr boolean false
View
3  lib/postfix/postfix%_generic
@@ -0,0 +1,3 @@
+/^postmaster@tenebreuse.org/ root+__HOST__@tenebreuse.org
+/^root@tenebreuse.org/ root+__HOST__@tenebreuse.org
+/^.*@__HOST__.tenebreuse.org/ jcdubacq+__HOST__@tenebreuse.org
View
25 lib/postfix/postfix%_main.cf
@@ -0,0 +1,25 @@
+## Set by me
+
+# All mail should appear to come from @tenebreuse.org
+myorigin = $mydomain
+myhostname = __HOST__.tenebreuse.org
+alias_maps = hash:/etc/aliases
+alias_database = hash:/etc/aliases
+inet_interfaces = loopback-only
+mydestination = __HOST__.tenebreuse.org, localhost.tenebreuse.org, localhost
+local_transport = error:local delivery is disabled
+relayhost = [127.0.0.1]:2525
+mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+recipient_delimiter = +
+#propagate_unmatched_extensions = generic
+smtp_generic_maps = regexp:/etc/postfix/generic
+
+## Set by debian, kept by me
+
+# Debian only adds (Debian/GNU) at the end of the default
+smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
+# biff should always be set to no. Does not matter here, no local delivery
+biff = no
+# As debian says, this is the work of the MUA.
+append_dot_mydomain = no
+
View
4 lib/postfix/~postfix.revert
@@ -0,0 +1,4 @@
+#!/bin/sh
+invoke-rc.d postfix stop || true
+apt-get --purge remove postfix
+apt-get --purge autoremove
View
6 lib/postfix/~postfix.run
@@ -0,0 +1,6 @@
+#!/bin/sh
+apt-get --assume-yes install postfix
+for i in /etc/postfix/main.cf /etc/postfix/generic; do
+ perl -pi -e 's/__HOST__/'${HOSTINSTALL}'/g' "$i"
+done
+invoke-rc.d postfix reload
Please sign in to comment.
Something went wrong with that request. Please try again.