Part of boundary in the end of the text

Issue #560 closed
Philipp Wachtel created an issue

Hello,

I've got a problem with HTML-based emails in my new piler mailarchive. In a lot of emails piler shows at the end of the message a part of the boundary-termination.

For example I sent a mail (original.eml), piler return another file (piler.eml). It is shown like in the screenshot (piler-mail.png).

At the beginning it differs in a lot of rows. In the end of the EMLs it differs between:

"--------=_MBF567006E-0A31-4EAA-9A04-969F25750342--

"

and

"--------=_MBF567006E-0A31-4EAA-9A04-96"

In addiotion it show as time offset +0000 an not +0200 where I am and from where the mail was sent, but that is not the main problem.

Thanks for your support!

Comments (15)

  1. Janos SUTO repo owner

    Firstly, let's verify that piler has stored the actual email. Locate the piler id of the email in the maillog, then run pilerget pilerid > piler.eml. It should be the very same file as original.eml. If they don't match, then make sure that piler gets the original email, and not a stripped down copy of it. In the meantime I'll check the gui if it can properly parse and show the attached eml files.

    Regarding the date problem, I think piler is right: you have Date: Mon, 29 Jun 2015 20:56:23 +0000

  2. Janos SUTO repo owner

    model/search/message.php has a function remove_journal (around 281th line). At its end it has the following:

    if($boundary) {
       $msg = substr($msg, 0, strlen($msg) - strlen($boundary) - 6);
    }
    

    Comment out these lines, and let's see what happens. I can't recall at the moment why I remove 6 from the length.

  3. Philipp Wachtel reporter

    Thanks for your fast response!

    After export via CLI i can see that the first part is still differently (3 rows in the archived mail and 20 rows in the original recieved one). Is that ok? It uses the postfix configuration "always_bcc = xxx@xxx.xxx". The termination of the boundary is identical except a blank row in the archived mail is missing.

    Without the three rows in message.php it is shown correctly in the GUI :)

  4. Janos SUTO repo owner

    Well, piler should store an email as it is without any change, and pilerexport should return it likewise: as it is, not a byte changed. I suspect that piler receives a modified message for some reason.

    So if this message change is consistent, then try this: copy original.eml to the piler host, change a single character in the message-id value, then run pilerimport -e original.eml. Then run pilerget to retrieve it, and compare the results.

  5. Philipp Wachtel reporter

    You are right. With the import and export directly on the host it returns exactly the same content. I think it's normal that the header changes while sending the mail via always_bcc on postfix. isn't it?

    only the missing last line is notewothy. does anybody knows if this is a "feature" of postfix?

  6. Janos SUTO repo owner

    Each time an MTA receives an email, it adds a Received: entry, then passes it to the next destination. So yes, some change is normal, though postfix is unlikely to change the last line. You should run "ngrep -X port 25" on the postfix host, then send a short test email, and compare the received and the forwarded emails.

  7. Philipp Wachtel reporter

    Via ngrep I got only encryptedmessages. After setting always_bcc to another mailbox I received the copy including the last empty line. I think it is removed on the piler-host.

  8. Philipp Wachtel reporter

    Sorry I am out of office for some days. I will try when I come back. Thanks for your excellent support so far!

  9. Log in to comment