Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Invalid To header value when sending mails to contacts

    Kopano WebApp
    2
    3
    981
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ashceryth
      ashceryth last edited by ashceryth

      Hi,

      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 anyuser@example.com) looks like this:

      Return-Path: <myname@mydomain.tld>
      X-Original-To: bccaddress@mydomain.tld
      Delivered-To: bccaddress@localhost
      Received: from kopanoserver.mydomain.tld (localhost [IPv6:::1])
            by kopanoserver.mydomain.tld (Postfix) with ESMTP id XXX
            for <anyuser@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?= <myname@mydomain.tld>
      To: =?utf-8?Q?AnyUser?=
      <anyuser@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: <kcim.12345@kopanoserver.mydomain.tld>
      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?= <myname@mydomain.tld>
      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?= <myname@mydomain.tld>
      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?

      Versions:
      WebApp: 3.4.0.878-0+566.1
      Kopano Core: 8.4.90

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @ashceryth last edited by

        Hi @ashceryth ,

        can you give the exact Kopano Core version you tested this with? This reminds me of https://jira.kopano.io/browse/KC-772, which I just verified again as “works” with the upcoming release.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • ashceryth
          ashceryth last edited by

          Hi @fbartels ,

          I am using the deb package with version 8.4.90.313-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?

          Thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post