I don’t think using ALLOW_UNFILTERED_UPLOADS will work for Postie as that only seems to work with the interactive upload.
Try setting “Force User Login” to yes (Postie User tab) and see if that helps.
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
>Force User Login = yes doesn’t solve the issue: in fact it stops the interactive upload working as well
Then something else is wrong because this setting has no affect outside of Postie processing an email.
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
The next step would be to install the Support Add-on to collect some detailed logs. See http://postieplugin.com/downloads/support-addon/