diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-05 15:02:54 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-07 15:46:56 +0000 |
commit | 039e5f203fd91f02586559694d97799b65e10726 (patch) | |
tree | aecdd480b46670c3229d43ae50d95c9c83ce7209 /script/site-specific-install.sh | |
parent | 5b1c747a0d86164cc15d13ef1dcbb90f8290ee8b (diff) |
Rename /etc/postfix/regexp to /etc/postfix/transports
This seems slightly less confusing, since both this file
and /etc/postfix/recipients contain regexp patterns. This
also switches to replacing any transport_maps file that was
in use and overwrites the existing file rather than modifying
it.
Diffstat (limited to 'script/site-specific-install.sh')
-rwxr-xr-x | script/site-specific-install.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh index e5a6f3f0b..8917fd577 100755 --- a/script/site-specific-install.sh +++ b/script/site-specific-install.sh @@ -51,8 +51,8 @@ ensure_line_present \ /etc/postfix/master.cf 644 ensure_line_present \ - "^ *transport_maps *= *regexp:/etc/postfix/regexp" \ - "transport_maps = regexp:/etc/postfix/regexp" \ + "^ *transport_maps *=" \ + "transport_maps = regexp:/etc/postfix/transports" \ /etc/postfix/main.cf 644 ensure_line_present \ @@ -66,11 +66,6 @@ ensure_line_present \ /etc/postfix/main.cf 644 ensure_line_present \ - "^.*alaveteli" \ - "/^foi.*/ alaveteli" \ - /etc/postfix/regexp 644 - -ensure_line_present \ "^do-not-reply" \ "do-not-reply-to-this-address: :blackhole:" \ /etc/aliases 644 @@ -80,6 +75,10 @@ ensure_line_present \ "mail.* -/var/log/mail/mail.log" \ /etc/rsyslog.d/50-default.conf 644 +cat > /etc/postfix/transports <<EOF +/^foi.*/ alaveteli +EOF + cat > /etc/postfix/recipients <<EOF /^foi.*/ this-is-ignored /^postmaster@/ this-is-ignored @@ -109,7 +108,7 @@ fi /etc/init.d/rsyslog restart newaliases -postmap /etc/postfix/regexp +postmap /etc/postfix/transports postmap /etc/postfix/recipients postfix reload |