aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installing
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-08-14 14:07:08 +0100
committerLouise Crow <louise.crow@gmail.com>2014-08-14 15:03:22 +0100
commite98fb0be4418aaa1335b8a9e6544b3546f239ca0 (patch)
tree06f9ec9ff4b2c3fd6896b35e4528d9de9e8982db /docs/installing
parent6c86b655b4909f09b38044645bd7cdded9405dd7 (diff)
Remove duplicated logrotate config
Diffstat (limited to 'docs/installing')
-rw-r--r--docs/installing/email.md25
1 files changed, 7 insertions, 18 deletions
diff --git a/docs/installing/email.md b/docs/installing/email.md
index 383629bad..e1806d66f 100644
--- a/docs/installing/email.md
+++ b/docs/installing/email.md
@@ -256,28 +256,14 @@ format. Update
MTA_LOG_PATH: '/var/log/mail/mail.log-*'
MTA_LOG_TYPE: "postfix"
+Configure postfix to log to its own directory:
+
##### Debian
In `/etc/rsyslog.conf`, set:
mail.* -/var/log/mail/mail.log
-And also edit `/etc/logrotate.d/rsyslog`:
-
- /var/log/mail/mail.log
- {
- rotate 30
- daily
- dateext
- missingok
- notifempty
- compress
- delaycompress
- sharedscripts
- postrotate
- reload rsyslog >/dev/null 2>&1 || true
- endscript
- }
##### Ubuntu
@@ -285,8 +271,11 @@ In `/etc/rsyslog.d/50-default.conf` set:
mail.* -/var/log/mail/mail.log
-And also edit `/etc/logrotate.d/rsyslog`:
+##### Configure logrotate
+
+Configure logrotate to rotate the log files in the required format:
+ cat >> /etc/logrotate.d/rsyslog <<EOF
/var/log/mail/mail.log
{
rotate 30
@@ -301,7 +290,7 @@ And also edit `/etc/logrotate.d/rsyslog`:
reload rsyslog >/dev/null 2>&1 || true
endscript
}
-
+ EOF
#### Making the changes live