aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-08-05 16:21:06 +0100
committerLouise Crow <louise.crow@gmail.com>2014-08-07 11:59:24 +0100
commit6c32dd3e753e6b94cc681399deaac8f337c9ea9e (patch)
tree6b56dba03fc9e8dc65d70964e7c5cf77aca3ee48
parentb962470c4295f56f4a8b893a832f3b027778c9b8 (diff)
Configure postfix non-interactively
-rw-r--r--docs/installing/email.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/installing/email.md b/docs/installing/email.md
index 72317b31a..05cef8a1e 100644
--- a/docs/installing/email.md
+++ b/docs/installing/email.md
@@ -26,9 +26,17 @@ This section shows an example of how to set up your MTA if you're using
Install postfix.
- sudo apt-get install postfix
+ # Install debconf so we can configure non-interactively
+ apt-get -qq install -y debconf >/dev/null
-In the install options, select the default configuration `Internet Site` and set the hostname to your sitename.
+ # Set the default configuration 'Internet Site'
+ echo postfix postfix/main_mailer_type select 'Internet Site' | debconf-set-selections
+
+ # Set your hostname (change example.com to your hostname)
+ echo postfix postfix/mail_name string "example.com" | debconf-set-selections
+
+ # Install postfix
+ DEBIAN_FRONTEND=noninteractive apt-get -qq -y install postfix >/dev/null
Now configure Postfix. For example, if the Unix user that is going to
run your site is `www-data`, and the directory where Alaveteli is installed is
@@ -45,6 +53,7 @@ In `/etc/postfix/main.cf`, add the lines:
transport_maps = regexp:/etc/postfix/transports
local_recipient_maps = proxy:unix:passwd.byname regexp:/etc/postfix/recipients
+
And, assuming you set
[`INCOMING_EMAIL_PREFIX`]({{ site.baseurl }}docs/customising/config/#incoming_email_prefix)
in `config/general` to "foi+", create `/etc/postfix/transports` with the following