puppet: Set /etc/mailname based on postfix.mailname configuration.

The `postfix.mailname` setting in `/etc/zulip.conf` was previously
only used for incoming mail, to identify in Postfix configuration
which messages were "local."

Also set `/etc/mailname`, which is used by Postfix to set how it
identifies to other hosts when sending outgoing email.

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
This commit is contained in:
Tran Sang 2023-01-18 05:22:44 +09:00 committed by Alex Vandiver
parent e8123dfeea
commit 3bea65b39c
3 changed files with 7 additions and 5 deletions

View File

@ -721,7 +721,8 @@ more than 3.5GiB of RAM, 4 on hosts with less.
#### `mailname`
The hostname that [Postfix should be configured to receive mail
at](email-gateway.md#local-delivery-setup).
at](email-gateway.md#local-delivery-setup), as well as identify itself as for
outgoing email.
### `[postgresql]`

View File

@ -80,9 +80,10 @@ using an [HTTP reverse proxy][reverse-proxy]).
mailname = emaildomain.example.com
```
This tells postfix to expect to receive emails at addresses ending
with `@emaildomain.example.com`, overriding the default of
`@hostname.example.com`.
This tells postfix to expect to receive emails at addresses ending with
`@emaildomain.example.com`, overriding the default of
`@hostname.example.com`. It will also identify itself as
`emaildomain.example.com` on any outgoing emails it sends.
1. Run `/home/zulip/deployments/current/scripts/zulip-puppet-apply`
(and answer `y`) to apply your new `/etc/zulip/zulip.conf`

View File

@ -21,7 +21,7 @@ class zulip::postfix_localmail {
mode => '0644',
owner => root,
group => root,
content => $fqdn,
content => $postfix_mailname,
}
file {'/etc/postfix/main.cf':