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/main.cf/
Thanks Markuz I try as soon as possible.
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 = myserver.ddns.net
HeloHost = myserver.ddns.net
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
/etc/postfix/main.cf
Do you see your changes done by custom template. If not, perhaps you have forgotten to expand the template.
I checked main.cf and the helo and banner parameters are correct with the name myserver.ddns.net.
I don’t understand why the 250 smtp is always the internal server name).
The 220 smtp is always myserve.ddns.net
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 main.cf.
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/main.cf/40myhostname
#
# 40myhostname -- Customize hostname to use public name
#
myhostname = myserver.ddns.net
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:
nslookup <PUBLIC_IP_OF_YOUR_SERVER>
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 host-79-42...telecomitalia.it
and the mxtoolbox test should be successful.