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
On 12/17/2015 11:51 AM, Thilo Engelbracht wrote:> 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? > >The solution is to use multiple postfix instances rather than adding lines to master.cf. http://www.postfix.org/MULTI_INSTANCE_README.html -- Noel Jones
Am 17.12.2015 um 16:16 schrieb Noel <noeldude at gmail.com>:> On 12/17/2015 11:51 AM, Thilo Engelbracht wrote: > > 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? > > > The solution is to use multiple postfix instances rather than adding > lines to master.cf. > http://www.postfix.org/MULTI_INSTANCE_README.htmlHi Noel, I already configured postfix with multiple instances. It works fine! The problem is that DOVECOT adds a header line with the "normal" hostname - of course, this is correct. But my customer asks me if there if a way that only his domain is visible. So I asked if there is a way to define a hostname multiple times in the dovecot-configuration. I'm searching for a solution like multiple ssl certificates. Here you can define a ssl certificate for each IP-address: local 11.22.33.44 { ssl_cert = </path/to/foo1.com.crt ssl_key = </path/to/foo1.com.key } local 22.33.44.55 { ssl_cert = </path/to/foo2.com.crt ssl_key = </path/to/foo2.com.key }> -- Noel JonesKind regards, Thilo