[Dovecot] LMTP hostname ignoring ENV variables
I am having an issue with LMTP appending the local hostname to received mail from Postfix. I either want to append localhost, a custom string, or nothing at all. Looking through the source code, I believe I should be able to set "export DOVECOT_HOSTNAME" and "export DOVECOT_HOSTDOMAIN" in my initscript to override the hostname set in lmtp/commands.c, client_get_added_headers()
I'm using Centos 5; my hostname is mailtest1.atest.qq -- it is not defined in /etc/hosts.
The added header is below:
Received: from mail.mailorxyz.de by mailtest1.atest.qq (Dovecot) with LMTP id sreUK1+sfFOseQAAPYI4hw for <admin@mailorxyz.de>; Wed, 21 May 2014 13:39:03 +0000 Received: by mail.mailorxyz.de (Postfix, from userid 97) id CC743116AB5; Wed, 21 May 2014 13:39:03 +0000 (UTC)
I have the following defined in /etc/init.d/dovecot:
export DOVECOT_HOSTDOMAIN=dovecot.mailorxyz.de export DOVECOT_HOSTNAME=dovecot.mailorxyz.de
Am I missing something or did I misunderstand the source code?
Thanks.
participants (2)
-
G H
-
Thomas Leuxner