Change dovecot hostname

Joseph Tam jtam.home at gmail.com
Mon Aug 22 22:36:40 UTC 2016


"Scott W. Sander" writes:

> Received: from mail.domain.test
>    by appserver4.domain.com (Dovecot) with LMTP id z7RGLzH4uldlPAAAxdv4Dw
>    for <user at domain.test>; Mon, 22 Aug 2016 09:03:45 -0400
> -------
>
> I want the part that says "by appserver4.domain.com (Dovecot)" to say "by
> mail.domain.test (Dovecot)".  I don't want it to say the FQDN of the actual
> host server that is running Dovecot.
>
> The server currently referenced as "mail.domain.test" in the headers is
> postfix running on the same machine.

Oh yeah, right, LMTP.  I don't run LMTP myself, but I suspect the hostname
is mapped from the IP of the LMTP listening interface (using /etc/hosts
or DNS).  Maybe you can change the IP of your listening interface to
match mail.domain.test and firewall it off if that IP is public facing.

>From reading the code, I can't quite grok how LMTP derives the host
label, but as a last resort, you can patch at src/lmtp/commands.c in
client_get_added_headers().

Joseph Tam <jtam.home at gmail.com>


More information about the dovecot mailing list