Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter preeve9534

    (@preeve9534)

    Hi Wayne,

    Thank you again. I’ve looked a little more deeply:

    The MIME descriptor in the email being processed reads:

    Content-Disposition: attachment; filename=20190712.kml
    Content-Type: application/vnd.google-earth.kml+xml; name=20190712.kml

    However, the Debug output in Postie looks like this:

    save_attachments: —- start
    save_attachments: [attachment]
    save_attachments_worker: start
    save_attachments_worker: [filename]: 20190712.kml
    save_attachments_worker: [mimetype]: text/kml
    save_attachments_worker: 20190712.kml
    save_attachment: pre sanitize file name ‘20190712.kml’
    save_attachment: file name ‘20190712.kml’
    save_attachment: extension ‘kml’
    save_attachment: secondary lookup found text/kml
    save_attachment: mimetype text/kml
    save_attachment: ctype_primary: text
    save_attachment: text Attachement: 20190712.kml
    media_handle_upload: wrote data to ‘/tmp/postiesV4xee’
    Array
    (
    [name] => 20190712.kml
    [type] => text/kml
    [tmp_name] => /tmp/postiesV4xee
    [error] => 0
    [size] => 4224
    )
    doing postie_file_added_pre
    media_handle_sideload: adding 20190712.kml
    There was an error adding the attachment: Sorry, this file type is not permitted for security reasons.

    I can upload through WordPress’ Media interface both the application/ and the text/ MIME types.

    Postie is configured with “application” as an additional allowed type and the documentation says “….text/ type is always allowed. So, it seems to me that:

    1. For some reason the application/… MIME type in the email attachment is being replaced (by Postie?) as text/kml. Odd?

    and

    2. The new text/kml type is then being rejected even though the documentation says it should be being allowed. Also odd?

    Not sure what else I can do to resolve this. Do you have any more pointers?

    Regards,

    Paul

    Thread Starter preeve9534

    (@preeve9534)

    Hi Wayne,

    Thank you for the advice.

    Force User Login = yes doesn’t solve the issue: in fact it stops the interactive upload working as well.

    I tried forcing the MIME type on my email attachment to just text/kml, but that made no difference either.

    P

    Thread Starter preeve9534

    (@preeve9534)

    FIXED:

    The problem I was experiencing is that the Message configuration option “Filter Newlines” was set to “Yes” (the default I think).

    With this option set the date: tag is not detected. Setting “Filter Newlines” to “No” and Postie behaves as described in the documentation.

    @wayne: maybe adding a note to this effect in the documentation of “date:” (and I guess other similar override tags) would be helpful?

    P

    Thread Starter preeve9534

    (@preeve9534)

    Wayne,

    Thank you for replying … and my apologies for posting a really rubbish enquiry … I’ve spent a few hours on this and may be losing it!. So, for clarity, my email body looks like this:

    
    date:  1 Jun, 2019
    [aside]<div class='pdjr-logtable'>
    <table width='100%'>
      <tr><td>Position at start of day (lat,lon)</td><td colspan='2'>52.9133872,5.7916186</td></tr>
      <tr><td>Position at end of day (lat,lon)</td><td colspan='2'>52.9133872,5.7916186</td></tr>
      <tr><td>Distance travelled (km)</td><td colspan='2'>0.0</td></tr>
      <tr><td colspan='3'></td></tr>
      <tr><td>Engine run time (h:m)</td><td colspan='2'>0:0</td></tr>
      <tr><td>Generator run time (h)</td><td colspan='2'>0:0</td></tr>
      <tr><td colspan='3'></td></tr>
      <tr><td>Domestic battery state (%)</td><td>n/a</td><td>n/a</td></tr>
      <tr><td>Waste water tank (%)</td><td>52</td><td>52</td></tr>
      <tr><td>Fresh water tanks (PS,SB) (%,%)</td><td>64, 67</td><td>64, 67</td></tr>
      <tr><td>Fuel tanks (PS,SB) (%,%)</td><td>44, 48</td><td>44, 48</td></tr>
    </table>
    </div>[/aside]
    

    which I think conforms to your spec.

    The date: (got it right this time!) is being ignored and the whole line appeats as the first line of my derived post.

    P

Viewing 4 replies - 1 through 4 (of 4 total)