restored message header displays in body

Issue #1171 resolved
Asif Bacchus created an issue

First off, thanks for all your work in creating piler!

I’m having only one issue: Running piler 1.3.11 in a docker container. I have created a separate container to act as a smarthost for restoring mail. Email is restored perfectly however, the message is sent back as a raw dump with all the header information in the body of the message. This is especially messy for HTML messages since they are displayed as text. It seems like piler is not separating the header from the body? This also seems like why the message has the wrong sender and no subject, etc.

If I download the .eml file, everything is perfect. This only happens when restoring via SMTP. I have tried several smarthosts (postfix and exim based) and got the same results. I even made my own exim container from scratch to try and rule out any issues.

I have attached a sample restored message to illustrate the issue. Let me know what other information you need or anything I can provide to help with this. Thanks!

Comments (10)

  1. Asif Bacchus reporter

    Do you want the piler exported eml also? It is correct and appears identical to the original message but I can include it if you want it for reference?

  2. Janos SUTO repo owner

    I’d like the eml file that you get when you click on the download link in the piler gui.

  3. Janos SUTO repo owner

    OK, I’ll test with it. One more thing. Please show me the last 3 lines of config-site.php. The point is that there must not be any whitespace after the closing ?> sequence if there’s any.

  4. Janos SUTO repo owner

    Just did my tests, and I believe that piler works just fine when restoring the given email. This is the network dump.

    As you can see, there’s no extra preceding whitespace here.

    ##
    T 172.18.0.9:45694 -> 172.18.0.4:25 [AP] #18
      44 41 54 41 0d 0a                                     DATA..          
    ##
    T 172.18.0.4:25 -> 172.18.0.9:45694 [AP] #20
      33 35 34 20 45 6e 64 20    64 61 74 61 20 77 69 74    354 End data wit
      68 20 3c 43 52 3e 3c 4c    46 3e 2e 3c 43 52 3e 3c    h <CR><LF>.<CR><
      4c 46 3e 0d 0a                                        LF>..           
    ##
    T 172.18.0.9:45694 -> 172.18.0.4:25 [AP] #22
      52 65 63 65 69 76 65 64    3a 20 62 79 20 70 69 6c    Received: by pil
      65 72 0a 58 2d 70 69 6c    65 72 2d 69 64 3a 20 32    er.X-piler-id: 2
      38 39 37 0a 58 2d 50 69    6c 65 72 2d 45 6e 76 65    897.X-Piler-Enve
      6c 6f 70 65 2d 54 6f 3a    20 61 72 63 68 69 76 65    lope-To: archive
      40 61 61 61 2e 66 75 0a    52 65 63 65 69 76 65 64    @aaa.fu.Received
      3a 20 66 72 6f 6d 20 6d    61 69 6c 31 34 38 2e 73    : from mail148.s
    

  5. Asif Bacchus reporter

    Wow – problem solved. Took another look at my config-site.php and it turns out that I was missing a colon after the PILER_HEADER_FIELD. (had ‘X-piler-id’ instead of ‘X-piler-id:’) That was causing it to be read incorrectly and adding a line-break which caused all the issues.

    Thanks so much for looking into this for me and getting me to take another look at my config-site.php!

    Great program, thanks again! 🙂

  6. Log in to comment