Invalid To header value when sending mails to contacts
ashceryth last edited by ashceryth
I am facing an issue when sending mails through WebApp addressed to people I have stored in my contacts. Those mails are created with an address of “invalid@invalid” (To: invalid@invalid) in the To header. Mails sent to mail addresses which are not associated with any of my contacts are built with a correct To header (e.g. To: =?utf-8?Q?XXX?= XXX@YYY.ZZZ). I discovered this issued because I started signing mails with the S/MIME plugin, which appears to also sign the invalid To header. However, the mail is then sent with a correct To header (containig the correct name and address) as I could see bcc’ing all mails (via Postfix always_bcc config) to a local directory. The raw S/MIME signed mail (sent to an fictive address of firstname.lastname@example.org) looks like this:
Return-Path: <email@example.com> X-Original-To: firstname.lastname@example.org Delivered-To: bccaddress@localhost Received: from kopanoserver.mydomain.tld (localhost [IPv6:::1]) by kopanoserver.mydomain.tld (Postfix) with ESMTP id XXX for <email@example.com>; Mon, 25 Sep 2017 10:28:51 +0200 (CEST) Received: by kopanoserver (kopano-spooler) with MAPI; Mon, 25 Sep 2017 10:28:51 +0200 Subject: S/MIME Test From: =?utf-8?Q?MyName?= <firstname.lastname@example.org> To: =?utf-8?Q?AnyUser?= <email@example.com> Date: Mon, 25 Sep 2017 10:28:51 +0200 Mime-Version: 1.0 X-Priority: 3 (Normal) X-Mailer: Kopano 8.4.90 X-Original-To: Message-Id: <firstname.lastname@example.org> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----12345ABCDEF" This is an S/MIME signed message ------12345ABCDEF Subject: S/MIME Test From: =?utf-8?Q?MyName?= <email@example.com> To: <invalid@invalid> Date: Mon, 25 Sep 2017 10:28:40 +0200 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_ABDEF12345" X-Priority: 3 (Normal) X-Original-To: This is a multi-part message in MIME format. Your mail reader does not understand MIME message format. ... CONTENT ... ------12345ABCDEF Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" ... SIGNATURE ... ------12345ABCDEF--
This causes the recipient client to not verifying the signed mail correctly. Verification of mails sent to non-contacts works perfectly fine, as the To header is correct even before the mail is signed. However, this phenomenon is not limited to signed mails, as I can see when checking my sent folder in Outlook (synced with Z-Push). All mails sent to contacts via WebApp have an To header value of invalid@invalid:
Subject: Test From: =?utf-8?Q?MyName?= <firstname.lastname@example.org> To: <invalid@invalid> Date: Fri, 22 Sep 2017 20:21:21 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_ABCDEF12345" X-Priority: 3 (Normal) X-Original-To:
All mails that are sent to contacts with any client connected via ActiveSync contain the correct To header. So this issue appears to be related to WebApp. Any idea what is happening here?
Kopano Core: 8.4.90
ashceryth last edited by
Hi @fbartels ,
I am using the deb package with version 184.108.40.2063-0+55.1 from community download page.
And yes, I think this is related to KC-772 because the behaviour has changed with one of the last updates I performed. Before invalid@invalid there was “@”@webappserver.mydomain.tld in the To header, as I can see in my sent history in Outlook.
Your latest comment in Jira says: But in case something else goes wrong with the addressbook and there is no email for whatever reason (technically even a valid thing in MAPI), that would now use invalid@invalid, because “@”@localhost is not really useful either way. So, this means that there is always something going wrong in my case?