Multiple pdf-attachments give problems with GMS and with GWIA

I have discovered the following problems, which may or may not be connected:

If I have an email, which contains several other emails with - in this case - 3 pdf-attachments per attached mail, and I try to open it on an IOS device (17.7 and18.0) each email is shown as seperate *.eml attachment, but only a few of the attached pdf-files are diplayed correctly. Downloading the files and opening them with a hex editor, reveals, that on some there are bytes missing at the start of the pdf-file and bytes appended after the end of the pdf-file, and partly the content of the pdf-file is totally garbled. In the Groupwise client everything is displayed correctly.

If I flat-forward (using the "Forward" option instead of the "Forward as attachment" option) such an email directly from the Groupwise client via another mail server (IMAP4 or POP3 account) the resulting mail is totally perfect  and contains all attachments in correct shape and nothing is missing. If i do send the same mail from a Groupwise account via GWIA to anybody, the resulting mail contains only a correct body and one or two correct attachments and the rest of the attachments are html-attachments showing the information sent as the original mime encoded stream sent over SMTP like the following start of an attachment shows:

     

<html><body dir="auto" role="textbox" aria-label="Inhalt der E-Mail"><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><div><blockquote type="cite"><div dir="ltr"></div></blockquote></div></body></html>--=__Part8D8A0A31.0__Content-Type: message/rfc822

Date: Tue, 20 Aug 2024 12:28:27 +0200
From: xxxx
To: yyyyyy
Subject: Tickets | 9. Abonnementkonzert, p@h-Tickets, lllllllll
Mime-Version: 1.0
X-Ms-Exchange-Organization-Authas: Anonymous
X-Ms-Exchange-Organization-Authsource: exmbx04.w4yexchange.local
X-Ms-Has-Attach: yes
X-Ms-Exchange-Organization-Network-Message-Id: cfaa32d0-72c0-4e58-b52b-08dcc102d61a
X-Ms-Exchange-Organization-Recordreviewcfmtype: 0
X-Ms-Exchange-Organization-Originalclientipaddress: aaaaaa
X-Ms-Exchange-Organization-Originalserveripaddress: bbbbbbb
Content-Type: multipart/mixed; boundary="=__Part7E79D1DB.4__="

--=__Part7E79D1DB.4__Content-Type: multipart/alternative; boundary="=__Part7E79D1DB.5__="

--=__Part7E79D1DB.5__Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Sehr geehrte Damen und Herren!

Bitte finden Sie anbei Ihre Print@Home-Karten sowie den Lieferschein als
Beleg.

Bitte bringen Sie Ihre Print@Home-Tickets ausgedruckt oder als PDF am
Smartphone mit ins Konzert.

Mit herzlichen Grüßen,
Ihr Kartenbüro der uuuuuuuuuuuuu

--------------------------------------------------------------

Dear Ladies and Gentlemen,

please find attached your Print@Home tickets and the delivery note as
proof.

Please bring your Print@Home tickets with you to the concert. You can
either print them or show the PDF on your mobile device.

Best Regards
uuuuuuuuuu Ticket Office


--=__Part7E79D1DB.5__Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: <8A8A52FAE033ED4C8B346D2C6F72E506@w4yexchange.local>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<img width="1" height="1" src="">cifgghg.r.af.d.sendibt2.com/.../0XcQ3TcfY40D0o6-HMXbK3bLSoNbn_dj4LqjIHOi0_edPlCETpm3-p_lYspoHYY8OD89vpxJNI6WROSyJb_uhdLuwgcExE1ad8UnSiU9jB4lCQkFV_Lfrcway3NVX5btlmJZvIdPSjleAHThgPrNm1jlo7D8P2FU_q0WA79eF6qeQrY17AGuAajzmv8eP4myGfYd0oGQNbLHTecWhvbWevG_LA4">Sehr
geehrte Damen und Herren!<br>
<br>
Bitte finden Sie anbei Ihre Print@Home-Karten sowie den Lieferschein als Beleg.<br>
<br>
Bitte bringen Sie Ihre Print@Home-Tickets ausgedruckt oder als PDF am Smartphone mit ins Konzert.<br>
<br>
Mit herzlichen Grüßen,<br>
Ihr Kartenbüro der uuuuuuuuu<br>
<br>
--------------------------------------------------------------<br>
<br>
Dear Ladies and Gentlemen, <br>
<br>
please find attached your Print@Home tickets and the delivery note as proof. <br>
<br>
Please bring your Print@Home tickets with you to the concert. You can either print them or show the PDF on your mobile device.
<br>
<br>
Best Regards <br>
uuuuuuuuuu Ticket Office<br>
</body>
</html>

--=__Part7E79D1DB.5__=--

--=__Part7E79D1DB.4__Content-Type: application/octet-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Rdtn0tU7RtkKn8k1ZP4oSNSU0sFK9lZMBCOpUrSiLkFum2YELh4xMHMwVftUV5+N

............

So it seems, that the routines used to compose emails in GWIA and in GMS have difficulties in the correct bytewise alignment of content.

If I do not use flat-forward but forward as attachment,  the resulting mail via GWIA is a correct representation of the sent mail including all even multi-nested attachments. But it is not really usable on an IOS-device, if received via GMS because of the reasons explained above. But the IOS-problem could also be partly a problem on the Apple-side - this I will  dig into later.

The thing worrying me most, is the GWIA problem, as I usually do not see the mails I send on the recipients devices.

Has anybody similar experiences?

Build GMS 24.3 - 11327; GW Agents 24.3 - 146255.

                                                   

  • 0  

    The facts are as described here. However, it is very difficult to make an assessment of the facts because gateways or FWs at the perimeter can also rewrite the header.


    Please have a look at the Multipurpose Internet Mail Extensions RFC to understand what exactly is happening. Please open a call and also have a look at GroupWise content in the mail header - removal needed

    I hope Rob checks out the thread, he's a Deep GroupWise Diver and will surely be able to tell you more right away

    George

    “You can't teach a person anything, you can only help them to discover it within themselves.” Galileo Galilei

  • Suggested Answer

    0  

    I think it will be hard to say here based on what you provided what the issue can be, the best would be to have the actual EML file of the message(s) you used for testing this as this will show a lot more and can be used in the lab and/or by dev if needed.

    Also the GMS log files during the test in debug loglevel can help as it will point to the actual file GMS uses for the attachment(s) on the GMS server and this can be checked as well to see if the PDF file is right or already wrong at this point which will make it more clear where the issue "starts"

    I did a quick test with an mail and a png attachment to show how to get the file, when you mail from GW with an attachment you will see in the mobility-agent.log ( when debug log level is set) the filename in this line with the ID we need.


    <attachment name="bart.png" charset="US-ASCII" size="17256" id="66ED4883.MainDom.MainPO.200.20000C9.1.5A2.1@45:66ED4883.MainDom.MainPO.100.1356563.1.849F.1@1:7.MainDom.MainPO.100.0.1.0.1@16"/>

    Connect with the psql command line to the mobility database

    psql -U datasync_user mobility
    <enter your pw>

    When I run this query

    select filestoreid from attachments where attachmentid = '66ED4883.MainDom.MainPO.200.20000C9.1.5A2.1@45:66ED4883.MainDom.MainPO.100.1356563.1.849F.1@1:7.MainDom.MainPO.100.0.1.0.1@16';

    This results in

    filestoreid
    ----------------------------------
    cf518468772011ef8be8005056a07994

    On the GMS server find the file
    cd /var/lib/datasync/mobility/attachments/

    find | grep cf518468772011ef8be8005056a07994

    Results in
    /var/lib/datasync/mobility/attachments/528.52/cf518468772011ef8be8005056a07994

    Copy this file to you windows workstation and give it the extention of the file, in my case png and your test PDF

    Can you now open it or is the attachment here already having problems as this will be provided to the device.

    If the file on the GMS server with the above test is correct i see this for now with the info provided a problem of iOS, if the file on the GMS server is not correct it is going wrong somewhere on our side.

    As for each email is shown as separate *.eml attachment this is the iOS way of dealing with it and we did have some issues in the past (18.x) but we did fix those as you can see here

    If needed open a case so we can dig into this more with the actual test mail you have and your GMS logfiles but make sure all testing is done with the debug loglevel in GMS as otherwise we have not enough info in the logs

  • 0 in reply to   

    Yes I know, I need to open a SR. But I have to create some test mails for that, as I cannot use the original mails due to the European General Data Protection Regulation. And that needs time.

  • 0   in reply to 

    w4y is a fairly large provider in Austria. Internally, it runs its name resolution for Exchange hosting on w4yexchange.local. Do those responsible realize what it means to set to .local?

    In the logfile you can read w4yexchange.local for the host that possibly acts as MTA.


    @ Rob, it may be that the MTA of the hoster disassembles the mail and then in principle only makes it readable for an Outlook, O365 or new Outlock frontend. I have often had such issues with forwaring for Exchange MTA in the field. Please we always start from the green table


    @Prindel please describe your doing in detail, I'll try to recreate it in the lab.

    “You can't teach a person anything, you can only help them to discover it within themselves.” Galileo Galilei