Smtp banner modify in nethserver 7.8.2003

Nethserver 7.8.2003
Hi, I have a version 7.8.2003 of nethserver, I wanted to know how to change the smtp banner. when I ask the smtp test in mxtoolbox, the result is an error in the banner, in fact the server name is the one on the lan side, therefore private.

There’s a howto about changing the smtp banner with a custom template:


Thanks, I noticed though that the template path stops at / etc / e-smith / templates-custom / etc / so I assume I need to create the rest of the folders.

Yes, that’s right.

You can create it easily with the -p option:

mkdir -p /etc/e-smith/templates-custom/etc/postfix/


Thanks Markuz I try as soon as possible.

1 Like

I just tried but it reports the same error, the server always shows up with the internal name of the lan. Can I check something?

SMTP Banner Check Reverse DNS does not match SMTP Banner

Sorry, the smtp 220 code is correct, the name of the internal server appears after ehlo. Should I also change the helo parameter in the cockpit?

Yes, if you need a custom helo, just set it.

no way ! despite having changed the parameters, the 250 smtp is always the name of the internal server. this is the postfix configuration (config show postfix: )
BannerHost =
HeloHost =

Maybe postfix not restarted?

Please check your banner with telnet:

telnet localhost 25

If you use a free DynDNS you may need something like myserver.mydomain.ddnsdomain.tld

Please have a look at the config file


Do you see your changes done by custom template. If not, perhaps you have forgotten to expand the template.

I checked and the helo and banner parameters are correct with the name
I don’t understand why the 250 smtp is always the internal server name).

The 220 smtp is always
the 250 smtp is always neth7.internal2.lan

The 250 comes from the postfix myhostname variable.

postconf | grep myhostname

You may set it with a custom template in postfix


The variable refers to the name of the internal server! Could you give me an example of how to change the $ myhostname? If it is changed it affects the system configuration or is only valid for postfix. ?

I never tested this but it’s similar to the banner custom template.
Create /etc/e-smith/templates-custom/etc/postfix/

# 40myhostname -- Customize hostname to use public name 
myhostname =

Apply config and restart services:

signal-event nethserver-mail-server-update


Ok, finally the server responds to both 250 smtp and 220 with the correct name! But mxtoolbox always reports an error on the banner! I do not understand …

Could you please post a screenshot of the mxtoolbox result?

Maybe it’s a (reverse) DNS problem:


The banner host should be then be set to the name you get as result.

Check the wiki for more information about setting up and securing a mail server.

I think that being a dynamic ip address, the mxtoolbox server checks the ip and its correspondence in the dns name I think … so it signals an error in resolving the inverse name to the ip!

Please just do this:

Set the bannerhost to and the mxtoolbox test should be successful.

1 Like