On Mon, Feb 29, 2016 at 05:58:19PM +0100, Marco wrote: > I have a small security concern with my external SMTP server: > > >220 mail.marcobaldo.ch ESMTP > <ehlo localhost > >250-iprovider.dmz.marcobaldo.ch > >250-PIPELINING > >250-SIZE > >250-ETRN > >250-STARTTLS > >250-ENHANCEDSTATUSCODES > >250-8BITMIME > >250 DSN > > As you see smtpd_banner has been changed to reflect the MX records. Is > there any way of changing the host name sent in the 250 ehlo answer > without having to modify the definition of "myhostname".
Change "myhostname", you can do it for just the relevant smtpd(8) master.cf entry if you want to only tweak the hostname in the SMTP protocol (banner and EHLO response) and in Received headers. The value of myhostname used in cleanup(8), trivial-rewrite(8), ... is not affected by a master.cf override for smtpd(8). Of course it is best, whenever possible, to use a single name in all contexts. -- Viktor.