# Customize direct-delivery Postfix configuration

**URL:** <https://meta.discourse.org/t/customize-direct-delivery-postfix-configuration/118759>\
**Category:** Sysadmins\
**Tags:** how-to, advanced-setup\
**Created:** [May 27, 2019, 4:32am UTC](https://meta.discourse.org/t/customize-direct-delivery-postfix-configuration/118759 "2019-05-27T04:32:28Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [July 21, 2023, 9:27am UTC](https://meta.discourse.org/t/customize-direct-delivery-postfix-configuration/118759/15 "2023-07-21T09:27:54Z")

</div>

## Configuring SMTP banner?

[MXtoobox’s SuperTool](https://mxtoolbox.com/SuperTool.aspx) reports an issue with the SMTP Banner Check.  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/9/8/d98a1e452b2af62558c88c811138cdb2bf981514.png)

Normally, the EHLO banner should match the `MAIL_DOMAIN` which in turn is supposed to match the reverse DNS pointer (`PTR` record). So if my `mail-receiver` runs at `discourse.example`, then the `POSTCONF_myhostname` should be `discourse.example`.

What is the right way to configure the EHLO banner?

My first intuition was to try setting `HOSTNAME` in `mail-receiver.yml` so it would replace the original `host-mail-receiver.localdomain` in `/etc/postfix/mail-receiver-environment.json`. But this does not change `/etc/hostname` nor does it change `myhostname` in the Postfix configuration.

I’m tempted to use `POSTCONF_myhostname` but I fear it will have unwanted side-effects since `$myhostname` is used in several places and then it would not match `/etc/hostname` anymore.

```shell
root@host-mail-receiver:/etc/postfix# postconf | grep myhostname
lmtp_lhlo_name = $myhostname
local_transport = local:$myhostname
milter_macro_daemon_name = $myhostname
myhostname = host-mail-receiver.localdomain
myorigin = $myhostname
smtp_helo_name = $myhostname
smtpd_proxy_ehlo = $myhostname
root@host-mail-receiver:/etc/postfix# cat /etc/hostname
host-mail-receiver

```

---

_[View the full topic](https://meta.discourse.org/t/customize-direct-delivery-postfix-configuration/118759)._
