Multiple IPs and hostname

Thilo Engelbracht mailinglists at engelbracht.com
Thu Dec 17 17:51:18 UTC 2015


Hi,

I'm running postfix as SMTP-server and dovecot as IMAP-server.
The server has multiple IPs, and postfix is configured that every domain
is using a separate IPv4-address.
Examle:
foo1.com  -->  11.22.33.44
foo2.com  -->  22.33.44.55
foo3.com  -->  33.44.55.66
bar.org   -->  66.77.88.99

The hostname of the server is: mail.bar.org

Now I have a request from one of my customers, who is using 3 different
domains:
- foo1.com
- foo2.com
- foo3.com

If he receives a mail to "user at foo1.com", the header of the mail looks
like this:

     Return-Path: <somebody at web.de>
     Delivered-To: <user at foo1.com>
(II) Received: from mail.bar.org
          by mail.bar.org (Dovecot) with LMTP id V[...]wAAvP/pag
          for <user at foo1.com>; Sun, 29 Nov 2015 13:45:37 +0100
(I)  Received: from mout.web.de (mout.web.de [212.227.17.11])
          (using TLSv1.2 with cipher ECDHE-[...]-SHA384 (256/256 bits))
          (No client certificate requested)
          by mail.foo1.com (Postfix) with ESMTPS id A[...]9
          for <user at foo1.com>; Sun, 29 Nov 2015 13:45:36 +0100 (CET)

As you can see in (I), postfix receives the mail and added a header
with the correct hostname: mail.foo1.com
But dovecot adds an additional header (see II). Here, the hostname of
the system is visible.
This is correct, because
     dovecot -n | grep -i hostname
returns:
     hostname = mail.bar.org


But my customer asks me if it's possible that only his domain is visible
in the header:
So, if somebody sends a mail to "user at foo1.com", only the hostname
"mail.foo1.com" should be visible in the mail header.
And if somebody sends a mail to "user at foo2.com", only the hostname
"mail.foo2.com" should be visible in the mail header.


Is there a way to do this?

Thank you in advance.


Kind regards

Thilo



More information about the dovecot mailing list